BGP选路实验

配置路由

R1

[r1-ospf-1-area-0.0.0.0]net	
[r1-ospf-1-area-0.0.0.0]network 1932.168.100.1 0.0.0.0
                                ^
Error: Wrong parameter found at '^' position.
[r1-ospf-1-area-0.0.0.0]network 192.168.100.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]netw	
[r1-ospf-1-area-0.0.0.0]network 12.0.0.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]net	
[r1-ospf-1-area-0.0.0.0]network 13.0.0.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]
[r1-ospf-1-area-0.0.0.0]
[r1-ospf-1-area-0.0.0.0]q
[r1-ospf-1]q
[r1]bgp 123
[r1-bgp]r	
[r1-bgp]reflect
[r1-bgp]reflector
[r1-bgp]reset
[r1-bgp]return
[r1-bgp]route-select
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 15.0.0.5 a	
[r1-bgp]peer 15.0.0.5 advertise-community
[r1-bgp]peer 15.0.0.5 advertise-ext-community
[r1-bgp]peer 15.0.0.5 allow-as-loop
[r1-bgp]peer 15.0.0.5 as-number 50
[r1-bgp]peer 15.0.0.5 as-number 500
Error: The peer already exists in AS 50.
[r1-bgp]undo peer 15.0.0.5
[r1-bgp]peer 15.0.0.5 as-number 500
[r1-bgp]
[r1-bgp]peer 2.2.2.2 as	
[r1-bgp]peer 2.2.2.2 as-number 123
[r1-bgp]peer 2.2.2.2 co	
[r1-bgp]peer 2.2.2.2 connect-interface l	
[r1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[r1-bgp]peer 2.2.2.2 n	
[r1-bgp]peer 2.2.2.2 next-hop-invariable
[r1-bgp]peer 2.2.2.2 next-hop-local
[r1-bgp]peer 3.3.3.3 as	
[r1-bgp]peer 3.3.3.3 as-number 123
[r1-bgp]peer 3.3.3.3 co	
[r1-bgp]peer 3.3.3.3 connect-interface l	
[r1-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[r1-bgp]peer 3.3.3.3 n	
[r1-bgp]peer 3.3.3.3 next-hop-invariable
[r1-bgp]peer 3.3.3.3 next-hop-local
[r1-bgp]q
[r1]dis	
[r1]display bgp pe	
[r1]display bgp peer 

 BGP local router ID : 1.1.1.1
 Local AS number : 123
 Total number of peers : 3		  Peers in established state : 0

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre
fRcv

  2.2.2.2         4         123        0        1     0 00:03:48      Active    
   0
  3.3.3.3         4         123        0        0     0 00:02:55     Connect    
   0
  15.0.0.5        4         500        0        0     0 00:04:14     Connect    
   0
[r1]
May 26 2024 20:41:42-08:00 r1 %%01BGP/3/STATE_CHG_UPDOWN(l)[10]:The status of th
e peer 2.2.2.2 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, St
ateChangeReason=Up)  
[r1]
<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]bgp 123
[r1-bgp]net	
[r1-bgp]network 192.168.20.0 24
Info: The network does not exist.
[r1-bgp]net	
[r1-bgp]network 192.168.30.0 24
[r1-bgp]net 	
[r1-bgp]network 192.168.100.0 24
[r1-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

<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]ip ip-	
[r1]ip ip-prefix  aa p	
[r1]ip ip-prefix  aa permit 192.168.1.0 24
[r1]ip ip-	
[r1]ip ip-prefix  bb p	
[r1]ip ip-prefix  bb permit 192.168.2.0 24
[r1]ro	
[r1]route-	
[r1]route-policy-change
[r1]route-policy aa p	
[r1]route-policy aa permit n	
[r1]route-policy aa permit node 10
Info: New Sequence of this List.
[r1-route-policy]if	
[r1-route-policy]if-match ip-	
[r1-route-policy]if-match ip-prefix  aa
[r1-route-policy]ap	
[r1-route-policy]apply lo	
[r1-route-policy]apply local-preference  200
[r1-route-policy]q
[r1]ro	
[r1]route-	
[r1]route-policy-change
[r1]route-policy aa p	
[r1]route-policy aa permit  n	
[r1]route-policy aa permit  node  20
Info: New Sequence of this List.
[r1-route-policy]q
[r1]ro	
[r1]route-	
[r1]route-policy-change
[r1]route-policy bb p	
[r1]route-policy bb permit  n	
[r1]route-policy bb permit  node  10
Info: New Sequence of this List.
[r1-route-policy]if -	
[r1-route-policy]if-	
[r1-route-policy]if-match ip	
[r1-route-policy]if-match ip-	
[r1-route-policy]if-match ip-prefix  bb
[r1-route-policy]app	
[r1-route-policy]apply  l	
[r1-route-policy]apply  local-preference 200
[r1-route-policy]q
[r1]ro	
[r1]route-	
[r1]route-policy-change
[r1]route-policy bb p	
[r1]route-policy bb permit 
[r1]route-policy bb permit n 	
[r1]route-policy bb permit node 20
Info: New Sequence of this List.
[r1-route-policy]q
[r1]bgp 123
[r1-bgp]peer 2.2.2.2ro	
[r1-bgp]peer 2.2.2.2 ro	
[r1-bgp]peer 2.2.2.2 route-limit
[r1-bgp]peer 2.2.2.2 route-policy aa i	
[r1-bgp]peer 2.2.2.2 route-policy aa import 
[r1-bgp]peer 3.3.3.3 rou	
[r1-bgp]peer 3.3.3.3 route-limit
[r1-bgp]peer 3.3.3.3 route-policy bb i	
[r1-bgp]peer 3.3.3.3 route-policy bb import 
[r1-bgp]
[r1-bgp]
[r1-bgp]q
[r1]ip ip-	
[r1]ip ip-prefix cc	
[r1]ip ip-prefix cc p	
[r1]ip ip-prefix cc permit 192.168.3.0 24
[r1]r	
[r1]radius-server
[r1]refresh
[r1]remove
[r1]reset
[r1]return
[r1]rip
[r1]ripng
[r1]rmon
[r1]route
[r1]route-policy
[r1]route-policy aa p	
[r1]route-policy aa permit n 	
[r1]route-policy aa permit node 15
Info: New Sequence of this List.
[r1-route-policy]if-	
[r1-route-policy]if-match ip-	
[r1-route-policy]if-match ip-prefix cc
[r1-route-policy]ap	
[r1-route-policy]apply co	
[r1-route-policy]apply comm-filter
[r1-route-policy]apply community
[r1-route-policy]apply c	
[r1-route-policy]apply co	
[r1-route-policy]apply comm-filter
[r1-route-policy]apply community no-	
[r1-route-policy]apply community no-export-subconfed
[r1-route-policy]apply community no-advertise
[r1-route-policy]apply community no-export
[r1-route-policy]q
[r1]rou	
[r1]route-policy-change
[r1]router
[r1]route
[r1]route-policy bb p	
[r1]route-policy bb permit  n	
[r1]route-policy bb permit  node 15
Info: New Sequence of this List.
[r1-route-policy]if-	
[r1-route-policy]if-match ip-	
[r1-route-policy]if-match ip-prefix  cc
[r1-route-policy]ap	
[r1-route-policy]apply co	
[r1-route-policy]apply comm-filter
[r1-route-policy]apply community no-	
[r1-route-policy]apply community no-export-subconfed
[r1-route-policy]apply community no-advertise
[r1-route-policy]apply community no-export
[r1-route-policy]apply community no-export
[r1-route-policy]q
[r1]undo ip ip-	
[r1]undo ip ip-prefix cc
[r1]undo ro	
[r1]undo route-	
[r1]undo route-policy-change 	
[r1]undo route-policy aa	
[r1]undo route-policy aa n	
[r1]undo route-policy aa node 15
[r1]undo ero	
[r1]undo ro	
[r1]undo route-	
[r1]undo route-policy-change
[r1]undo route-policy bbn	
[r1]undo route-policy bb n	
[r1]undo route-policy bb node 15

