华为ensp BGP 练习实验
实验要求
1.AS1存在两个环回,一个地址为192.168.1.0/24该地址不能在任何协议中宣告AS3存在两个环回,一个地址为192.168.2.0/24该地址不能在任何协议中宣告最终要求这两介环回可以互相通讯;
AS1的另一个环回为10.1.1.0/24,AS3的另一个环回为10.1.2.0/242、整个AS2的ip地址为192.168.0.0.请合理划分
3、AS间的骨干链路ip地址随意定制
4、使用BGP协议让整个网络所有设备的环回可以相互访问5、减少条目数量,避免环路出现
实验拓扑
实验配置
AR1
[Huawei]display 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 12.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 192.168.1.1 255.255.255.0
#
interface LoopBack1
ip address 10.1.1.1 255.255.255.0
#
bgp 1
router-id 1.1.1.1
peer 12.1.1.2 as-number 2
#
ipv4-family unicast
undo synchronization
network 10.0.0.0
network 10.1.1.0 255.255.255.0
peer 12.1.1.2 enable
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR2
[Huawei]display 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 192.168.0.1 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 192.168.0.17 255.255.255.252
#
interface NULL0
#
interface LoopBack0
ip address 192.168.2.1 255.255.255.0
#
bgp 64512
confederation id 2
confederation peer-as 64513
peer 12.1.1.1 as-number 1
peer 192.168.3.1 as-number 64512
peer 192.168.3.1 connect-interface LoopBack0
peer 192.168.5.1 as-number 64513
peer 192.168.5.1 ebgp-max-hop 255
peer 192.168.5.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 192.168.0.0 255.255.248.0
peer 12.1.1.1 enable
peer 192.168.3.1 enable
peer 192.168.3.1 next-hop-local
peer 192.168.5.1 enable
peer 192.168.5.1 next-hop-local
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 192.168.0.0 0.0.255.255
#
ip route-static 192.168.0.0 255.255.248.0 NULL0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR3
[Huawei]display 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 192.168.0.5 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 192.168.0.2 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 192.168.3.1 255.255.255.0
#
bgp 64512
confederation id 2
peer 192.168.2.1 as-number 64512
peer 192.168.2.1 connect-interface LoopBack0
peer 192.168.4.1 as-number 64512
peer 192.168.4.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 192.168.2.1 enable
peer 192.168.2.1 reflect-client
peer 192.168.4.1 enable
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 192.168.0.0 0.0.255.255
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR4
[Huawei]display 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 192.168.0.21 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 192.168.0.6 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 192.168.4.1 255.255.255.0
#
bgp 64512
confederation id 2
confederation peer-as 64513
peer 192.168.3.1 as-number 64512
peer 192.168.3.1 connect-interface LoopBack0
peer 192.168.7.1 as-number 64513
peer 192.168.7.1 ebgp-max-hop 255
peer 192.168.7.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 192.168.3.1 enable
peer 192.168.7.1 enable
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 192.168.0.0 0.0.255.255
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR5
[Huawei]display 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 192.168.0.9 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 192.168.0.18 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 192.168.5.1 255.255.255.0
#
bgp 64513
confederation id 2
confederation peer-as 64512
peer 192.168.2.1 as-number 64512
peer 192.168.2.1 ebgp-max-hop 255
peer 192.168.2.1 connect-interface LoopBack0
peer 192.168.6.1 as-number 64513
peer 192.168.6.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 192.168.2.1 enable
peer 192.168.6.1 enable
peer 192.168.6.1 next-hop-local
#
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 192.168.0.0 0.0.255.255
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR6
[Huawei]display 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 192.168.0.13 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 192.168.0.10 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 192.168.6.1 255.255.255.0
#
bgp 64513
confederation id 2
peer 192.168.5.1 as-number 64513
peer 192.168.5.1 connect-interface LoopBack0
peer 192.168.7.1 as-number 64513
peer 192.168.7.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 192.168.5.1 enable
peer 192.168.5.1 reflect-client
peer 192.168.7.1 enable
peer 192.168.7.1 next-hop-local
#
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 192.168.0.0 0.0.255.255
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR7
[Huawei]display 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 78.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.0.22 255.255.255.252
#
interface GigabitEthernet0/0/2
ip address 192.168.0.14 255.255.255.252
#
interface NULL0
#
interface LoopBack0
ip address 192.168.7.1 255.255.255.0
#
bgp 64513
confederation id 2
confederation peer-as 64512
peer 78.1.1.2 as-number 3
peer 192.168.4.1 as-number 64512
peer 192.168.4.1 ebgp-max-hop 255
peer 192.168.4.1 connect-interface LoopBack0
peer 192.168.6.1 as-number 64513
peer 192.168.6.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 192.168.0.0 255.255.248.0
peer 78.1.1.2 enable
peer 192.168.4.1 enable
peer 192.168.4.1 next-hop-local
peer 192.168.6.1 enable
peer 192.168.6.1 next-hop-local
#
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 192.168.0.0 0.0.255.255
#
ip route-static 192.168.0.0 255.255.248.0 NULL0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
AR8
[Huawei]display 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
#
interface GigabitEthernet0/0/1
ip address 78.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 192.168.8.1 255.255.255.0
#
interface LoopBack1
ip address 10.1.2.1 255.255.255.0
#
bgp 3
peer 78.1.1.1 as-number 2
#
ipv4-family unicast
undo synchronization
network 10.1.2.0 255.255.255.0
peer 78.1.1.1 enable
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
实验结果测试