284
* >e 9.1.1.0/24 3.1.1.1 0 0 65009i
* >e 3.1.2.1 0 0 65009i
•
The output shows that there are two valid routes to the destination 9.1.1.0/24, and both of them are
the best routes.
•
By using the
display ip routing-table
command, you can find there are two routes to 9.1.1.0/24.
One has next hop 3.1.1.1 and outbound interface GigabitEthernet 2/0, and the other has next hop
3.1.2.1 and outbound interface GigabitEthernet 3/0.
BGP community configuration example
Network requirements
As shown in
Figure 66
, Router B establishes EBGP connections with Router A and Router C. Configure
NO_EXPORT community attribute on Router A so that AS 20 does not advertise routes received from AS
10 to any other AS.
Figure 66
Network diagram
Configuration procedure
1.
Configure IP addresses for interfaces. (Details not shown.)
2.
Configure EBGP connections:
# Configure Router A.
<RouterA> system-view
[RouterA] bgp 10
[RouterA-bgp] router-id 1.1.1.1
[RouterA-bgp] peer 200.1.2.2 as-number 20
[RouterA-bgp] address-family ipv4 unicast
[RouterA-bgp-ipv4] peer 200.1.2.2 enable
[RouterA-bgp-ipv4] network 9.1.1.0 255.255.255.0
[RouterA-bgp-ipv4] quit
[RouterA-bgp] quit
# Configure Router B.
<RouterB> system-view
[RouterB] bgp 20
[RouterB-bgp] router-id 2.2.2.2
[RouterB-bgp] peer 200.1.2.1 as-number 10
[RouterB-bgp] peer 200.1.3.2 as-number 30