1、实验拓扑
实验目的
1、R4为ISP,其上只能配置IP地址,R4与其他所有直连设备间使用公有IP
2、R3—R5/6/7为MGRE环境,R3为中心站点
3、整个OSPF环境IP地址为172.16.0.0/16
4、所有设备均可访问R4的环回;
5、减少LSA的更新量,加快收敛,保障更新安全
6、全网可达
实验步骤
1、合理的IP地址规划
- 根据实际工程,一般用户网段用户为24/25/26
- 一个大网络按区域划分给每个区域·
- 每个区域内部划分的用户网段的前两个给骨干,其余给用户
2、实验配置
R1:
<Huawei>dis current-configuration
[V200R003C00]
#
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 172.16.36.1 255.255.252.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.40.1 255.255.252.0
#
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 172.16.36.1 0.0.0.0
network 172.16.40.1 0.0.0.0
stub no-summary
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
R2:
<Huawei>dis current-configuration
[V200R003C00]
#
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 172.16.44.1 255.255.252.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.48.1 255.255.252.0
#
ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 172.16.44.1 0.0.0.0
network 172.16.48.1 0.0.0.0
stub no-summary
#
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 10 permit source 172.16.32.0 0.0.31.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 GigabitEthernet0/0/0
ip address 172.16.36.2 255.255.252.0
nat outbound 2000
#
interface GigabitEthernet0/0/1
ip address 172.16.44.2 255.255.252.0
#
interface GigabitEthernet0/0/2
ip address 12.1.1.1 255.255.255.0
nat outbound 2000
#
interface NULL0
#
interface LoopBack0
ip address 172.16.32.1 255.255.252.0
#
interface Tunnel0/0/0
ip address 172.16.0.1 255.255.248.0
tunnel-protocol gre p2mp
source 12.1.1.1
ospf network-type broadcast
nhrp entry multicast dynamic
nhrp network-id 100
#
ospf 1 router-id 3.3.3.3
default-route-advertise
area 0.0.0.0
network 172.16.0.1 0.0.0.0
area 0.0.0.1
abr-summary 172.16.32.0 255.255.224.0
network 172.16.32.1 0.0.0.0
network 172.16.36.2 0.0.0.0
network 172.16.44.2 0.0.0.0
stub no-summary
#
ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R4:
<Huawei>dis cu
[V200R003C00]
#
board add 0/4 1GEC
#
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 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 13.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 14.1.1.1 255.255.255.0
#
interface GigabitEthernet4/0/0
ip address 15.1.1.1 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R5:
<Huawei>dis cu
[V200R003C00]
#
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 172.16.24.0 0.0.7.155
rule 10 permit source 172.16.24.0 0.0.7.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 GigabitEthernet0/0/0
ip address 13.1.1.2 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.24.1 255.255.248.0
#
interface Tunnel0/0/0
ip address 172.16.0.2 255.255.248.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 100
nhrp entry 172.16.0.1 12.1.1.1 register
#
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 172.16.0.2 0.0.0.0
network 172.16.24.1 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 13.1.1.1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R6:
<R6>dis cu
[V200R003C00]
#
sysname R6
#
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 172.16.64.0 0.0.31.255
rule 10 permit source 172.16.160.0 0.0.31.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 GigabitEthernet0/0/0
ip address 14.1.1.2 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/1
ip address 172.16.64.1 255.255.248.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.16.1 255.255.248.0
#
interface Tunnel0/0/0
ip address 172.16.0.3 255.255.248.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 100
nhrp entry 172.16.0.1 12.1.1.1 register
#
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 172.16.0.3 0.0.0.0
network 172.16.16.1 0.0.0.0
area 0.0.0.2
abr-summary 172.16.64.0 255.255.224.0
network 172.16.64.1 0.0.0.0
nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 14.1.1.1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R7:
<Huawei>dis cu
[V200R003C00]
#
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 172.16.96.0 0.0.31.255
rule 10 permit source 172.16.128.0 0.0.31.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 GigabitEthernet0/0/0
ip address 15.1.1.2 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/1
ip address 172.16.96.1 255.255.248.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.8.1 255.255.248.0
#
interface Tunnel0/0/0
ip address 172.16.0.4 255.255.248.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type broadcast
ospf dr-priority 0
nhrp network-id 100
nhrp entry 172.16.0.1 12.1.1.1 register
#
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 172.16.0.4 0.0.0.0
network 172.16.8.1 0.0.0.0
area 0.0.0.3
abr-summary 172.16.96.0 255.255.224.0
network 172.16.96.1 0.0.0.0
nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 15.1.1.1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R8:
<Huawei>dis cu
[V200R003C00]
#
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 172.16.96.2 255.255.248.0
#
interface GigabitEthernet0/0/1
ip address 172.16.112.1 255.255.248.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.104.1 255.255.248.0
#
ospf 1 router-id 8.8.8.8
area 0.0.0.2
nssa
area 0.0.0.3
network 172.16.96.2 0.0.0.0
network 172.16.104.1 0.0.0.0
network 172.16.112.1 0.0.0.0
nssa
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R9:
<Huawei>dis cu
[V200R003C00]
#
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 172.16.112.2 255.255.248.0
#
interface GigabitEthernet0/0/1
ip address 172.16.136.1 255.255.248.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.128.1 255.255.248.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.112.2 0.0.0.0
nssa
area 0.0.0.4
#
ospf 2 router-id 9.9.9.1
default-route-advertise
import-route ospf 1
area 0.0.0.4
network 172.16.128.1 0.0.0.0
network 172.16.136.1 0.0.0.0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R10:
<Huawei>dis cu
[V200R003C00]
#
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 172.16.136.2 255.255.248.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.144.1 255.255.248.0
#
ospf 1 router-id 10.10.10.10
area 0.0.0.4
network 172.16.136.2 0.0.0.0
network 172.16.144.1 0.0.0.0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R11:
<Huawei>dis cu
[V200R003C00]
#
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 172.16.64.2 255.255.248.0
#
interface GigabitEthernet0/0/1
ip address 172.16.80.1 255.255.248.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.72.1 255.255.248.0
#
ospf 1 router-id 11.11.11.11
area 0.0.0.2
network 172.16.64.2 0.0.0.0
network 172.16.72.1 0.0.0.0
network 172.16.80.1 0.0.0.0
nssa
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R12:
<Huawei>dis cu
[V200R003C00]
#
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 172.16.80.2 255.255.248.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 172.16.160.1 255.255.240.0
#
interface LoopBack1
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.80.2 0.0.0.0
nssa
#
rip 1
version 2
network 172.16.0.0
import-route ospf 1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return