R2

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip ad	
[r2-GigabitEthernet0/0/0]ip address 24.0.0.2 24
[r2-GigabitEthernet0/0/0]
May 26 2024 20:22:00-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 g 0/0/1
[r2-GigabitEthernet0/0/1]ip ad	
[r2-GigabitEthernet0/0/1]ip address  12.0.0.2 24
May 26 2024 20:22:15-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]int  l 0
[r2-LoopBack0] ip ad	
[r2-LoopBack0]ip address  2.2.2.2 22
[r2-LoopBack0]undo ip ad	
[r2-LoopBack0]undo ip address 
[r2-LoopBack0]ip	
[r2-LoopBack0]ip a	
[r2-LoopBack0]ip address 2.2.2.2 32
[r2-LoopBack0]int l 1
[r2-LoopBack1]ip A	
[r2-LoopBack1]ip address 192.168.20.1 24
[r2-LoopBack1]
<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]os	
[r2]ospf 1r	
[r2]ospf 1 r	
[r2]ospf 1 router-id  2.2.2.2 
[r2-ospf-1]a	
[r2-ospf-1]area 0 
[r2-ospf-1-area-0.0.0.0]net	
[r2-ospf-1-area-0.0.0.0]network 12.0.0.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]net	
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2
May 26 2024 20:32:47-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.12, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2
May 26 2024 20:32:47-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.12, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2
May 26 2024 20:32:47-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.12, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2
May 26 2024 20:32:47-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.12, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2
May 26 2024 20:32:47-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.12, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2
May 26 2024 20:32:47-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.12, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 
[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 192.168.20.1 0.0.0.0
[r2-ospf-1-area-0.0.0.0]
[r2-ospf-1-area-0.0.0.0]
[r2-ospf-1-area-0.0.0.0]q
[r2-ospf-1]q
[r2]q
<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]bgp 123
[r2-bgp]
[r2-bgp]rou	
[r2-bgp]route-select
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 24.0.0.2 as	
[r2-bgp]peer 24.0.0.2 as-number 400
Warning: Local interface is already configured with this address.
[r2-bgp]peer 24.0.0.4 as	
[r2-bgp]peer 24.0.0.4 as-path-filter
[r2-bgp]peer 24.0.0.4 as-number 400
[r2-bgp]peer 1.1.1.1 as	
[r2-bgp]peer 1.1.1.1 as-path-filter
[r2-bgp]peer 1.1.1.1 as-number 123
[r2-bgp]peer 1.1.1.1 co	
[r2-bgp]peer 1.1.1.1 connect-interface 
[r2-bgp]peer 1.1.1.1 connect-interface l	
[r2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[r2-bgp]peer 1.1.1.1 ne	
[r2-bgp]peer 1.1.1.1 next-hop-invariable
[r2-bgp]peer 1.1.1.1 next-hop-local
[r2-bgp]
May 26 2024 20:41:42-08:00 r2 %%01BGP/3/STATE_CHG_UPDOWN(l)[6]:The status of the
 peer 1.1.1.1 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, Sta
teChangeReason=Up)  
[r2-bgp]
<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]bgp 123
[r2-bgp]net	
[r2-bgp]network  192.168.20.0 24
[r2-bgp]net	
[r2-bgp]network 192.168.30.0 24
[r2-bgp]net	
[r2-bgp]network 192.168.100.0 24
[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

<r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]ro	
[r2]route-	
[r2]route-policy-change
[r2]route-policy aap	
[r2]route-policy aa o	
[r2]route-policy aa p	
[r2]route-policy aa permit  n	
[r2]route-policy aa permit  node  20
Info: New Sequence of this List.
[r2-route-policy]q
[r2]bgp 123
[r2-bgp]peer 24.0.0.4 r	
[r2-bgp]peer 24.0.0.4 reflect-client
[r2-bgp]peer 24.0.0.4 route-limit
[r2-bgp]peer 24.0.0.4 route-policy aa	
[r2-bgp]peer 24.0.0.4 route-policy aa e	
[r2-bgp]peer 24.0.0.4 route-policy aa export 
[r2-bgp]

