R1 interface Loopback0 ip address 1.1.1.1 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 ip ospf network point-to-point\\改网络类型为点对点,为了满足题目3里面的跳过wait timer的需求。 ip ospf 1 area 0 ! interface FastEthernet0/1 ip address 192.168.234.1 255.255.255.0 ip ospf priority 10\\改接口ospf的优先级,为了让R1成为DR ip ospf 1 area 0 ! interface FastEthernet1/0 ip address 192.168.13.1 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 0 ! router ospf 1 router-id 1.1.1.1\\设置OSPF的route-id,防止被其他的接口抢走route-id
R2 interface Loopback0 ip address 2.2.2.2 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 0 ! interface FastEthernet0/1 ip address 192.168.234.2 255.255.255.0 ip ospf priority 5\\设置接口的优先级,让R2成为BDR ip ospf 1 area 0 ! interface FastEthernet1/0 ip address 192.168.24.2 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 0 ! router ospf 1 router-id 2.2.2.2
R3 interface Loopback0 ip address 3.3.3.3 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet0/0 ip address 192.168.13.3 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 0 ! interface FastEthernet0/1 ip address 192.168.234.3 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet1/0 ip address 192.168.35.3 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 1 ! router ospf 1 router-id 3.3.3.3 area 1 virtual-link 5.5.5.5\\虚链路别忘了!!!!!否则无法实现全网互联!!!
R4 interface Loopback0 ip address 4.4.4.4 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet0/0 ip address 192.168.24.4 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 0 ! interface FastEthernet0/1 ip address 192.168.234.4 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet1/0 ip address 192.168.46.4 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 1 ! router ospf 1 router-id 4.4.4.4 area 1 virtual-link 6.6.6.6\\虚链路别忘了!!!!!否则无法实现全网互联!!!
R5 interface Loopback0 ip address 5.5.5.5 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet0/0 ip address 192.168.35.5 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 1 ! interface FastEthernet0/1 ip address 192.168.57.5 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 2 ! router ospf 1 router-id 5.5.5.5 area 1 virtual-link 3.3.3.3\\虚链路别忘了!!!!!否则无法实现全网互联!!!
R6 interface Loopback0 ip address 6.6.6.6 255.255.255.0 ip ospf 1 area 0 ! interface FastEthernet0/0 ip address 192.168.46.6 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 1 ! interface FastEthernet0/1 ip address 192.168.67.6 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 2 ! router ospf 1 router-id 6.6.6.6 area 1 virtual-link 4.4.4.4\\虚链路别忘了!!!!!否则无法实现全网互联!!!
R7 interface Loopback0 ip address 7.7.7.7 255.255.255.0 ! interface FastEthernet0/0 ip address 192.168.57.7 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 2 ! interface FastEthernet0/1 ip address 192.168.67.7 255.255.255.0 ip ospf network point-to-point ip ospf 1 area 2 ! router ospf 1 router-id 7.7.7.7
R3 interface Loopback1 ip address 172.16.1.1 255.255.255.0 ip ospf 1 area 1 ! interface Loopback2 ip address 172.16.2.1 255.255.255.0 ip ospf 1 area 1 ! interface Loopback3 ip address 172.16.3.1 255.255.255.0 ip ospf 1 area 1
R1#show ip ospf database external OSPF Router with ID (1.1.1.1) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 9 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 7.7.7.0 (External Network Number ) Advertising Router: 6.6.6.6 LS Seq Number: 80000005 Checksum: 0x2E41 Length: 36 Network Mask: /24 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 192.168.67.7\\该转发地址不可达,导致这条lsa虽然存在database中,但是也不会使用 External Route Tag: 0
通过在R5和R6上修改7类转换成5类LSA时候的Fordward地址,实现转发地址可达。
1 2 3
R5&R6 router ospf 1 area 2 nssa translate type7 suppress-fa