Configuring inter-as ipv6 vpn – H3C Technologies H3C S12500-X Series Switches User Manual

Page 274

Advertising
background image

263

[PE1] interface vlan-interface 20

[PE1-Vlan-interface20] ip address 10.1.1.1 24

[PE1-Vlan-interface20] mpls enable

[PE1-Vlan-interface20] mpls ldp enable

[PE1-Vlan-interface20] quit

# Enable OSPF for LSP establishment.

[PE1] ospf

[PE1-ospf-1] area 0

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

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

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

[PE1-ospf-1] quit

# Create an IBGP connection to PE 2 and enable BGP to advertise L2VPN information to PE 2.

[PE1] bgp 100

[PE1-bgp] peer 192.3.3.3 as-number 100

[PE1-bgp] peer 192.3.3.3 connect-interface loopback 0

[PE1-bgp] address-family l2vpn

[PE1-bgp-l2vpn] peer 192.3.3.3 enable

[PE1-bgp-l2vpn] quit

[PE1-bgp] quit

# Create service instance 10 on Ten-GigabitEthernet 1/0/1 to match packets that have an outer

VLAN ID of 10.

[PE1] interface ten-gigabitethernet1/0/1

[PE1-Ten-GigabitEthernet1/0/1] service-instance 10

[PE1-Ten-GigabitEthernet1/0/1-srv10] encapsulation s-vid 10

[PE1-Ten-GigabitEthernet1/0/1-srv10] quit

[PE1-Ten-GigabitEthernet1/0/1] quit

# Create a cross-connect group named vpnb, create a local site named site 1, create a BGP PW

from site 1 to the remote site site 2, and bind service instance 10 on Ten-GigabitEthernet 1/0/1 to

the PW.

[PE1] xconnect-group vpnb

[PE1-xcg-vpnb] auto-discovery bgp

[PE1-xcg-vpnb-auto] route-distinguisher 2:2

[PE1-xcg-vpnb-auto] vpn-target 2:2 export-extcommunity

[PE1-xcg-vpnb-auto] vpn-target 2:2 import-extcommunity

[PE1-xcg-vpnb-auto] site 1 range 10 default-offset 0

[PE1-xcg-vpnb-auto-1] connection remote-site-id 2

[PE1-xcg-vpnb-auto-1-2] ac interface Ten-GigabitEthernet 1/0/1 service-instance 10

[PE1-xcg-vpnb-auto-1-2] return

3.

Configure P:
# Configure an LSR ID.

<P> system-view

[P] interface loopback 0

[P-LoopBack0] ip address 192.4.4.4 32

[P-LoopBack0] quit

[P] mpls lsr-id 192.4.4.4

Advertising