R3


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip ad	
[r3-GigabitEthernet0/0/0]ip address  34.0.0.3 24
May 26 2024 20:25:02-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 g 0/0/1
[r3-GigabitEthernet0/0/1]ip address 13.0.0.3 24
[r3-GigabitEthernet0/0/1]
May 26 2024 20:25:23-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]int l 0
[r3-LoopBack0]ip ad	
[r3-LoopBack0]ip address 3.3.3.3 32
[r3-LoopBack0]int l 1
[r3-LoopBack1]ip a	
[r3-LoopBack1]ip address 192.168.30.1 24
[r3-LoopBack1]os	
[r3-LoopBack1]osp	
[r3-LoopBack1]ospf n	
[r3-LoopBack1]ospf network-type b	
[r3-LoopBack1]ospf network-type broadcast 
[r3-LoopBack1]
<r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]o	
[r3]oam-mgr
[r3]observe-port
[r3]observe-server
[r3]ospf
[r3]os	
[r3]ospf 1 r	
[r3]ospf 1 router-id  3.3.3.3
[r3-ospf-1]a	
[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 192.168.30.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]net	
[r3-ospf-1-area-0.0.0.0]network 13.0.0.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]
May 26 2024 20:34:47-08:00 r3 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.13, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r3-ospf-1-area-0.0.0.0]
May 26 2024 20:34:47-08:00 r3 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.13, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r3-ospf-1-area-0.0.0.0]
May 26 2024 20:34:47-08:00 r3 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.13, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r3-ospf-1-area-0.0.0.0]
May 26 2024 20:34:47-08:00 r3 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.13, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r3-ospf-1-area-0.0.0.0]
May 26 2024 20:34:47-08:00 r3 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.13, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r3-ospf-1-area-0.0.0.0]
May 26 2024 20:34:47-08:00 r3 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.0.13, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 
[r3-ospf-1-area-0.0.0.0]
[r3-ospf-1-area-0.0.0.0]
[r3-ospf-1-area-0.0.0.0]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]bgp 123\
        ^
