OSPF接口网络类型实验
1.实验要求
2.实验拓扑图
本图中已经标明各网段地址
3.R1到R6路由器上的相关配置
R1
dis current-configuration
[V200R003C00]
sysname R1
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
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
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 Ethernet0/0/0
interface Ethernet0/0/1
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface GigabitEthernet0/0/0
ip address 61.1.1.1 255.255.255.0
nat outbound 2000
interface GigabitEthernet0/0/1
ip address 16.1.1.1 255.255.255.0
nat outbound 2000
interface NULL0
interface LoopBack0
ip address 192.168.1.1 255.255.255.0
interface Tunnel0/0/0
ip address 10.1.1.1 255.255.255.0
tunnel-protocol gre p2mp
source 61.1.1.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
interface Tunnel0/0/1
ip address 10.1.2.1 255.255.255.0
tunnel-protocol gre p2mp
source 16.1.1.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.1.1.1 0.0.0.0
network 10.1.2.1 0.0.0.0
network 16.1.1.1 0.0.0.0
network 61.1.1.1 0.0.0.0
network 192.168.1.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 61.1.1.2
ip route-static 0.0.0.0 0.0.0.0 16.1.1.2
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
wlan ac
return
R2
dis current-configuration
[V200R003C00]
sysname R2
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
acl number 2000
rule 5 permit source 192.168.2.0 0.0.0.255
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 Ethernet0/0/0
interface Ethernet0/0/1
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface GigabitEthernet0/0/0
ip address 26.1.1.1 255.255.255.0
nat outbound 2000
interface GigabitEthernet0/0/1
interface NULL0
interface LoopBack0
ip address 192.168.2.1 255.255.255.0
interface Tunnel0/0/1
ip address 10.1.2.1 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 100
nhrp entry 10.1.2.1 16.1.1.1 register
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.2.2 0.0.0.0
network 26.1.1.1 0.0.0.0
network 192.168.2.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 26.1.1.2
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
wlan ac
return
R3
R3>dis current-configuration
[V200R003C00]
sysname R3
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
acl number 2000
rule 5 permit source 192.168.3.0 0.0.0.255
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 Ethernet0/0/0
interface Ethernet0/0/1
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface GigabitEthernet0/0/0
ip address 36.1.1.1 255.255.255.0
nat outbound 2000
interface GigabitEthernet0/0/1
interface NULL0
interface LoopBack0
ip address 192.168.3.1 255.255.255.0
interface Tunnel0/0/1
ip address 10.1.2.3 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 100
nhrp entry 10.1.2.1 16.1.1.1 register
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.1.2.3 0.0.0.0
network 36.1.1.1 0.0.0.0
network 192.168.3.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 36.1.1.2
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
wlan ac
return
R4
dis current-configuration
[V200R003C00]
sysname R4
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
acl number 2000
rule 5 permit source 192.168.4.0 0.0.0.255
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 Ethernet0/0/0
interface Ethernet0/0/1
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface GigabitEthernet0/0/0
ip address 46.1.1.1 255.255.255.0
nat outbound 2000
interface GigabitEthernet0/0/1
interface NULL0
interface LoopBack0
ip address 192.168.4.1 255.255.255.0
interface Tunnel0/0/0
ip address 10.1.1.3 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
nhrp network-id 100
nhrp entry 10.1.1.1 61.1.1.1 register
nhrp entry 10.1.1.2 56.1.1.1 register
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 10.1.1.3 0.0.0.0
network 46.1.1.1 0.0.0.0
network 192.168.4.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 46.1.1.2
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
wlan ac
return
R5
dis current-configuration
[V200R003C00]
sysname R5
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
acl number 2000
rule 5 permit source 192.168.5.0 0.0.0.255
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 Ethernet0/0/0
interface Ethernet0/0/1
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface GigabitEthernet0/0/0
ip address 56.1.1.1 255.255.255.0
nat outbound 2000
interface GigabitEthernet0/0/1
interface NULL0
interface LoopBack0
ip address 192.168.5.1 255.255.255.0
interface Tunnel0/0/0
ip address 10.1.1.2 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
nhrp entry 10.1.1.1 61.1.1.1 register
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 10.1.1.2 0.0.0.0
network 56.1.1.1 0.0.0.0
network 192.168.5.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 56.1.1.2
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
wlan ac
return
R6
dis current-configuration
dis current-configuration
[V200R003C00]
sysname R6
board add 0/2 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 Ethernet0/0/0
interface Ethernet0/0/1
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface GigabitEthernet0/0/0
ip address 16.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 61.1.1.2 255.255.255.0
interface GigabitEthernet2/0/0
ip address 26.1.1.2 255.255.255.0
interface GigabitEthernet2/0/1
ip address 36.1.1.2 255.255.255.0
interface GigabitEthernet2/0/2
ip address 46.1.1.2 255.255.255.0
interface GigabitEthernet2/0/3
ip address 56.1.1.2 255.255.255.0
interface NULL0
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 16.1.1.2 0.0.0.0
network 26.1.1.2 0.0.0.0
network 36.1.1.2 0.0.0.0
network 46.1.1.2 0.0.0.0
network 56.1.1.2 0.0.0.0
network 61.1.1.2 0.0.0.0
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
wlan ac
return
4.对实验的总结
(1)在本次实验中,R1-4-5为跨越公网的全连网络结构,需要使用到MGRE环境,MGRE环境为NBMA网络,构建全连的MGRE环境需要在R1和R5上开启伪广播,使R5和R4只找R1注册,R4找R5注册,形成全连网状结构域。在OSPF中,NBMA网络的工作方式为P2P,只允许建立一个邻居,此时应将Tunnel工作方式修改为广播类型,使其可以与多个路由器建邻。
(2)R1/R2/R3形成星型结构,使R2和R3分别找R1注册,并将Tunnel工作方式修改为广播类型,但是此时R1/R2/R3建邻时会出现DR位置不正确的问题,此时我们可以调整R2和R3的优先级来改变选举结果,将隧道选举DR接口优先级调整为0,表示不参与选举,并将DR放在中心站点上。