beautypg.com

H3C Technologies H3C S12500 Series Switches User Manual

Page 265

background image

249

[SwitchA-bgp] quit

# Configure Switch B.

[SwitchB] bgp 65009

[SwitchB-bgp] router-id 2.2.2.2

[SwitchB-bgp] peer 3.1.1.2 as-number 65008

4.

Configure BGP and IGP synchronization:

{

Configure BGP to redistribute routes from OSPF on Switch B, so that Switch A can obtain the
route to 9.1.2.0/24.

{

Configure OSPF to redistribute routes from BGP on Switch B, so that Switch C can obtain the
route to 8.1.1.0/24.

# Configure BGP to redistribute routes from OSPF on Switch B.

[SwitchB-bgp] import-route ospf 1

[SwitchB-bgp] quit

[SwitchB] ospf 1

[SwitchB-ospf-1] import-route bgp

[SwitchB-ospf-1] quit

# Display the BGP routing table 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, ^ - VPNv4 best, > - best, d - damped,

h - history, i - internal, s - suppressed, S - Stale

Origin : i - IGP, e - EGP, ? - incomplete

Network NextHop MED LocPrf PrefVal Path/Ogn

*> 3.3.3.3/32 3.1.1.1 1 0 65009?

*> 8.1.1.0/24 0.0.0.0 0 0 i

*> 9.1.2.0/24 3.1.1.1 1 0 65009?

# Display the routing table on Switch C.

[SwitchC] display ip routing-table

Routing Tables: Public

Destinations : 9 Routes : 9

Destination/Mask Proto Pre Cost NextHop Interface

2.2.2.2/32 OSPF 10 1 9.1.1.1 Vlan300

3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop0

8.1.1.0/24 O_ASE 150 1 9.1.1.1 Vlan300

9.1.1.0/24 Direct 0 0 9.1.1.2 Vlan300

9.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0

9.1.2.0/24 Direct 0 0 9.1.2.1 Vlan400

9.1.2.1/32 Direct 0 0 127.0.0.1 InLoop0

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0