- R1:
- interface Loopback0
- ip address 1.1.1.1 255.255.255.255
- interfaceFastEthernet0/0
- ip address 12.1.1.1 255.255.255.0
- router ospf 1
- router-id1.1.1.1
- area 1 nssa
- network 1.1.1.1 0.0.0.0area1
- network 12.1.1.0 0.0.0.255area1
- R2:
- interface Loopback0
- ip address 2.2.2.2 255.255.255.255
- interfaceFastEthernet0/0
- ip address 12.1.1.2 255.255.255.0
- interfaceFastEthernet0/1
- ip address 23.1.1.2 255.255.255.0
- router ospf 1
- router-id2.2.2.2
- area 1nssadefault-information-originate//解决外部rip路由无法传递过来。network2.2.2.2 0.0.0.0area0
- network 12.1.1.0 0.0.0.255area1
- network 23.1.1.0 0.0.0.255area0
- R3:
- interface Loopback0
- ip address 3.3.3.3 255.255.255.255
- interfaceFastEthernet0/0
- ip address 34.1.1.3 255.255.255.0
- interfaceFastEthernet0/1
- ip address 23.1.1.3 255.255.255.0
- router ospf 1
- router-id3.3.3.3
- redistribute rip subnets
- network 3.3.3.3 0.0.0.0area0
- network 23.1.1.0 0.0.0.255area0
- router rip
- version 2
- redistribute ospf 1metric2
- network 34.0.0.0
- no auto-summary
- R4:
- interface Loopback0
- ip address 4.4.4.4 255.255.255.255
- interfaceFastEthernet0/0
- ip address 34.1.1.4 255.255.255.0
- router rip
- version 2
- network 4.0.0.0
- network 34.0.0.0
- no auto-summary
- R4(config)#do show ip route rip
- 1.0.0.0/32 issubnetted,1 subnets
- R 1.1.1.1[120/2] via34.1.1.3,00:00:00, FastEthernet0/0
- 2.0.0.0/32 issubnetted,1 subnets
- R 2.2.2.2[120/2] via34.1.1.3,00:00:00, FastEthernet0/0
- 3.0.0.0/32 issubnetted,1 subnets
- R 3.3.3.3[120/2] via34.1.1.3,00:00:00, FastEthernet0/0
- 23.0.0.0/24 issubnetted,1 subnets
- R 23.1.1.0[120/2] via34.1.1.3,00:00:00, FastEthernet0/0
- 12.0.0.0/24 issubnetted,1 subnets
- R 12.1.1.0[120/2] via34.1.1.3,00:00:00, FastEthernet0/0
- R4(config)#doping1.1.1.1
- Type escape sequence to abort.
- Sending 5,100-byteICMP Echos to1.1.1.1, timeoutis 2 seconds:
- !!!!!
- Success rate is 100percent (5/5), round-trip min/avg/max =44/50/60ms
来源: http://www.bubuko.com/infodetail-1973180.html