AR1:
[Huawei]bgp 1
[Huawei-bgp]router-id 1.1.1.1
[Huawei-bgp]peer 12.1.1.2 as-number 2
[Huawei-bgp]network 10.1.1.1 24---宣告
AR8:
[Huawei]bgp 3
[Huawei-bgp]router-id 8.8.8.8
[Huawei-bgp]peer 78.1.1.7 as-number 2
[Huawei-bgp]network 11.1.1.8 24---宣告
AR2:
[Huawei]bgp 64512
[Huawei-bgp]router-id 2.2.2.2
[Huawei-bgp]confederation id 2
[Huawei-bgp]peer 12.1.1.1 as-number 1
[Huawei-bgp]peer 3.3.3.3 as-number 64512.
May 20 2024 17:17:49-08:00 Huawei %%01BGP/3/STATE_CHG_UPDOWN(l)[3]:The status of
the peer 12.1.1.1 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public
, StateChangeReason=Up)
[Huawei-bgp]peer 3.3.3.3 connect-interface LoopBack 1
[Huawei-bgp]peer 3.3.3.3 next-hop-local
[Huawei-bgp]confederation peer-as 64513
[Huawei-bgp]peer 5.5.5.5 as-number 64513
[Huawei-bgp]peer 5.5.5.5 connect-interface LoopBack 1
[Huawei-bgp]peer 5.5.5.5 ebgp-max-hop
AR3:
[Huawei]bgp 64512
[Huawei-bgp]confederation id 2
[Huawei-bgp]peer 2.2.2.2 as-number 64512
[Huawei-bgp]peer 2.2.2.2 connect-interface LoopBack 1[Huawei]bgp 64512
[Huawei-bgp]confederation id 2
[Huawei-bgp]peer 4.4.4.4 as-number 64512
[Huawei-bgp]peer 4.4.4.4 connect-interface LoopBack 1
[Huawei-bgp]peer 4.4.4.4 next-hop-local
[Huawei-bgp]peer 4.4.4.4 reflect-client
AR5:
[Huawei]bgp 64513
[Huawei-bgp]router 5.5.5.5
[Huawei-bgp]confederation id 2
[Huawei-bgp]confederation peer-as 64512
[Huawei-bgp]peer 2.2.2.2 as-number 64512
[Huawei-bgp]peer 2.2.2.2 connect-interface LoopBack 1
[Huawei-bgp]peer 2.2.2.2 ebgp-max-hop
[Huawei-bgp]peer 6.6.6.6 as-number 64513
[Huawei-bgp]peer 6.6.6.6 connect-interface LoopBack 1
[Huawei-bgp]peer 6.6.6.6 next-hop-local
AR6:
[Huawei]bgp 64513
[Huawei-bgp]confederation id 2
[Huawei-bgp]peer 5.5.5.5 as-number 64513
[Huawei-bgp]peer 5.5.5.5 connect-interface LoopBack 1
[Huawei-bgp]peer 5.5.5.5 next-hop-local ----与AR5建立邻居关系
[Huawei-bgp]peer 7.7.7.7 as-number 64513
[Huawei-bgp]peer 7.7.7.7 connect-interface LoopBack 1
[Huawei-bgp]peer 7.7.7.7 next-hop-local
[Huawei-bgp]peer 6.6.6.6 reflect-client
AR7:
[Huawei]bgp 64513
[Huawei-bgp]confederation id 2
[Huawei-bgp]router-id 7.7.7.7
[Huawei-bgp]peer 78.1.1.8 as-number 3
[Huawei-bgp]peer 6.6.6.6 as-number 64513
[Huawei-bgp]peer 6.6.6.6 connect-interface LoopBack 1
[Huawei-bgp]peer 6.6.6.6 next-hop-local[Huawei-bgp]confederation peer-as 64512
[Huawei-bgp]peer 4.4.4.4 as-number 64512
[Huawei-bgp]peer 4.4.4.4 connect-interface LoopBack 1
[Huawei-bgp]peer 4.4.4.4 ebgp-max-hop
AR4:
[Huawei]bgp 64512
[Huawei-bgp]confederation id 2
[Huawei-bgp]peer 3.3.3.3 as-number 64512
[Huawei-bgp]peer 3.3.3.3 connect-interface LoopBack 1
[Huawei-bgp]peer 3.3.3.3 next-hop-local
[Huawei-bgp]confederation peer-as 64513
[Huawei-bgp]peer 7.7.7.7 as-number 64513
[Huawei-bgp]peer 7.7.7.7 connect-interface LoopBack 1
[Huawei-bgp]peer 7.7.7.7 ebgp-max-hop
AR2:汇总
[Huawei]ip route-static 172.16.192.0 19 NULL 0
[Huawei]bgp 64512
[Huawei-bgp]network 172.16.192.0 19
AR7:宣告
[Huawei-bgp]network 172.16.192.0 19
利用tunnel隧道使192.168.1.0和192.168.2.0能够相互访问:
AR1:
[Huawei-Tunnel0/0/1]ip address 18.18.18.1 24
[Huawei-Tunnel0/0/1]tunnel-protocol gre
[Huawei-Tunnel0/0/1]source 10.1.1.1[Huawei-Tunnel0/0/1]destination 11.1.1.8
[Huawei]ip route-static 192.168.1.1 24 18.18.18.8
AR2:
[Huawei-Tunnel0/0/1]ip address 18.18.18.8 24
[Huawei-Tunnel0/0/1]tunnel-protocol gre
[Huawei-Tunnel0/0/1]source 11.1.1.8[Huawei-Tunnel0/0/1]destination 10.1.1.1
[Huawei]ip route-static 192.168.2.8 24 18.18.18.1