需求
1 AS1存在两个环回,一个地址为192.168.1.0/24,该地址不能再任何协议中宣告
AS3存在两个环回,一个地址为192.168.2.0/24,该地址不能再任何协议中宣告
AS1还有一个环回地址为10.1.1.0/24,AS3另一个环回地址是11.1.1.0/24
最终要求这两个环回可以互相通讯。
2 整个AS2的IP地址为172.16.0.0/16
3 AS间的骨干链路IP地址随意分配
4 使用BGP协议让整个网络所有设备的环回可以互相访问
5 减少路由条目数量,避免环路出现
R1
[V200R003C00]
#sysname R1
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0ip address 192.168.1.1 255.255.255.0
#
interface LoopBack1ip address 10.1.1.1 255.255.255.0
#
interface LoopBack2ip address 1.1.1.1 255.255.255.0
#
bgp 1router-id 1.1.1.1peer 172.16.2.1 as-number 2 peer 172.16.2.1 ebgp-max-hop 2 peer 172.16.2.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationnetwork 10.1.1.0 255.255.255.0 peer 172.16.2.1 enable
#
ip route-static 172.16.2.1 255.255.255.255 12.0.0.2
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R2
[V200R003C00]
#sysname R2
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 172.16.0.9 255.255.255.252
#
interface GigabitEthernet0/0/2ip address 172.16.0.1 255.255.255.252
#
interface NULL0
#
interface LoopBack0ip address 172.16.2.1 255.255.255.0
#
interface LoopBack2ip address 2.2.2.2 255.255.255.0
#
bgp 64512router-id 2.2.2.2confederation id 2confederation peer-as 64513peer 172.16.3.1 as-number 64512 peer 172.16.3.1 connect-interface LoopBack0peer 172.16.5.1 as-number 64513 peer 172.16.5.1 ebgp-max-hop 255 peer 172.16.5.1 connect-interface LoopBack0peer 192.168.1.1 as-number 1 peer 192.168.1.1 ebgp-max-hop 2 peer 192.168.1.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationnetwork 172.16.0.0 255.255.248.0 peer 172.16.3.1 enablepeer 172.16.3.1 next-hop-local peer 172.16.5.1 enablepeer 172.16.5.1 next-hop-local peer 192.168.1.1 enable
#
ospf 1 router-id 2.2.2.2 area 0.0.0.0 network 172.16.0.0 0.0.255.255
#
ip route-static 172.16.0.0 255.255.248.0 NULL0
ip route-static 192.168.1.1 255.255.255.255 12.0.0.1
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R3
[V200R003C00]
#sysname R3
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 172.16.0.2 255.255.255.252
#
interface GigabitEthernet0/0/1ip address 172.16.0.5 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0ip address 172.16.3.1 255.255.255.0
#
bgp 64512router-id 3.3.3.3confederation id 2peer 172.16.2.1 as-number 64512 peer 172.16.2.1 connect-interface LoopBack0peer 172.16.4.1 as-number 64512 peer 172.16.4.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationpeer 172.16.2.1 enablepeer 172.16.2.1 reflect-clientpeer 172.16.4.1 enablepeer 172.16.4.1 reflect-client
#
ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 172.16.0.0 0.0.255.255
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R4
[V200R003C00]
#sysname R4
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 172.16.0.6 255.255.255.252
#
interface GigabitEthernet0/0/1ip address 172.16.0.13 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0ip address 172.16.4.1 255.255.255.0
#
bgp 64512router-id 4.4.4.4confederation id 2confederation peer-as 64513peer 172.16.3.1 as-number 64512 peer 172.16.3.1 connect-interface LoopBack0peer 172.16.7.1 as-number 64513 peer 172.16.7.1 ebgp-max-hop 255 peer 172.16.7.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationpeer 172.16.3.1 enablepeer 172.16.3.1 next-hop-local peer 172.16.7.1 enable
#
ospf 1 router-id 4.4.4.4 area 0.0.0.0 network 172.16.0.0 0.0.255.255
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R5
[V200R003C00]
#sysname R5
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 172.16.9.10 255.255.255.252
#
interface GigabitEthernet0/0/1ip address 172.16.0.17 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0ip address 172.16.5.1 255.255.255.0
#
bgp 64513router-id 5.5.5.5confederation id 2confederation peer-as 64512peer 172.16.2.1 as-number 64512 peer 172.16.2.1 ebgp-max-hop 255 peer 172.16.2.1 connect-interface LoopBack0peer 172.16.6.1 as-number 64513 peer 172.16.6.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationpeer 172.16.2.1 enablepeer 172.16.6.1 enablepeer 172.16.6.1 next-hop-local
#
ospf 1 router-id 5.5.5.5 area 0.0.0.0 network 172.16.0.0 0.0.255.255
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R6
[V200R003C00]
#sysname R6
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 172.16.0.18 255.255.255.252
#
interface GigabitEthernet0/0/1ip address 172.16.0.21 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0ip address 172.16.6.1 255.255.255.0
#
bgp 64513router-id 6.6.6.6confederation id 2peer 172.16.5.1 as-number 64513 peer 172.16.5.1 connect-interface LoopBack0peer 172.16.7.1 as-number 64513 peer 172.16.7.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationpeer 172.16.5.1 enablepeer 172.16.5.1 reflect-clientpeer 172.16.7.1 enablepeer 172.16.7.1 reflect-client
#
ospf 1 router-id 6.6.6.6 area 0.0.0.0 network 172.16.0.0 0.0.255.255
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R7
[V200R003C00]
#sysname R7
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 172.16.0.22 255.255.255.252
#
interface GigabitEthernet0/0/1ip address 172.16.0.14 255.255.255.252
#
interface GigabitEthernet0/0/2ip address 78.1.1.7 255.255.255.0
#
interface NULL0
#
interface LoopBack0ip address 172.16.7.1 255.255.255.0
#
bgp 64513confederation id 2confederation peer-as 64512peer 172.16.4.1 as-number 64512 peer 172.16.4.1 ebgp-max-hop 255 peer 172.16.4.1 connect-interface LoopBack0peer 172.16.6.1 as-number 64513 peer 172.16.6.1 connect-interface LoopBack0peer 192.168.2.1 as-number 3 peer 192.168.2.1 ebgp-max-hop 2 peer 192.168.2.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationnetwork 172.16.0.0 255.255.248.0 peer 172.16.4.1 enablepeer 172.16.4.1 next-hop-local peer 172.16.6.1 enablepeer 172.16.6.1 next-hop-local peer 192.168.2.1 enable
#
ospf 1 router-id 7.7.7.7 area 0.0.0.0 network 172.16.0.0 0.0.255.255
#
ip route-static 172.16.0.0 255.255.248.0 NULL0
ip route-static 192.168.2.1 255.255.255.255 78.0.0.8
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R8
[V200R003C00]
#sysname R8
#snmp-agent local-engineid 800007DB03000000000000snmp-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 defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Localpriority 15
#
interface GigabitEthernet0/0/0ip address 78.1.1.8 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0ip address 192.168.2.1 255.255.255.0
#
interface LoopBack1ip address 11.1.1.1 255.255.255.0
#
bgp 3router-id 8.8.8.8peer 172.16.7.1 as-number 2 peer 172.16.7.1 ebgp-max-hop 2 peer 172.16.7.1 connect-interface LoopBack0#ipv4-family unicastundo synchronizationnetwork 11.1.1.0 255.255.255.0 peer 172.16.7.1 enable
#
ip route-static 172.16.7.1 255.255.255.255 78.0.0.7
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return