R1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned down down
GigabitEthernet0/0/1 12.1.1.1/24 up up
LoopBack0 1.1.1.1/24 up up(s)
NULL0 unassigned up up(s)
R2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.1.1.2/24 up up
GigabitEthernet0/0/1 23.1.1.1/24 up up
GigabitEthernet0/0/2 25.1.1.1/24 up up
LoopBack0 2.2.2.2/24 up up(s)
LoopBack1 172.16.0.1/19 up up(s)
R3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 23.1.1.2/24 up up
GigabitEthernet0/0/1 34.1.1.1/24 up up
LoopBack0 3.3.3.3/24 up up(s)
LoopBack1 172.16.32.1/19 up up(s)
R4
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 34.1.1.2/24 up up
GigabitEthernet0/0/1 47.1.1.1/24 up up
LoopBack0 4.4.4.4/24 up up(s)
LoopBack1 172.16.64.1/19 up up(s)
R5
GigabitEthernet0/0/0 25.1.1.2/24 up up
GigabitEthernet0/0/1 56.1.1.1/24 up up
LoopBack0 5.5.5.5/24 up up(s)
LoopBack1 172.16.96.1/19 up up(s)
R6
GigabitEthernet0/0/0 56.1.1.2/24 up up
GigabitEthernet0/0/1 67.1.1.1/24 up up
LoopBack0 6.6.6.6/24 up up(s)
LoopBack1 172.16.128.1/19 up up(s)
R7
GigabitEthernet0/0/0 67.1.1.2/24 up up
GigabitEthernet0/0/1 78.1.1.1/24 up up
GigabitEthernet0/0/2 47.1.1.2/24 up up
LoopBack0 7.7.7.7/24 up up(s)
LoopBack1 172.16.160.1/19 up up(s)
R8
GigabitEthernet0/0/0 78.1.1.2/24 up up
LoopBack0 8.8.8.8/24 up up(s)
[Huawei-bgp]display bgp peer
BGP local router ID : 2.2.2.2
Local AS number : 64512
Total number of peers : 3 Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv
3.3.3.3 4 64512 39 40 0 00:34:05 Established
1
5.5.5.5 4 64513 41 42 0 00:34:03 Established
2
12.1.1.1 4 1 37 40 0 00:34:30 Established
1
R2的BGP路由表
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 12.1.1.1 0 0 1i
*> 2.2.2.0/24 0.0.0.0 0 0 i
*>i 8.8.8.0/24 7.7.7.7 0 100 0 (64513) 3i
*> 172.16.0.0 127.0.0.1 0 i
* i 3.3.3.3 100 0 i
* i 5.5.5.5 100 0 (64513)i
s> 172.16.0.0/19 0.0.0.0 0 0 i
测试
R1-R8
<Huawei>ping -a
<Huawei>ping -a 1.1.1.1 8.8.8.8
PING 8.8.8.8: 56 data bytes, press CTRL_C to break
Reply from 8.8.8.8: bytes=56 Sequence=1 ttl=251 time=70 ms
Reply from 8.8.8.8: bytes=56 Sequence=2 ttl=251 time=30 ms
Reply from 8.8.8.8: bytes=56 Sequence=3 ttl=251 time=40 ms
Reply from 8.8.8.8: bytes=56 Sequence=4 ttl=251 time=40 ms
Reply from 8.8.8.8: bytes=56 Sequence=5 ttl=251 time=40 ms
--- 8.8.8.8 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/44/70 ms
R1-R4
<Huawei>ping -a 1.1.1.1 172.16.64.1
PING 172.16.64.1: 56 data bytes, press CTRL_C to break
Reply from 172.16.64.1: bytes=56 Sequence=1 ttl=253 time=40 ms
Reply from 172.16.64.1: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 172.16.64.1: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 172.16.64.1: bytes=56 Sequence=4 ttl=253 time=20 ms
Reply from 172.16.64.1: bytes=56 Sequence=5 ttl=253 time=30 ms
--- 172.16.64.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/30/40 ms
R1-R7
<Huawei>ping -a 1.1.1.1 172.16.160.1
PING 172.16.160.1: 56 data bytes, press CTRL_C to break
Reply from 172.16.160.1: bytes=56 Sequence=1 ttl=252 time=50 ms
Reply from 172.16.160.1: bytes=56 Sequence=2 ttl=252 time=30 ms
Reply from 172.16.160.1: bytes=56 Sequence=3 ttl=252 time=40 ms
Reply from 172.16.160.1: bytes=56 Sequence=4 ttl=252 time=50 ms
Reply from 172.16.160.1: bytes=56 Sequence=5 ttl=252 time=40 ms
--- 172.16.160.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/42/50 ms