这个试验囊括了ospf和rip这两个路由西医,同时实现了末节、路由归纳和虚拟链路。下面是OSPF下末节路由归纳虚拟链路配置。
配置r1: [r1]inter e0 [r1-Ethernet0]ip address 192.168.0.1 24 [r1-Ethernet0]loopback Ethernet0 running on loopback mode %01:02:23: Interface Ethernet0 is UP %01:02:23: Line protocol ip on the interface Ethernet0 is UP Duplicate IP Address [r1-Ethernet0]ip address 192.168.1.1 24 sub [r1-Ethernet0]ip address 192.168.2.1 24 sub [r1-Ethernet0]ip address 192.168.3.1 24 sub [r1-Ethernet0]ip address 192.168.4.1 24 sub [r1-Ethernet0]ip address 192.168.5.1 24 sub [r1-Ethernet0]ip address 192.168.6.1 24 sub [r1-Ethernet0]ip address 192.168.7.1 24 sub [r1-Ethernet0]inter s0 [r1-Serial0]ip address 192.168.8.1 24 [r1-Serial0] %01:04:37: Line protocol ip on the interface Serial0 is UP [r1-Serial0]quit [r1]ospf enable Start OSPF task... OSPF enabled [r1-ospf]inter e0 [r1-Ethernet0]ospf enable area 1 [r1-Ethernet0]inter s0 [r1-Serial0]ospf enable area 1 [r1-Serial0]quit [r1]local-user user1 pass sim 123 servi adm 配置r2: [r2]inter s0 [r2-Serial0]ip address 192.168.8.2 24 [r2-Serial0]inter s1 [r2-Serial1]ip address 192.168.9.1 24 [r2-Serial1]inter e0 [r2-Ethernet0]ip address 192.168.12.1 24 [r2]inter s0 [r2-Serial0]shut % Interface Serial0 is shut down [r2-Serial0] %22:04:42: Interface Serial0 is DOWN %22:04:42: Line protocol ip on the interface Serial0 is DOWN [r2-Serial0]undo shut [r2-Serial0]quit [r2]ospf en Start OSPF task... OSPF enabled [r2-ospf]inter s0 [r2-Serial0]ospf enable area 1 [r2-Serial0]inter s1 [r2-Serial1]ospf enable area 0 [r2-Serial1]quit [r2]rip waiting... RIP is running [r2-rip]network 192.168.12.0 [r2-rip]quit [r2]local-user user1 password sim 123 ser adm 配置r3: [r3]inter s0 [r3-Serial0]ip address 192.168.9.2 24 [r3-Serial0]inter s1 [r3-Serial1]ip address 192.168.10.1 24 [r3-Serial1] %01:02:48: Line protocol ip on the interface Serial1 is UP [r3-Serial1]int s0 [r3-Serial0]shut % Interface Serial0 is down %01:03:07: Interface Serial0 is DOWN [r3-Serial0]undo shut % Interface Serial0 is reset %01:03:18: Interface Serial0 is UP %01:03:18: Line protocol ip on the interface Serial0 is UP [r3-Serial0]quit [r3]ospf en Start OSPF task... OSPF enabled [r3-ospf]inter s0 [r3-Serial0]ospf en area 0 [r3-Serial0]inter s1 [r3-Serial1]ospf en area 2 [r3-Serial1]quit [r3]local-user user1 pass sim 123 ser adm 测试一下 [r3]ping 192.168.8.1 Reply from 192.168.8.1: bytes=56 Sequence=0 ttl=254 time = 50 ms Reply from 192.168.8.1: bytes=56 Sequence=1 ttl=254 time = 50 ms Reply from 192.168.8.1: bytes=56 Sequence=2 ttl=254 time = 50 ms Reply from 192.168.8.1: bytes=56 Sequence=3 ttl=254 time = 50 ms Reply from 192.168.8.1: bytes=56 Sequence=4 ttl=254 time = 52 ms --- 192.168.8.1 ping statistics --- 5 packets transmitted 5 packets received 0.00% packet loss round-trip min/avg/max = 50/50/52 ms 配置r4: [r4]inter s0 [r4-Serial0]ip address 192.168.10.2 24 [r4-Serial0]inter e0 [r4-Ethernet0]ip address 192.168.11.1 24 [r4-Ethernet0]inter s0 [r4-Serial0]shut [r4-Serial0]undo shut % Interface Serial0 is reset [r4-Serial0] %01:02:40: Interface Serial0 is UP %01:02:41: Line protocol ip on the interface Serial0 is UPquit [r4]inter e0 [r4-Ethernet0]loopback Ethernet0 running on loopback mode [r4-Ethernet0] [r4-Ethernet0] %01:03:00: Interface Ethernet0 is UP %01:03:00: Line protocol ip on the interface Ethernet0 is UP [r4-Ethernet0]quit [r4]ospf en Start OSPF task... OSPF enabled [r4-ospf]inter s0 [r4-Serial0]ospf en area 2 [r4-Serial0]inter e0 [r4-Ethernet0]ospf en area 2 [r4-Ethernet0]quit [r4]local-user user1 pass sim 123 ser adm 测试一下 [r4]ping 192.168.8.1 Reply from 192.168.8.1: bytes=56 Sequence=0 ttl=253 time = 74 ms Reply from 192.168.8.1: bytes=56 Sequence=1 ttl=253 time = 78 ms Reply from 192.168.8.1: bytes=56 Sequence=2 ttl=253 time = 74 ms Reply from 192.168.8.1: bytes=56 Sequence=3 ttl=253 time = 74 ms Reply from 192.168.8.1: bytes=56 Sequence=4 ttl=253 time = 83 ms --- 192.168.8.1 ping statistics --- 5 packets transmitted 5 packets received 0.00% packet loss 配置r5: [R5]vlan 10 [R5-vlan10]port e0/1 [R5-vlan10]inter vlan10 [R5-Vlan-interface10]ip address 192.168.12.2 255.255.255.0 [R5-Vlan-interface10]quit [R5]vlan 20 [R5-vlan20]port e0/2 [R5-vlan20]inter vlan 20 [R5-Vlan-interface20]ip address 192.168.13.1 255.255.255.0 启动rip: [R5]rip [R5-rip]network 192.168.13.0 [R5-rip]network 192.168.12.0 退出时还有配置telnet 配置r6:(防火墙) [r6]fire packet defau per [r6]firewall zone trust [r6-zone-trust]add inter e0/0 The interface has been added to trust security zone. [r6-zone-trust]quit [r6]fire zone untrust [r6-zone-untrust]add inter e0/1 The interface has been added to trust security zone. [r6-zone-untrust]quit [r6]inter eth0/0 [r6-Ethernet0/0]ip address 192.168.13.2 24 [r6-Ethernet0/0]shut [r6-Ethernet0/0]undo shut [r6-Ethernet0/0]quit [r6]inter eth0/1 [r6-Ethernet0/1]ip address 192.168.14.1 24 [r6-Ethernet0/1]loopback [r6]rip [r6-rip]network 192.168.14.0 [r6-rip]network 192.168.13.0 退出时还有配置telnet
|