Error: Wrong parameter found at '^' position.
[r3]bgp 123
[r3-bgp]r	
[r3-bgp]reflect
[r3-bgp]reflector
[r3-bgp]reset
[r3-bgp]return
[r3-bgp]route-select
[r3-bgp]router-id 3.3.3.3
[r3-bgp]peer 34.0.0.4 as	
[r3-bgp]peer 34.0.0.4 as-number 400
[r3-bgp]peer 1.1.1.1 as	
[r3-bgp]peer 1.1.1.1 as-path-filter
[r3-bgp]peer 1.1.1.1 as-number 123
[r3-bgp]peer con	
[r3-bgp]peer con
[r3-bgp]peer co	
[r3-bgp]peer 1.1.1.1 co	
[r3-bgp]peer 1.1.1.1 connect-interface l	
[r3-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[r3-bgp]peer 1.1.1.1 ne	
[r3-bgp]peer 1.1.1.1 next-hop-invariable
[r3-bgp]peer 1.1.1.1 next-hop-local
[r3-bgp]
[r3-bgp]
[r3-bgp]network  192.168.20.0 24
Info: The network does not exist.
[r3-bgp]
[r3-bgp]network 192.168.30.0 24
[r3-bgp]
[r3-bgp]network 192.168.100.0 24
[r3-bgp]
[r3-bgp]
<r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]ip ip	
[r3]ip ip-prefix aa p	
[r3]ip ip-prefix aa permit 192.168.12.0 24
[r3]r	
[r3]radius-server
[r3]refresh
[r3]remove
[r3]reset
[r3]return
[r3]rip
[r3]ripng
[r3]rmon
[r3]route
[r3]route-policy aa p	
[r3]route-policy aa permit  n	
[r3]route-policy aa permit  node  10
Info: New Sequence of this List.
[r3-route-policy]if-	
[r3-route-policy]if-match ip	
[r3-route-policy]if-match ip-	
[r3-route-policy]if-match ip-prefix  aa
[r3-route-policy]ap	
[r3-route-policy]apply co	
[r3-route-policy]apply comm-filter
[r3-route-policy]apply community
[r3-route-policy]apply cost 20
[r3-route-policy]q
[r3]rou	
[r3]router-	
[r3]router-
[r3]route-	
[r3]route-policy aa p	
[r3]route-policy aa permit  n	
[r3]route-policy aa permit  node 20
Info: New Sequence of this List.
[r3-route-policy]q
[r3]bgp 123
[r3-bgp]peer 34.0.0.4 ro	
[r3-bgp]peer 34.0.0.4 route-limit
[r3-bgp]peer 34.0.0.4 route-policy aa e	
[r3-bgp]peer 34.0.0.4 route-policy aa export 
[r3-bgp]q

