270
BGP community configuration example
Network requirements
As shown in Figure 67, Switch B establishes EBGP connections with Switch A and Switch C.
Configure NO_EXPORT community attribute on Switch A to make routes from AS 10 not advertised
by AS 20 to any other AS.
Figure 67 Network diagram
Configuration procedure
1. Configure IP addresses for interfaces. (Details not shown.)
2. Configure EBGP:
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 10
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.2.2 as-number 20
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 200.1.2.2 enable
[SwitchA-bgp-ipv4] network 9.1.1.0 255.255.255.0
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 20
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 200.1.2.1 as-number 10
[SwitchB-bgp] peer 200.1.3.2 as-number 30
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 200.1.2.1 enable
[SwitchB-bgp-ipv4] peer 200.1.3.2 enable
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 30
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 200.1.3.1 as-number 20