一.实验拓扑
二.实验要求
1.R6为ISP只能配置IP地址,R1-R5的环回为私有网段;
2.R1/4/5为全连的MGRE结构,R1/2/3为星型的拓扑结构,R1为中心站点;
3.所有私有网段可以互相通讯,私有网段使用OSPF。
三.路由器配置
R1
R1
[V200R003C00]
#
sysname R1
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 16.0.0.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 16.16.0.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 10.0.0.1 255.255.255.0
tunnel-protocol gre p2mp
source 16.0.0.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 10.0.0.2 46.0.0.1 register
nhrp entry 10.0.0.3 56.0.0.1 register
#
interface Tunnel0/0/1
ip address 20.0.0.1 255.255.255.0
tunnel-protocol gre p2mp
source 16.16.0.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 200
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.0.1 0.0.0.0
network 20.0.0.1 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 16.0.0.2
ip route-static 0.0.0.0 0.0.0.0 16.16.0.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R2
[V200R003C00]
#
sysname R2
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 26.0.0.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.0
#
interface Tunnel0/0/1
ip address 20.0.0.2 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 200
nhrp entry 20.0.0.1 16.16.0.1 register
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 20.0.0.2 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 26.0.0.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R3
[V200R003C00]
#
sysname R3
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 36.0.0.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.0
#
interface Tunnel0/0/1
ip address 20.0.0.3 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 200
nhrp entry 20.0.0.1 16.16.0.1 register
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 20.0.0.3 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 36.0.0.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R4
[V200R003C00]
#
sysname R4
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 46.0.0.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.0
#
interface Tunnel0/0/0
ip address 10.0.0.2 255.255.255.0
tunnel-protocol gre p2mp
source 46.0.0.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 10.0.0.3 56.0.0.1 register
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.0.0.2 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 46.0.0.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R5
[V200R003C00]
#
sysname R5
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 56.0.0.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.0
#
interface Tunnel0/0/0
ip address 10.0.0.3 255.255.255.0
tunnel-protocol gre p2mp
source 56.0.0.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
#
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 5.5.5.5 0.0.0.0
network 10.0.0.3 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 56.0.0.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R6
[V200R003C00]
#
sysname R6
#
board add 0/4 4GET
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 16.0.0.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 16.16.0.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 56.0.0.2 255.255.255.0
#
interface GigabitEthernet4/0/0
ip address 46.0.0.2 255.255.255.0
#
interface GigabitEthernet4/0/1
ip address 36.0.0.2 255.255.255.0
#
interface GigabitEthernet4/0/2
ip address 26.0.0.2 255.255.255.0
#
interface GigabitEthernet4/0/3
#
interface NULL0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
四.实验结果
1.通过配置ip和缺省使公网通
2.R1,R4,R5全连,故需要将接口改为broadcast,因为MGRE构建的网络类似与一个NBMA的网络,所以不支持广播和组播,因此要开启伪广播。因为全连,所以需要互相注册。
3.因为R1,R2,R3为星型的拓扑结构,所以可能会出现DR的选举错误,此时需要将R2、R3的tunnel接口的优先级改为0,使他们不参与选举,致使R1成为DR,另外R2、R3需要到R1去注册,同样需要将接口类型切换为broadcast,并且也要开启伪广播。
4.配置完ospf后