R4

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip address 24.0.0.4 24
May 26 2024 20:26:57-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 g 0/0/1
[r4-GigabitEthernet0/0/1]ip ad	
[r4-GigabitEthernet0/0/1]ip address 34.0.0.4 24
May 26 2024 20:27:14-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]int l 0
[r4-LoopBack0]ip a	
[r4-LoopBack0]ip address 192.168.1.1 24
[r4-LoopBack0]int l 1
[r4-LoopBack1]ip add	
[r4-LoopBack1]ip address 192.168.2.1 24
[r4-LoopBack1]int l 2
[r4-LoopBack2]ip a	
[r4-LoopBack2]ip address 192.168.3.1 24
[r4-LoopBack2]
<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]bgp 400
[r4-bgp]rou	
[r4-bgp]route-select
[r4-bgp]router-id 4.4.4.4
[r4-bgp]peer 24.0.0.2 as	
[r4-bgp]peer 24.0.0.2 as-number 123
[r4-bgp]peer 34.0.0.3 as	
[r4-bgp]peer 34.0.0.3 as-path-filter
[r4-bgp]peer 34.0.0.3 as-number 123
[r4-bgp]
May 26 2024 20:44:12-08:00 r4 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
 peer 24.0.0.2 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, St
ateChangeReason=Up)  
[r4-bgp]
May 26 2024 20:44:27-08:00 r4 %%01BGP/3/STATE_CHG_UPDOWN(l)[1]:The status of the
 peer 34.0.0.3 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, St
ateChangeReason=Up)  
[r4-bgp]net	
[r4-bgp]network  192.168.1.0 24
[r4-bgp]net	
[r4-bgp]network  192.168.2.0 24
[r4-bgp]net	
[r4-bgp]network 192.168.3.0 24
[r4-bgp]
<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]ip ip	
[r4]ip ip-prefix aa	
[r4]ip ip-prefix aa p	
[r4]ip ip-prefix aa permit  192.168.10.0 24
[r4]rou	
[r4]route-	
[r4]route-policy-change
[r4]route-policy aa p	
[r4]route-policy aa permit n	
[r4]route-policy aa permit node 10
Info: New Sequence of this List.
[r4-route-policy]if	
[r4-route-policy]if-match ip-	
[r4-route-policy]if-match ip-prefix aa
[r4-route-policy]ap	
[r4-route-policy]apply p	
[r4-route-policy]apply preference-	
[r4-route-policy]apply preference	
[r4-route-policy]apply preference
[r4-route-policy]apply pr	
[r4-route-policy]apply preferred-value
[r4-route-policy]apply pref	
[r4-route-policy]apply preferred-value 100
[r4-route-policy]q
[r4]r	
[r4]radius-server
[r4]refresh
[r4]remove
[r4]reset
[r4]return
[r4]rip
[r4]ripng
[r4]rmon
[r4]route
[r4]route-policy aa p	
[r4]route-policy aa permit n	
[r4]route-policy aa permit node 20
Info: New Sequence of this List.
[r4-route-policy]q
[r4]bgp 400
[r4-bgp]peer 24.0.0.2 r	
[r4-bgp]peer 24.0.0.2 reflect-client
[r4-bgp]peer 24.0.0.2 route-limit
[r4-bgp]peer 24.0.0.2 route-policy aa i	
[r4-bgp]peer 24.0.0.2 route-policy aa import 
[r4-bgp]q
[r4]rou	
[r4]route-	
[r4]route-policy-change
[r4]route-policy aa p	
[r4]route-policy aa permit n	
[r4]route-policy aa permit node 15
Info: New Sequence of this List.
[r4-route-policy]q
[r4]ip ip-	
[r4]ip ip-prefix 	
[r4]ip ip-prefix bb p	
[r4]ip ip-prefix bb permit 192.168.11.0 24
[r4]if	
[r4]if-	
[r4]rou	
[r4]route-	
[r4]route-policy-change
[r4]route-policy aap	
[r4]route-policy aa p	
[r4]route-policy aa permit n	
[r4]route-policy aa permit node 15
Info: You are overwriting this sequence.
[r4-route-policy]if-m	
[r4-route-policy]if-match ip	
[r4-route-policy]if-match ip-	
[r4-route-policy]if-match ip-prefix  bb
[r4-route-policy]ap	
[r4-route-policy]apply as-	
[r4-route-policy]apply as-path 123 123 500 o	
[r4-route-policy]apply as-path 123 123 500 overwrite 
Warning: The AS-Path lists of routes to which this route-policy is applied will 
be overwritten. Continue? [Y/N]y
[r4-route-policy]
<r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]rou	
[r4]route-	
[r4]route-policy-change
[r4]route-policy co	
[r4]route-policy co
[r4]route-policy com	
[r4]route-policy com p	
[r4]route-policy com permit n	
[r4]route-policy com permit node 10
Info: New Sequence of this List.
[r4-route-policy]ap	
[r4-route-policy]apply  com	
[r4-route-policy]apply  comm-filter
[r4-route-policy]apply  community 400:500
[r4-route-policy]q
[r4]bgp 400
[r4-bgp]net	
[r4-bgp]network  192.168.3.0 24 ro	
[r4-bgp]network  192.168.3.0 24 route-policy com

