不规则区域+PPP
基础配置
R1
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1-LoopBack0]ip add 1.1.1.1 24
[r1]ospf 1 router-id 91.1.1.1
[r1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]net 1.1.1.1 0.0.0.0
R2
ospf 1 router-id 92.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 12.1.1.0 0.0.0.255
area 0.0.0.1
network 23.1.1.0 0.0.0.255
R3
[r3-GigabitEthernet0/0/0]ip add 34.1.1.1 24
[r3-GigabitEthernet0/0/1]ip add 23.1.1.2 24
[r3-LoopBack0]ip add 3.3.3.3 24
[r3]ospf 1 router-id 93.3.3.3
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]net 34.1.1.1 0.0.0.0
[r3-ospf-1-area-0.0.0.1]net 23.1.1.2 0.0.0.0
[r3-ospf-1-area-0.0.0.1]net 3.3.3.3 0.0.0.0
R4
[r4-GigabitEthernet0/0/1]ip add 34.1.1.2 24
[r4-GigabitEthernet0/0/0]ip add 45.1.1.1 24
[r4-GigabitEthernet0/0/0]int l0
[r4-LoopBack0]ip add 4.4.4.4 24
[r4-LoopBack0]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 46.1.1.1 24ospf 1 router-id 94.4.4.4
area 0.0.0.1
network 4.4.4.4 0.0.0.0
network 34.1.1.0 0.0.0.255
area 0.0.0.2
network 45.1.1.0 0.0.0.255
R5
[R5-GigabitEthernet0/0/1]IP ADD 45.1.1.2 24
[R5-GigabitEthernet0/0/1]INT L0
[R5-LoopBack0]IP ADD 5.5.5.5 24area 0.0.0.2
network 5.5.5.5 0.0.0.0
network 45.1.1.2 0.0.0.0
R6
[R6-GigabitEthernet0/0/0]IP ADD 46.1.1.2 24
[R6-GigabitEthernet0/0/0]INT L0
[R6-LoopBack0]IP ADD 6.6.6.6 24[R6]OSPF 1 router-id 96.6.6.6
[R6-ospf-1]area 3
[R6-ospf-1-area-0.0.0.3]network 46.1.1.0 0.0.0.255
[R6-ospf-1-area-0.0.0.3]NET 6.6.6.6 0.0.0.0
PPP拨号及全网互通
R8
[r7-LoopBack0]ip add 8.8.8.8 24
[r7-Serial4/0/0]ip add 18.0.0.1 24
[r7-Serial4/0/0]remote address 81.0.0.1
R1
[r1-Serial4/0/0]ip address ppp-negotiate
NAT及缺省:
[r1-Serial4/0/0]nat outbound 2000
[r1]ip route-static 0.0.0.0 0 18.0.0.1
[r1-ospf-1]default-route-advertise
[r1-acl-basic-2000]dis th 提前网络规划好一点,acl就不用写这么多了,也可以允许所有,简单一些
[V200R003C00]
#
acl number 2000
rule 5 permit source 12.1.1.0 0.0.0.255
rule 10 permit source 23.1.1.0 0.0.0.255
rule 15 permit source 34.1.1.0 0.0.0.255
rule 20 permit source 45.1.1.0 0.0.0.255
rule 25 permit source 47.1.1.0 0.0.0.255
rule 30 permit source 1.1.1.1 0
rule 35 permit source 2.2.2.2 0
rule 40 permit source 3.3.3.3 0
rule 45 permit source 4.4.4.4 0
rule 50 permit source 5.5.5.5 0
rule 55 permit source 6.6.6.6 0
rule 60 deny
V-Link解决不规则区域
[r4-ospf-1-area-0.0.0.1]vlink-peer 92.2.2.2
[r2-ospf-1-area-0.0.0.1]vlink-peer 94.4.4.4
R2与R5互有路由了
重发布解决不规则区域
[r4]ospf 2 router-id 94.1.1.1
[r4-ospf-2-area-0.0.0.3]net 46.1.1.0 0.0.0.255
[r4-ospf-1]import-route ospf 2
[r4-ospf-2]import-route ospf 1
R2,R6上有了全部的路由