具体问题具体分析
R3-R5/6/7之间配置搭建一个MGRE环境,且R3为中心站点
这里我们需要配置隧道,注册中心,修改类型
网段划分
所有的设备可以访问R4的环回接口
通过配置NAT来访问R4的环回接口
减少LSA的更新量、加快收敛、保障更新安全
可以通过汇总来减少LSA的更新量
修改计时器来加快收敛
通过做认证保证数据
全网可达
通过协议和缺省实现路由信息的交互,两种协议之间可以通过ASBR设备来进行双向重发布传递路由
下面是路由器实际配置
R1
sysname r1
#
interface GigabitEthernet0/0/0
ip address 172.16.32.2 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$"L'f*dtHJL;)PiWW*Q1Cp4-L%$%$
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
ip address 172.16.33.1 255.255.255.0
#
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 172.16.32.0 0.0.0.255
network 172.16.33.0 0.0.0.255
stub
R2
sysname r2
#
interface GigabitEthernet0/0/0
ip address 172.16.32.3 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$luR7%xbWRGA'U$K!EZ:Np4p-%$%$
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
ip address 172.16.34.1 255.255.255.0
#
ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 172.16.32.0 0.0.0.255
network 172.16.34.0 0.0.0.255
stub
R3
sysname r3
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
link-protocol ppp
ip address 34.0.0.1 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/0
ip address 172.16.32.1 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$0Q@s$_9H.4e=_2O6+Z5!p3'T%$%$
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface LoopBack1
ip address 172.16.1.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 172.16.0.1 255.255.255.0
tunnel-protocol gre p2mp
source 34.0.0.1
ospf network-type p2mp
ospf timer hello 10
nhrp entry multicast dynamic
nhrp network-id 100
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.16.0.0 0.0.0.255
area 0.0.0.1
abr-summary 172.16.32.0 255.255.224.0
network 172.16.1.0 0.0.0.255
network 172.16.32.0 0.0.0.255
stub no-summary
#
ip route-static 0.0.0.0 0.0.0.0 34.0.0.2
ip route-static 172.16.32.0 255.255.224.0 NULL0
R4
sysname isp
#
interface Serial2/0/0
link-protocol ppp
ip address 34.0.0.2 255.255.255.0
#
interface Serial3/0/0
link-protocol ppp
ip address 54.0.0.2 255.255.255.0
#
interface Serial4/0/0
link-protocol ppp
ip address 64.0.0.2 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 74.0.0.2 255.255.255.0
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.0
R5
sysname r6
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
link-protocol ppp
ip address 64.0.0.1 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/0
ip address 172.16.64.1 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$jho.14lrb-Uq;N-HYL1Ip2>p%$%$
#
interface LoopBack1
ip address 172.16.3.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 172.16.0.3 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
ospf network-type p2mp
ospf timer hello 10
nhrp network-id 100
nhrp entry 34.0.0.1 172.16.0.1 register
nhrp entry 172.16.0.1 34.0.0.1 register
#
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 172.16.0.0 0.0.0.255
network 172.16.3.0 0.0.0.255
area 0.0.0.2
abr-summary 172.16.64.0 255.255.224.0
network 172.16.64.0 0.0.0.255
nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 64.0.0.2
ip route-static 172.16.64.0 255.255.224.0 NULL0
R6
sysname r7
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface GigabitEthernet0/0/0
ip address 74.0.0.1 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/1
ip address 172.16.96.1 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$3fA_*_|{{:c]_<VVd,R!p5<N%$%$
#
interface LoopBack1
ip address 172.16.4.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 172.16.0.4 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type p2mp
ospf timer hello 10
nhrp network-id 100
nhrp entry 34.0.0.1 172.16.0.1 register
nhrp entry 172.16.0.1 34.0.0.1 register
#
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 172.16.0.0 0.0.0.255
network 172.16.4.0 0.0.0.255
area 0.0.0.3
abr-summary 172.16.96.0 255.255.224.0
network 172.16.96.0 0.0.0.255
nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 74.0.0.2
ip route-static 172.16.96.0 255.255.224.0 NULL0
R7
sysname r7
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface GigabitEthernet0/0/0
ip address 74.0.0.1 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/1
ip address 172.16.96.1 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$3fA_*_|{{:c]_<VVd,R!p5<N%$%$
#
interface LoopBack1
ip address 172.16.4.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 172.16.0.4 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type p2mp
ospf timer hello 10
nhrp network-id 100
nhrp entry 34.0.0.1 172.16.0.1 register
nhrp entry 172.16.0.1 34.0.0.1 register
#
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 172.16.0.0 0.0.0.255
network 172.16.4.0 0.0.0.255
area 0.0.0.3
abr-summary 172.16.96.0 255.255.224.0
network 172.16.96.0 0.0.0.255
nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 74.0.0.2
ip route-static 172.16.96.0 255.255.224.0 NULL0
R8
sysname r8
#
interface GigabitEthernet0/0/0
ip address 172.16.96.2 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$=([@'V&aiEt~tE*Er\-Sp5-G%$%$
#
interface GigabitEthernet0/0/1
ip address 172.16.97.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
ip address 172.16.98.1 255.255.255.0
#
ospf 1 router-id 8.8.8.8
area 0.0.0.3
network 172.16.0.0 0.0.255.255
nssa
R9
sysname r9
#
interface GigabitEthernet0/0/0
ip address 172.16.97.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 172.16.128.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
ip address 172.16.129.1 255.255.255.0
#
ospf 1 router-id 9.9.9.9
asbr-summary 172.16.128.0 255.255.224.0
import-route ospf 2
area 0.0.0.3
network 172.16.97.0 0.0.0.255
nssa
#
ospf 2 router-id 9.9.9.9
default-route-advertise always
area 0.0.0.4
network 172.16.128.0 0.0.0.255
network 172.16.129.0 0.0.0.255
#
ip route-static 172.16.128.0 255.255.224.0 NULL0
R10
sysname r10
#
interface GigabitEthernet0/0/0
ip address 172.16.128.2 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
ip address 172.16.130.1 255.255.255.0
#
ospf 1 router-id 10.10.10.10
area 0.0.0.4
network 172.16.128.0 0.0.0.255
network 172.16.130.0 0.0.0.255
R11
sysname r11
#
interface GigabitEthernet0/0/0
ip address 172.16.64.2 255.255.255.0
ospf authentication-mode md5 1 cipher %$%$Ab[r/fObbML\>96r8)R<p3D#%$%$
#
interface GigabitEthernet0/0/1
ip address 172.16.65.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
ip address 172.16.66.1 255.255.255.0
#
ospf 1 router-id 11.11.11.11
area 0.0.0.2
network 172.16.64.0 0.0.0.255
network 172.16.65.0 0.0.0.255
network 172.16.66.0 0.0.0.255
nssa
R12
sysname r12
#
interface GigabitEthernet0/0/0
ip address 172.16.65.2 255.255.255.0
#
interface LoopBack1
ip address 172.16.160.1 255.255.240.0
#
interface LoopBack2
ip address 172.16.176.1 255.255.240.0
#
ospf 1 router-id 12.12.12.12
asbr-summary 172.16.160.0 255.255.224.0
import-route rip 1
area 0.0.0.2
network 172.16.65.0 0.0.0.255
nssa
#
rip 1
version 2
network 172.16.0.0
#
ip route-static 172.16.160.0 255.255.224.0 NULL0