R5

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]int g 0/0/
          ^
Error: Wrong parameter found at '^' position.
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip ad	
[r5-GigabitEthernet0/0/0]ip address 15.0.0.5 24
[r5-GigabitEthernet0/0/0]
May 26 2024 20:29:02-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]int l 0
[r5-LoopBack0]ip	
[r5-LoopBack0]ip a	
[r5-LoopBack0]ip address 192.168.10.1 24
[r5-LoopBack0]int  l 1
[r5-LoopBack1]ip a	
[r5-LoopBack1]ip address 192.168.11.1 24
[r5-LoopBack1]int l 2
[r5-LoopBack2]ip a	
[r5-LoopBack2]ip address 192.168.12.1 24
[r5-LoopBack2]
<r5>sys
Enter system view, return user view with Ctrl+Z.
[r5]bgp 500
[r5-bgp]r	
[r5-bgp]reflect
[r5-bgp]reflector
[r5-bgp]reset
[r5-bgp]return
[r5-bgp]route-select
[r5-bgp]router-id 5.5.5.5
[r5-bgp]peer 15.0.0.1 as	
[r5-bgp]peer 15.0.0.1 as-number 123
[r5-bgp]
May 26 2024 20:45:08-08:00 r5 %%01BGP/3/STATE_CHG_UPDOWN(l)[0]:The status of the
 peer 15.0.0.1 changed from OPENCONFIRM to ESTABLISHED. (InstanceName=Public, St
ateChangeReason=Up)  
[r5-bgp]netw	
[r5-bgp]network  192.168.10.0 24
[r5-bgp]net 	
[r5-bgp]network  192.168.11.0 24
[r5-bgp]net	
[r5-bgp]network 192.168.12.0 24
[r5-bgp]
<r5>sys
Enter system view, return user view with Ctrl+Z.
[r5]ip as	
[r5]ip as-path-filter 1 d	
[r5]ip as-path-filter 1 deny ^123
[r5]ip as	
[r5]ip as-path-filter 1p	
[r5]ip as-path-filter 1 p	
[r5]ip as-path-filter 1 permit 
                               ^
Error:Incomplete command found at '^' position.
[r5]ip as-path-filter 1 permit .*
[r5]bgp 500
[r5-bgp]peer 15.0.0.1 as	
[r5-bgp]peer 15.0.0.1 as-number
[r5-bgp]peer 15.0.0.1 as-path-filter 1 i	
[r5-bgp]peer 15.0.0.1 as-path-filter 1 import 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值