1、IP配置
ISP
interface Serial3/0/0
link-protocol ppp
ip address 46.1.1.2 255.255.255.0
#
interface Serial4/0/0
link-protocol ppp
ip address 34.1.1.2 255.255.255.0
#
interface Serial4/0/1
link-protocol ppp
ip address 45.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 47.1.1.2 255.255.255.0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.0
#
AR1
#
interface GigabitEthernet0/0/0
ip address 172.16.32.129 255.255.255.248
#
interface LoopBack0
ip address 172.16.33.1 255.255.255.128
#
AR2
#
interface GigabitEthernet0/0/0
ip address 172.16.32.130 255.255.255.248
#
interface LoopBack0
ip address 172.16.33.129 255.255.255.128
#
AR3
#
interface Serial4/0/0
link-protocol ppp
ip address 34.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 172.16.32.131 255.255.255.248
#
interface LoopBack0
ip address 172.16.34.1 255.255.255.128
#
AR5
#
interface Serial4/0/0
link-protocol ppp
ip address 45.1.1.1 255.255.255.0
#
interface LoopBack0
ip address 172.16.1.1 255.255.255.128
#
AR6
#
interface Serial4/0/0
link-protocol ppp
ip address 46.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 172.16.64.1 255.255.255.252
#
interface LoopBack0
ip address 172.16.1.129 255.255.255.128
#
AR7
#
interface GigabitEthernet0/0/0
ip address 47.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 172.16.96.1 255.255.255.252
#
interface LoopBack0
ip address 172.16.2.1 255.255.255.128
#
AR8
#
interface GigabitEthernet0/0/0
ip address 172.16.96.2 255.255.255.252
ospf authentication-mode md5 1 cipher %$%$-6D,Eji%RNS3W;WS1eq/sYl1%$%$
ospf timer hello 5
#
interface GigabitEthernet0/0/1
ip address 172.16.96.5 255.255.255.252
#
interface LoopBack0
ip address 172.16.97.1 255.255.255.128
#
AR9
#
interface GigabitEthernet0/0/1
ip address 172.16.128.1 255.255.255.252
#
interface LoopBack0
ip address 172.16.129.1 255.255.255.128
#
AR10
#
interface GigabitEthernet0/0/0
ip address 172.16.128.2 255.255.255.252
#
interface LoopBack0
ip address 172.16.129.129 255.255.255.128
#
AR11
#
interface GigabitEthernet0/0/0
ip address 172.16.64.2 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 172.16.64.5 255.255.255.252
#
interface LoopBack0
ip address 172.16.65.1 255.255.255.128
#
AR12
#
interface GigabitEthernet0/0/0
ip address 172.16.64.6 255.255.255.252
#
interface LoopBack0
ip address 172.16.160.1 255.255.240.0
#
interface LoopBack1
ip address 172.16.176.1 255.255.240.0
#
2、配置缺省前往公网
AR3
#
ip route-static 0.0.0.0 0.0.0.0 34.1.1.2
ip route-static 172.16.32.0 255.255.224.0 NULL0
#
AR5
#
ip route-static 0.0.0.0 0.0.0.0 45.1.1.2
#
AR6
#
ip route-static 0.0.0.0 0.0.0.0 46.1.1.2
ip route-static 172.16.64.0 255.255.224.0 NULL0
#
AR7
#
ip route-static 0.0.0.0 0.0.0.0 47.1.1.2
ip route-static 172.168.96.0 255.255.224.0 NULL0
#
3、配置MGRE环境
AR3
#
interface Tunnel0/0/0
ip address 172.16.0.129 255.255.255.248
tunnel-protocol gre p2mp
source 34.1.1.1
ospf network-type broadcast
nhrp entry multicast dynamic
#
AR5
#
interface Tunnel0/0/0
ip address 172.16.0.130 255.255.255.248
tunnel-protocol gre p2mp
source Serial4/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp entry 172.16.0.129 34.1.1.1 register
#
AR6
#
interface Tunnel0/0/0
ip address 172.16.0.131 255.255.255.248
tunnel-protocol gre p2mp
source Serial4/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp entry 172.16.0.129 34.1.1.1 register
#
AR7
#
interface Tunnel0/0/0
ip address 172.16.0.132 255.255.255.248
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp entry 172.16.0.129 34.1.1.1 register
#
4、配置OSPF
AR3
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
authentication-mode md5 1 cipher %$%$V2p(Ot,4>J<u_$ZlGD>Rs^P!%$%$
network 172.16.0.129 0.0.0.0
#
AR5
#
ospf 1 router-id 5.5.5.5
area 0.0.0.0
authentication-mode md5 1 cipher %$%$uJ"tD%u5=),T65/K3x91s^xE%$%$
network 172.16.0.0 0.0.255.255
#
AR6
#
ospf 1 router-id 6.6.6.6
area 0.0.0.0
authentication-mode md5 1 cipher %$%$gtkUAXe1W$Ba0*QPwH5Gs_3c%$%$
network 172.16.0.0 0.0.1.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
#
AR7
#
ospf 1 router-id 7.7.7.7
area 0.0.0.0
authentication-mode md5 1 cipher %$%$r]Q`2E"07%UJj1D-:dr;s_e1%$%$
network 172.16.0.0 0.0.3.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
#
AR1
#
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 172.16.0.0 0.0.255.255
stub
#
AR2
#
ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 172.16.0.0 0.0.255.255
stub
#
AR3
#
area 0.0.0.1
abr-summary 172.16.32.0 255.255.224.0
network 172.16.32.0 0.0.31.255
stub no-summary
#
AR11
#
ospf 1 router-id 11.11.11.11
area 0.0.0.2
network 172.16.0.0 0.0.255.255
nssa
#
AR12
#
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.64.6 0.0.0.0
nssa
#
AR8
#
ospf 1 router-id 8.8.8.8
area 0.0.0.3
network 172.16.0.0 0.0.255.255
nssa
#
AR9
#
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.96.0 0.0.0.255
nssa
##
ospf 2
default-route-advertise
area 0.0.0.4
network 172.16.128.0 0.0.1.255
#
AR10
#
ospf 1 router-id 10.10.10.10
area 0.0.0.4
network 172.16.0.0 0.0.255.255
#
5、ACL访问控制列表
AR3
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
nat outbound 2000
#
AR6
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
nat outbound 2000
#
AR7
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface GigabitEthernet0/0/0
nat outbound 2000
#
6、开启接口认证和修改hello time
进入各路由器启用接口配置该命令
#
ospf authentication-mode md5 1 cipher %$%$)&LKK$xK<!T`!]V87a#2sYKg%$%$
ospf timer hello 5
#