BGP Configuration Examples 399
Network diagram
Figure 131 Network diagram for BGP and IGP synchronization
Configuration procedure
1 Configure IP addresses for interfaces (omitted)
2 Configure OSPF (omitted)
3 Configure the EBGP connection
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 3.1.1.1 as-number 65009
# Inject network 8.1.1.0/24 to the BGP routing table.
[SwitchA-bgp] network 8.1.1.0 24
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 65009
[SwitchB-bgp] peer 3.1.1.2 as-number 65008
[SwitchB-bgp] quit
4 Configure BGP and IGP synchronization
# Configure BGP to redistribute routes from OSPF on Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] import-route ospf 1
[SwitchB-bgp] quit
# Display routing table information on Switch A.
[SwitchA] display bgp routing-table
Total Number of Routes: 3
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin:i-IGP, e - EGP, ? - incomplete
Vlan-int200
3.1.1.2/24
Switch A
AS 65008
Vlan-int200
3.1.1.1/24
lan-int100
8.1.1.1/24
Vlan-int300
9.1.1.1/24
Vlan-int300
9.1.1.2/24
Switch B Switch C
AS 65009
Vlan-int400
9.1.2.1/24