[r1]int loo0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1-LoopBack0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[r1]ping 12.1.1.2
PING 12.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 12.1.1.2: bytes=56 Sequence=1 ttl=255 time=120 ms
Reply from 12.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 12.1.1.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 12.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 12.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms
— 12.1.1.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/42/120 ms
[r1]bgp 1
[r1-bgp]rou
[r1-bgp]route-select
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as
[r1-bgp]peer 12.1.1.2 as-number 2
[r1]display bgp peer
BGP local router ID : 1.1.1.1
Local AS number : 1
Total number of peers : 1 Peers in established state : 0
Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv
12.1.1.2 4 2 0 0 0 00:08:43 Active
0
[r1]bgp 1
[r1-bgp]net
[r1-bgp]network 1.1.1.0 24
[r1]display bgp routing-table
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 0.0.0.0 0 0 i
*> 2.2.2.0/24 12.1.1.2 0 0 2i
*> 3.3.3.0/24 12.1.1.2 0 2i
*> 4.4.4.0/24 12.1.1.2 0 2i
*> 5.5.5.0/24 12.1.1.2 0 2 3i
[r2]int loo0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2-LoopBack0]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
Jan 28 2021 16:17:51-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 23.1.1.1 24
[r2]ping 23.1.1.2
PING 23.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 23.1.1.2: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 23.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 23.1.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 23.1.1.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 23.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms
— 23.1.1.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/32/70 ms
[r2]ospf 1 rou
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]ar 0
[r2-ospf-1-area-0.0.0.0]net
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]net
[r2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r2]display ospf peer brief
OSPF Process 1 with Router ID 2.2.2.2
Peer Statistic Information
Area Id Interface Neighbor id State
0.0.0.0 GigabitEthernet0/0/1 3.3.3.3 Full
[r2]bgp 2
[r2-bgp]rou
[r2-bgp]route-select
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 3.3.3.3 as
[r2-bgp]peer 3.3.3.3 as-number 2
[r2-bgp]peer 3.3.3.3 con
[r2-bgp]peer 3.3.3.3 connect-interface loo0
[r2]display bgp peer
BGP local router ID : 2.2.2.2
Local AS number : 2
Total number of peers : 1 Peers in established state : 0
Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv
3.3.3.3 4 2 0 0 0 00:06:38 Active
0
[r2]bgp 2
[r2-bgp]rou
[r2-bgp]route-select
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 12.1.1.1 as
[r2-bgp]peer 12.1.1.1 as-number 1
[r2]display bgp peer
BGP local router ID : 2.2.2.2
Local AS number : 2
Total number of peers : 2 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv
3.3.3.3 4 2 0 0 0 00:13:20 Active
0
12.1.1.1 4 1 2 2 0 00:00:36 Established
0
[r2]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 12.1.1.1 0 0 1i
[r2]peer 3.3.3.3 ne
[r2]peer 3.3.3.3 next
[r2]bgp 2
[r2-bgp]peer 3.3.3.3 ne
[r2-bgp]peer 3.3.3.3 next-hop-invariable
[r2-bgp]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 12.1.1.1 0 0 1i
[r2-bgp]undo peer 3.3.3.3 next-hop-invariable
[r2-bgp]peer 3.3.3.3 ne
[r2-bgp]peer 3.3.3.3 next-hop-local
[r2-bgp]peer 3.3.3.3 next-hop-local
[r2-bgp]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 12.1.1.1 0 0 1i
[r2-bgp]
[r2-bgp]peer 4.4.4.4 as 2
[r2-bgp]peer
[r2-bgp]peer 4.4.4.4 co
[r2-bgp]peer 4.4.4.4 connect-interface loo0
[r2-bgp]peer 4.4.4.4 next-hop-local
[r2-bgp]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 12.1.1.1 0 0 1i
[r2]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 12.1.1.1 0 0 1i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
[r2]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 3
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.0/24 12.1.1.1 0 0 1i
*>i 3.3.3.0/24 3.3.3.3 0 100 0 i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
[r2]bgp 2
[r2-bgp]net
[r2-bgp]network 2.2.2.0 24
[r2-bgp]network 2.2.2.0 24
[r2-bgp]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 4
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 3.3.3.0/24 3.3.3.3 0 100 0 i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
[r2-bgp]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
sy
Enter system view, return user view with Ctrl+Z.
[r2]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
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 3.3.3.0/24 3.3.3.3 0 100 0 i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
i 5.5.5.0/24 5.5.5.5 0 100 0 3i
[r2]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
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 3.3.3.0/24 3.3.3.3 0 100 0 i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
i 5.5.5.0/24 5.5.5.5 0 100 0 3i
[r2]bgp 2
[r2-bgp]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
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 3.3.3.0/24 3.3.3.3 0 100 0 i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
i 5.5.5.0/24 5.5.5.5 0 100 0 3i
[r2-bgp]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
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 3.3.3.0/24 3.3.3.3 0 100 0 i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
i 5.5.5.0/24 5.5.5.5 0 100 0 3i
[r2-bgp]display bgp routing-table
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
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 3.3.3.0/24 3.3.3.3 0 100 0 i
*>i 4.4.4.0/24 4.4.4.4 0 100 0 i
*>i 5.5.5.0/24 4.4.4.4 0 100 0 3i
[r2-bgp]
The device is running!
— 34.1.1.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/30/80 ms
[r3]ospf 1 rou
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]ar 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]net
[r3-osp