beautypg.com

H3C Technologies H3C S10500 Series Switches User Manual

Page 163

background image

152

[PE1-LoopBack0] quit

[PE1] interface vlan-interface 2

[PE1-Vlan-interface2] ip address 10.0.0.1 255.255.255.0

[PE1-Vlan-interface2] quit

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 10.0.0.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

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

[PE1-ospf-1] quit

# Configure PE 2.

system-view

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 3.3.3.3 255.255.255.255

[PE2-LoopBack0] quit

[PE2] interface vlan-interface 2

[PE2-Vlan-interface2] ip address 10.0.0.2 255.255.255.0

[PE2-Vlan-interface2] quit

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 10.0.0.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

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

[PE2-ospf-1] quit

After you complete the configuration, the PEs establish an OSPF neighborship. Perform the display ospf
peer verbose command; you will see that the neighborship state is FULL. Perform the display ip

routing-table command; you will see that the PEs have learned the routes to the loopback interfaces of

each other. Take PE 1 for example:

[PE1] display ospf peer verbose

OSPF Process 1 with Router ID 2.2.2.2

Neighbors

Area 0.0.0.0 interface 10.0.0.1(Vlan-interface2)'s neighbors

Router ID: 3.3.3.3 Address: 10.0.0.2 GR State: Normal

State: Full Mode:Nbr is Master Priority: 1

DR: None BDR: None

Dead timer due in 30 sec

Neighbor is up for 00:01:00

Authentication Sequence: [ 0 ]

[PE1] display ip routing-table

Routing Tables: Public

Destinations : 7 Routes : 7

Destination/Mask Proto Pre Cost NextHop Interface

2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0

3.3.3.3/32 OSPF 10 1563 10.0.0.2 Vlan2

10.0.0.0/24 Direct 0 0 10.0.0.1 Vlan2

10.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0

10.0.0.2/32 Direct 0 0 10.0.0.2 Vlan2

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0