一、实验拓扑图
二、实验需求
三、实验思路
1.配置接口IP与环回IP
2.在R2、R3、R4上宣告OSPF
3.在R1和R2上建立直连EBGP
4、R4到R5写静态路由
5、R2、R3、R4、R5使用环回建立BGP邻居关系
6、宣告路由
四、实验步骤
1.配置IP
R1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R1
[R1]in
[R1]int lo0
[R1-LoopBack0]ip
[R1-LoopBack0]ip add
[R1-LoopBack0]ip address 1.1.1.1 24
[R1-LoopBack0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add
[R1-GigabitEthernet0/0/1]ip address 12.1.1.1 24
Aug 10 2023 22:32:06-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]
R2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R2
[R2]int lo0
[R2-LoopBack0]ip add
[R2-LoopBack0]ip address 2.2.2.2 24
[R2-LoopBack0]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add
[R2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
Aug 10 2023 22:32:43-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 addd
[R2-GigabitEthernet0/0/1]ip add
[R2-GigabitEthernet0/0/1]ip address 23.1.1.1 24
[R2-GigabitEthernet0/0/1]
Aug 10 2023 22:33:05-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R2-GigabitEthernet0/0/1]q
R3
<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R3
[R3]int lo0
[R3-LoopBack0]ip add
[R3-LoopBack0]ip address 3.3.3.3 24
[R3-LoopBack0]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add
[R3-GigabitEthernet0/0/0]ip address 23.1.1.2 24
Aug 10 2023 22:33:50-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add
[R3-GigabitEthernet0/0/1]ip address 34.1.1.1 24
Aug 10 2023 22:34:25-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R3-GigabitEthernet0/0/1]
R4
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R4
[R4]int lo0
[R4-LoopBack0]ip add
[R4-LoopBack0]ip address 4.4.4.4 24
[R4-LoopBack0]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add
[R4-GigabitEthernet0/0/0]ip address 34.1.1.2 24
Aug 10 2023 22:35:00-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R4-GigabitEthernet0/0/0]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add
[R4-GigabitEthernet0/0/0]ip address 45.1.1.1 24
[R4-GigabitEthernet0/0/0]ip add
[R4-GigabitEthernet0/0/0]ip address 34.1.1.2 24
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add
[R4-GigabitEthernet0/0/1]ip address 45.1.1.1 24
Aug 10 2023 22:36:02-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R4-GigabitEthernet0/0/1]
[R4-GigabitEthernet0/0/1]
[R4-GigabitEthernet0/0/1]q[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 54.1.1.1 24
[R4-GigabitEthernet0/0/2]
Aug 10 2023 23:14:02-08:00 R4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[R4-GigabitEthernet0/0/2]
R5
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[R1]sysname R5
[R5]int lo0
[R5-LoopBack0]ip add
[R5-LoopBack0]ip address 5.5.5.5 24
[R5-LoopBack0]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add
[R5-GigabitEthernet0/0/0]ip address 45.1.1.2 24
Aug 10 2023 22:36:52-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R5-GigabitEthernet0/0/0]q[R5]int g0/0/2
[R5-GigabitEthernet0/0/2]ip add 54.1.1.2 24
Aug 10 2023 23:14:33-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[R5-GigabitEthernet0/0/2]q[R5]int lo1
[R5-LoopBack1]ip add 9.9.9.9 24
2、在R2、R3、R4上进行OSPF宣告路由
R2
[R2]os
[R2]ospf 1 ro
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]are
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]net
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 24
^
Error: Wrong parameter found at '^' position.
[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.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0]
Aug 10 2023 22:40:11-08:00 R2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.23, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R2-ospf-1-area-0.0.0.0]
Aug 10 2023 22:40:15-08:00 R2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.23, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)
[R2-ospf-1-area-0.0.0.0]
Aug 10 2023 22:40:15-08:00 R2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.23, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge)
[R2-ospf-1-area-0.0.0.0]
Aug 10 2023 22:40:15-08:00 R2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.23, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
[R2-ospf-1-area-0.0.0.0]
Aug 10 2023 22:40:15-08:00 R2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.23, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R2-ospf-1-area-0.0.0.0]
R3
[R3]os
[R3]ospf 1 ro
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]are
[R3-ospf-1]area 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.2 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net
[R3-ospf-1-area-0.0.0.0]network 34
Aug 10 2023 22:40:16-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.23, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R3-ospf-1-area-0.0.0.0]network 34
Aug 10 2023 22:40:16-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.23, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
[R3-ospf-1-area-0.0.0.0]network 34
Aug 10 2023 22:40:16-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.23, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart)
[R3-ospf-1-area-0.0.0.0]network 34
Aug 10 2023 22:40:16-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.23, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge)
[R3-ospf-1-area-0.0.0.0]network 34
Aug 10 2023 22:40:16-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.23, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
[R3-ospf-1-area-0.0.0.0]network 34
Aug 10 2023 22:40:16-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.23, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
[R3-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.34, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R3-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.34, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)
[R3-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.34, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge)
[R3-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.34, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
[R3-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R3 %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=256, NeighborAddress=2.1.1.34, Neighbor
Event=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R3-ospf-1-area-0.0.0.0]
R4
[R4]osp
[R4]ospf 1 ro
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]are
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]net
[R4-ospf-1-area-0.0.0.0]network 34.1.1.2 0.0.0.0
[R4-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R4 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.34, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[R4-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R4 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.34, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
[R4-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:20-08:00 R4 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.34, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart)
[R4-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:21-08:00 R4 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.34, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge)
[R4-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:21-08:00 R4 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.34, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
[R4-ospf-1-area-0.0.0.0]
Aug 10 2023 22:41:21-08:00 R4 %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.34, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[R4-ospf-1-area-0.0.0.0]net
[R4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]
3.在R1和R2上建立直连EBGP
R1
[R1]bgp 1
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 12.1.1.2 as-number 2
[R1-bgp]
Aug 10 2023 22:46:53-08:00 R1 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
peer 12.1.1.2 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, St
ateChangeReason=Up)
[R1-bgp]
R2
[R2]bgp 2
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 12.1.1.1 as-number 1
[R2-bgp]
Aug 10 2023 22:46:52-08:00 R2 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
peer 12.1.1.1 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, St
ateChangeReason=Up)
[R2-bgp]
4、R4到R5写静态路由
R4
[R4]ip route-static 5.5.5.0 24 45.1.1.2
[R4]ip route-static 5.5.5.0 24 54.1.1.2[R4]ip route-static 9.9.9.0 24 45.1.1.2
[R4]ip route-static 9.9.9.0 24 54.1.1.2
R5
[R5]ip route-static 4.4.4.0 24 45.1.1.1
[R5]ip route-static 4.4.4.0 24 54.1.1.1
5、R2、R3、R4、R5使用环回建立BGP邻居关系
R2
[R2]bgp 2
[R2-bgp]pe
[R2-bgp]peer 3.3.3.3 as
[R2-bgp]peer 3.3.3.3 as-number 2 //和3.3.3.3建立邻居
[R2-bgp]
Aug 10 2023 23:06:50-08:00 R2 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
peer 3.3.3.3 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, Sta
teChangeReason=Up)
[R2-bgp]peer 3.3.3.3 co
[R2-bgp]peer 3.3.3.3 connect-interface lo
[R2-bgp]peer 3.3.3.3 connect-interface LoopBack 0 //使用环回建
Aug 10 2023 23:08:07-08:00 R2 %%01BGP/3/STATE_CHG_UPDOWN(l)[1]:The status of the
peer 3.3.3.3 changed from ESTABLISHED to IDLE. (InstanceName=Public, StateChang
eReason=CEASE/Other Configuration Change)
[R2-bgp]
[R2-bgp]
Aug 10 2023 23:08:39-08:00 R2 %%01BGP/3/STATE_CHG_UPDOWN(l)[2]:The status of the
peer 3.3.3.3 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, Sta
teChangeReason=Up)
[R2-bgp]peer 4.4.4.4 as-number 2
[R2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R2-bgp]
R3
[R3]bgp 2
[R3-bgp]ro
[R3-bgp]router-id 3.3.3.3
[R3-bgp]pe
[R3-bgp]peer 2.2.2.2 as
[R3-bgp]peer 2.2.2.2 as-number 2
[R3-bgp]peer 2.2.2.2 co
[R3-bgp]peer 2.2.2.2 connect-interface lo
[R3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R3-bgp]
Aug 10 2023 23:06:50-08:00 R3 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
peer 2.2.2.2 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, Sta
teChangeReason=Up)
[R3-bgp]
Aug 10 2023 23:08:07-08:00 R3 %%01BGP/3/STATE_CHG_UPDOWN(l)[1]:The status of the
peer 2.2.2.2 changed from ESTABLISHED to IDLE. (InstanceName=Public, StateChang
eReason=Notification Message Received)
[R3-bgp]dis
[R3-bgp]display bg
Aug 10 2023 23:08:39-08:00 R3 %%01BGP/3/STATE_CHG_UPDOWN(l)[2]:The status of the
peer 2.2.2.2 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, Sta
teChangeReason=Up)
[R3-bgp]display bg
[R3-bgp]display bgp p
[R3-bgp]display bgp pe
[R3-bgp]display bgp peerBGP local router ID : 3.3.3.3
Local AS number : 2
Total number of peers : 1 Peers in established state : 1Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pre
fRcv2.2.2.2 4 2 2 3 0 00:00:10 Established
0
[R3-bgp]pe
[R3-bgp]peer 4.4.4.4 as
[R3-bgp]peer 4.4.4.4 as-number 2
[R3-bgp]pe
[R3-bgp]peer 4.4.4.4 co
[R3-bgp]peer 4.4.4.4 connect-interface lo
[R3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R3-bgp]
Aug 10 2023 23:12:06-08:00 R3 %%01BGP/3/STATE_CHG_UPDOWN(l)[3]:The status of the
peer 4.4.4.4 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, Sta
teChangeReason=Up)
[R3-bgp]
R4
[R4]bgp 2
[R4-bgp]rou
[R4-bgp]router-
[R4-bgp]router-id 4.4.4.4
[R4-bgp]pe
[R4-bgp]peer 3.3.3.3 as
[R4-bgp]peer 3.3.3.3 as-number 2
[R4-bgp]pe
[R4-bgp]peer 3.3.3.3 con
[R4-bgp]peer 3.3.3.3 connect-interface lo
[R4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[R4-bgp]
Aug 10 2023 23:12:06-08:00 R4 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
peer 3.3.3.3 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, Sta
teChangeReason=Up)
[R4-bgp]
[R4-bgp]peer 5.5.5.5 as
[R4-bgp]peer 5.5.5.5 as-number 3
[R4-bgp]pe
[R4-bgp]peer 5.5.5.5 con
[R4-bgp]peer 5.5.5.5 connect-interface lo
[R4-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[R4-bgp][R4-bgp]peer 5.5.5.5 ebgp-max-hop 2 //把默认为1的跳数改为2
[R4-bgp][R4-bgp]peer 2.2.2.2 as-number 2
[R4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R4-bgp]
R5
[R5]
[R5]bgp 3
[R5-bgp]rou
[R5-bgp]router
[R5-bgp]router-id 5.5.5.5
[R5-bgp]pe
[R5-bgp]peer 4.4.4.4 as
[R5-bgp]peer 4.4.4.4 as-number 2
[R5-bgp]pe
[R5-bgp]peer 4.4.4.4 co
[R5-bgp]peer 4.4.4.4 connect-interface lo
[R5-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R5-bgp][R5-bgp]peer 4.4.4.4 ebgp-max-hop 2 //把默认为1的跳数改为2
[R5-bgp]
6、宣告路由
R1
[R1]bgp 1
[R1-bgp]net
[R1-bgp]network 1.1.1.0 24
R2
[R2-bgp]peer 3.3.3.3 next-hop-local //把路由给3.3.3.3的时候更改下一跳
[R2-bgp]peer 4.4.4.4 next-hop-local
R5
[R5-bgp]network 5.5.5.0 24
[R5-bgp]network 9.9.9.0 24
[R4-bgp]peer 2.2.2.2 next-hop-local
[R4-bgp]peer 3.3.3.3 next-hop-local
7、使5.5.5.5环回可通
R4
[R4]undo ip route-static 5.5.5.0 24
[R4]ip route-static 5.5.5.5 32 45.1.1.2
[R4]ip route-static 5.5.5.5 32 54.1.1.2
8、使R2、R3、R4可通
R2
[R2-bgp]network 2.2.2.0 24
R3
[R3-bgp]network 3.3.3.0 24
R4
[R4-bgp]network 4.4.4.0 24
四、测试
R1
R2
R3
R4
R5