beautypg.com

H3C Technologies H3C S7500E Series Switches User Manual

Page 80

background image

2-38

[SwitchB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# Configure OSPF on Switch C.

system-view

[Sysname] sysname SwitchC

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0

[SwitchC-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# After completing the above configurations, execute the display ip routing-table command on each
switch. You will see that each switch has learned the routes to other switches. Take Switch A as an
example:

[SwitchA] display ip routing-table

Routing Tables: Public

Destinations : 8 Routes : 8

Destination/Mask Proto Pre Cost NextHop Interface

1.1.1.9/32 Direct 0 0 127.0.0.1 InLoop0

2.2.2.9/32 OSPF 10 1562 10.1.1.2 Vlan1

3.3.3.9/32 OSPF 10 3124 10.1.1.2 Vlan1

10.1.1.0/24 Direct 0 0 10.1.1.1 Vlan1

10.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0

20.1.1.0/24 OSPF 10 3124 10.1.1.2 Vlan1

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

Enable MPLS and MPLS LDP

# Configure MPLS and MPLS LDP on Switch A.

[SwitchA] mpls lsr-id 1.1.1.9

[SwitchA] mpls

[SwitchA-mpls] quit

[SwitchA] mpls ldp

[SwitchA-mpls-ldp] quit

[SwitchA] interface vlan-interface 1

[SwitchA-Vlan-interface1] mpls

[SwitchA-Vlan-interface1] mpls ldp

[SwitchA-Vlan-interface1] quit

# Configure MPLS and MPLS LDP on Switch B.

[SwitchB] mpls lsr-id 2.2.2.9

[SwitchB] mpls

[SwitchB-mpls] quit

[SwitchB] mpls ldp

[SwitchB-mpls-ldp] quit

[SwitchB] interface vlan-interface 1

[SwitchB-Vlan-interface1] mpls

[SwitchB-Vlan-interface1] mpls ldp