H3C Technologies H3C S12500-X Series Switches User Manual
Page 259
245
BGP connections. Enable OSPF in AS 65009 to make sure that Switch B can communicate with Switch
C through loopback interfaces.
The EBGP peers, Switch A and Switch B (typically belong to different carriers), are located in different
ASs. Typically, their loopback interfaces are not reachable to each other, so directly connected interfaces
are used for establishing BGP sessions. To enable Switch C to access the network 8.1.1.0/24 connected
directly to Switch A, inject network 8.1.1.0/24 to the BGP routing table of Switch A.
605B
Configuration procedure
1.
Configure IP addresses for interfaces. (Details not shown.)
2.
Configure IBGP:
# Configure Switch B.
[SwitchB] bgp 65009
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 3.3.3.3 as-number 65009
[SwitchB-bgp] peer 3.3.3.3 connect-interface loopback 0
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 3.3.3.3 enable
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
[SwitchB] ospf 1
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[SwitchB-ospf-1-area-0.0.0.0] network 9.1.1.1 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
[SwitchC] bgp 65009
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 2.2.2.2 as-number 65009
[SwitchC-bgp] peer 2.2.2.2 connect-interface loopback 0
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 2.2.2.2 enable
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
[SwitchC] ospf 1
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[SwitchC-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
[SwitchC] display bgp peer ipv4
BGP local router ID : 3.3.3.3
Local AS number : 65009
Total number of peers : 1 Peers in established state : 1