H3C Technologies H3C S10500 Series Switches User Manual

Page 86

Advertising
background image

78

<DeviceA> system-view

[DeviceA] bgp 100

[DeviceA-bgp] peer 167.1.1.2 as-number 200

[DeviceA-bgp] import-route direct

[DeviceA-bgp] quit

3.

Configure Device B

# Configure a VPN instance.

<DeviceB> system-view

[DeviceB] ip vpn-instance vpn1

[DeviceB-vpn-instance-vpn1] route-distinguisher 200:1

[DeviceB-vpn-instance-vpn1] vpn-target 200:1 export-extcommunity

[DeviceB-vpn-instance-vpn1] vpn-target 200:1 import-extcommunity

[DeviceB-vpn-instance-vpn1] quit

# Configure a BGP connection.

[DeviceB] router id 1.1.1.1

[DeviceB] bgp 200

[DeviceB-bgp] peer 2.2.2.2 as-number 200

[DeviceB-bgp] peer 2.2.2.2 connect-interface loopback 0

[DeviceB-bgp] ipv4-family vpn-instance vpn1

[DeviceB-bgp-vpn1] peer 167.1.1.2 as-number 100

[DeviceB-bgp-vpn1] quit

[DeviceB-bgp] ipv4-family vpnv4

[DeviceB-bgp-af-vpnv4] peer 2.2.2.2 enable

[DeviceB-bgp-af-vpnv4] quit

[DeviceB-bgp] quit

# Configure MPLS.

[DeviceB] mpls lsr-id 1.1.1.1

[DeviceB] mpls

[DeviceB-mpls] quit

[DeviceB] mpls ldp

[DeviceB-mpls-ldp] quit

# Configure OSPF.

[DeviceB] ospf

[DeviceB-ospf-1] area 0

[DeviceB ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[DeviceB ospf-1-area-0.0.0.0] network 168.1.1.0 0.0.0.255

[DeviceB ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

# Bind interface VLAN-interface 200 to VPN instance VPN1.

[DeviceB] interface vlan-interface 200

[DeviceB-Vlan-interface200] ip binding vpn-instance vpn1

[DeviceB-Vlan-interface200] ip address 167.1.1.2 24

[DeviceB-Vlan-interface200] quit

# Enable MPLS on interface VLAN-interface 300.

[DeviceB] interface vlan-interface 300

[DeviceB-Vlan-interface300] mpls

Advertising
This manual is related to the following products: