思科模拟器搭建教程

上传人:痛*** 文档编号:79639343 上传时间:2022-04-24 格式:DOC 页数:16 大小:116.50KB
返回 下载 相关 举报
思科模拟器搭建教程_第1页
第1页 / 共16页
思科模拟器搭建教程_第2页
第2页 / 共16页
思科模拟器搭建教程_第3页
第3页 / 共16页
点击查看更多>>
资源描述
思科CCNP交流群:69721386Heres an example topology for Cisco IOU to help you get started:In this example, SF is an IOU instance running on host “solaris”. IOUlive is also running on this host, bridging SFs Ethernet0/0 interface to my physical network (and to the world).SJ1, SJ2, and SJ3 are IOU instances running on host “helium”.The Ethernet1/0 interface on SF is connected to Ethernet0/1 on SJ1 are connected, even though they are on separate physical hosts.The Ethernet0/0 interfaces on SJ1, SJ2, and SJ3 are connected, sharing a common network segment.Last, SJ2 and SJ3 are connected via their Serial1/0 interfaces.Hopefully, this should be good enough to demonstrate the various options for connecting IOU instances.The NETMAP fileWhen connecting IOU instances across physical hosts, the hosts should share a common NETMAP file. If it isnt possible to use NFS, youll need to duplicate the file on each host. Im not running NFS at home, so Ive simply copied the file over to both hosts.The IOU instance IDs are assigned as follows: SF : 100 SF : 199 (IOUlive) SJ1 : 151 SJ2 : 152 SJ3 : 153Heres what my NETMAP file looks like: 100:0solaris 199:0solaris100:1solaris 151:16helium151:0helium 152:0helium 153:0helium152:1helium 153:1heliumConnect SF to the real worldIll start by firing up the SF router on solaris:$ ./unix-js-m 100IOS On Unix - Cisco Systems confidential, internal use onlyPort 0 is connected to: 199:0solarisPort 16 is connected to: 151:16helium.output snipped.Next, Ill startup IOUlive so that SF is connected to my physical network:$ ./ioulive /dev/hme0 199Port 0 is connected to: 100:0solaris/dev/hme0 is the NIC on solaris that is connected to my network.Ill bring up the Ethernet0/0 interface on SF:SF# conf tEnter configuration commands, one per line. End with CNTL/Z.SF(config)# interface ethernet 0/0SF(config-if)# ip address 203.0.113.2 255.255.255.0SF(config-if)# no shutdownVerify I can ping my (physical) router:SF(config-if)# do ping 203.0.113.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 203.0.113.1, timeout is 2 seconds:.!Success rate is 80 percent (4/5), round-trip min/avg/max = 20/33/40 msSo SF, an IOU instance, has connectivity with my physical router at home, a Cisco 1811. Just for good measure, lets add a default route and see if we can ping hosts on the Internet:SF(config-if)# exitSF(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1SF(config)# do ping 4.2.2.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 40/50/72 msLooks like were all set!Bring up SJ1Now lets bring up the SJ1 IOU instance on helium:$ ./i86bi_linux-ipbase-ms -e 1 -s 0 151*IOS On Unix - Cisco Systems confidential, internal use onlyUnder no circumstances is this software to be provided to anynon Cisco staff or customers. To do so is likely to resultin disciplinary action. Please refer to the IOU Usage policy atwwwin- for more information.*Port 0/0 is connected to: 152:0helium 153:0heliumPort 0/1 is connected to: 100:1solaris.output snipped.Connect SJ1 to SF Now that SJ1 is up, lets get it connected to the SF router:SF(config)# int e1/0SF(config-if)# ip addr 10.0.0.1 255.255.255.0SF(config-if)# no shutdownSJ1# conf tEnter configuration commands, one per line. End with CNTL/Z.SJ1(config)# int e0/1SJ1(config-if)# ip address 10.0.0.2 255.255.255.0SJ1(config-if)# no shutdownNote that SF is running on the physical host “solaris”, a Solaris 8/SPARC box, and SJ1 is running on the physical host “helium”, an Ubuntu 10.04/x86 box.Lets verify we have connectivity:SJ1(config-if)# do ping 10.0.0.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:.!Success rate is 80 percent (4/5), round-trip min/avg/max = 20/28/40 msNow well bring up the Ethernet0/0 interface on SJ1 that shares a segment with SJ2 and SJ3:SJ1(config-if)# int e0/0SJ1(config-if)# ip addr 10.123.123.1 255.255.255.0SJ1(config-if)# no shutdownBring up SJ2Lets bring up the SJ2 instance:$ ./i86bi_linux-ipbase-ms -e 1 -s 1 152*IOS On Unix - Cisco Systems confidential, internal use onlyUnder no circumstances is this software to be provided to anynon Cisco staff or customers. To do so is likely to resultin disciplinary action. Please refer to the IOU Usage policy atwwwin- for more information.*Port 0/0 is connected to: 151:0helium 153:0heliumPort 1/0 is connected to: 153:1helium.output snipped.Lets configure the Ethernet0/0 and Serial1/0 interfaces:SJ2# conf tEnter configuration commands, one per line. End with CNTL/Z.SJ2(config)# interface ethernet 0/0SJ2(config-if)# ip address 10.123.123.2 255.255.255.0SJ2(config-if)# no shutdownSJ2(config-if)# interface serial 1/0SJ2(config-if)# ip address 10.10.23.2 255.255.255.0SJ2(config-if)# no shutdownVerify we can ping SJ1s Ethernet0/0 interface:SJ2(config-if)# do ping 10.123.123.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.123.123.1, timeout is 2 seconds.!Success rate is 80 percent (4/5), round-trip min/avg/max = 4/6/8 msBring up SJ3Now well bring up the SJ3 router:$ ./i86bi_linux-ipbase-ms -e 1 -s 1 153*IOS On Unix - Cisco Systems confidential, internal use onlyUnder no circumstances is this software to be provided to anynon Cisco staff or customers. To do so is likely to resultin disciplinary action. Please refer to the IOU Usage policy atwwwin- for more information.*Port 0/0 is connected to: 151:0helium 152:0heliumPort 1/0 is connected to: 152:1helium.output snipped.Configure Ethernet0/0 and Serial1/0:SJ3# conf tEnter configuration commands, one per line. End with CNTL/Z.SJ3(config)# interface ethernet 0/0SJ3(config-if)# ip address 10.123.123.3 255.255.255.0SJ3(config-if)# no shutdownSJ3(config-if)# interface serial 1/0SJ3(config-if)# ip address 10.10.23.3 255.255.255.0SJ3(config-if)# no shutdownVerify we can ping SJ1 and SJ2s Ethernet0/0 interfaces:SJ3(config-if)# do ping 10.123.123.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.123.123.1, timeout is 2 seconds:.!Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 msSJ3(config-if)# do ping 10.123.123.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.123.123.2, timeout is 2 seconds:.!Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/4 msVerify we can ping SJ2 over the Serial1/0 interface:SJ3(config-if)# do ping 10.10.23.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.10.23.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 12/12/12 msGreat, full connectivity so far! Lets enable OSPF on SF and SJ1:SF(config-if)# router ospf 42SF(config-router)# network 10.0.0.1 0.0.0.0 area 0SJ1(config-if)# router ospf 42SJ1(config-router)# network 10.0.0.2 0.0.0.0 area 0SJ1(config-router)# network 10.123.123.1 0.0.0.0 area 0Make sure the OSPF adjacency between SF and SJ1 came up:SF(config-router)# do sh ip ospf neighNeighbor ID Pri State Dead Time Address Interface10.123.123.1 1 FULL/BDR 00:00:36 10.0.0.2 Ethernet1/0Lets look at the routing table on SF:SF(config-router)# do sh ip route | begin GatewayGateway of last resort is 203.0.113.1 to network 0.0.0.0C 203.0.113.0/24 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 2 subnetsO 10.123.123.0 110/20 via 10.0.0.2, 00:00:50, Ethernet1/0C 10.0.0.0 is directly connected, Ethernet1/0S* 0.0.0.0/0 1/0 via 203.0.113.1Inject default route into OSPFSince SF has a route to the world, lets inject a default route there into OSPF:SF(config-router)# default-information originateMake sure it shows up on SJ1:SJ1(config-router)# do sh ip route | begin GatewayGateway of last resort is 10.0.0.1 to network 0.0.0.0O*E2 0.0.0.0/0 110/1 via 10.0.0.1, 00:00:44, Ethernet0/1 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masksC 10.0.0.0/24 is directly connected, Ethernet0/1L 10.0.0.2/32 is directly connected, Ethernet0/1C 10.123.123.0/24 is directly connected, Ethernet0/0L 10.123.123.1/32 is directly connected, Ethernet0/0Configure default route on SJ2 and SJ3On SJ2 and SJ3, lets configure a default route towards SJ1:SJ2(config-if)# ip route 0.0.0.0 0.0.0.0 10.123.123.1SJ3(config-if)# ip route 0.0.0.0 0.0.0.0 10.123.123.1Make sure SF can talk to SJ2 and SJ3:SF(config-router)# do ping 10.123.123.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.123.123.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/44/60 msSF(config-router)# do ping 10.123.123.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.123.123.3, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/52/88 msConfigure NAT on SFNow that we have full connectivity, lets configure NAT on the SF router so that SJ1, SJ2, and SJ3 can talk to the outside world:SF(config-router)# interface ethernet 0/0SF(config-if)# ip nat outsideSF(config-if)# interface ethernet 1/0SF(config-if)# ip nat insideWell need an ACL matching the source addresses to match, of course:SF(config-if)# ip access-list standard NATSF(config-std-nacl)# permit 10.0.0.0 0.0.0.255SF(config-std-nacl)# permit 10.123.123.0 0.0.0.255SF(config-std-nacl)# permit 10.10.23.0 0.0.0.255Last, well use “ip nat ” to tell SF how to work its magic:SF(config-std-nacl)# ip nat inside source list NAT int e0/0 overloadVerify connectivityAt this point, all routers should have connectivity to the outside world. Lets verify from SJ2 and SJ3 by pinging a couple of well-known public DNS servers:SJ2(config)# do ping 4.2.2.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/55/128 msSJ3(config)# do ping 8.8.8.8Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 80/100/120 msLooks like everything is working properly.Verify Internet connectivityLast, just for good measure, lets connect to the web server this site runs on and issue a request:SJ3(config)# do telnet 206.125.175.18 80Trying 206.125.175.18, 80 . OpenHEAD / HTTP/1.0HTTP/1.0 200 OKDate: Sat, 22 Jan 2011 22:52:01 GMTServer: Apache/2.2.17 (FreeBSD) mod_ssl/2.2.17 OpenSSL/0.9.8nX-Pingback: Link: ; rel=shortlinkConnection: closeContent-Type: text/html; charset=UTF-8Connection to 206.125.175.18 closed by foreign hostSummaryThis post demonstrated a number of concepts that should be useful for those wanting to use IOU.First, we showed how the routers connect “physically”.Second, we showed how to construct a working NETMAP file to match our topology.Third, we started up our IOU instances and connect them across hosts and to the outside world.Fourth, we configured our routers (even configuring OSPF).Last, we showed how to verify we had connectivity with the outside world.I hope this post was helpful. I welcome your feedback in the comments section below!
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!