BGP Configuration Examples 401
--- 9.1.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/37/47 ms
BGP Load Balancing and
MED Attribute
Configuration
Network requirements
■ Configure BGP on all switches; Switch A is in AS77008, and Switch B and C in
AS77009.
■ Between Switch A and B, and between Switch A and C are EBGP connections,
and an IBGP connection is between Switch B and C.
Network diagram
Figure 132 Network diagram for BGP load balancing configuration
Configuration procedure
1 Configure IP addresses for interfaces (omitted)
2 Configure BGP connections
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.1.1 as-number 65009
[SwitchA-bgp] peer 200.1.2.1 as-number 65009
# Inject route 8.0.0.0/8 to BGP routing table.
[SwitchA-bgp] network 8.0.0.0 255.0.0.0
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 200.1.1.2 as-number 65008
[SwitchB-bgp] peer 9.1.1.2 as-number 65009
[SwitchB-bgp] network 9.1.1.0 255.255.255.0
[SwitchB-bgp] quit
Vlan-int200
200.1.1.2/24
Switch A
AS 65008
Vlan-int100
8.1.1.1/8
Vlan-int400
9.1.1.2/24
Vlan-int300
200.1.2.1/24
Vlan-int200
200.1.1.1/24
Switch B
Switch C
AS 65009
Vlan-int300
200.1.2.2/24
Vlan-int400
9.1.1.1/24
EBGP
EBGP
IBGP