H3C Technologies H3C S12500 Series Switches User Manual
Page 289

273
# Bind VLAN-interface 12 with VPN instance b, configure an IP address and enable PIM-SM on the
interface.
[PE1] interface vlan-interface 12
[PE1-Vlan-interface12] ip binding vpn-instance b
[PE1-Vlan-interface12] ip address 10.11.2.1 24
[PE1-Vlan-interface12] pim sm
[PE1-Vlan-interface12] quit
# Configure an IP address for Loopback 1, and enable PIM-SM.
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] pim sm
[PE1-LoopBack1] quit
# Configure BGP.
[PE1] bgp 100
[PE1-bgp] group pe1-pe2 internal
[PE1-bgp] peer pe1-pe2 label-route-capability
[PE1-bgp] peer pe1-pe2 connect-interface loopback 1
[PE1-bgp] peer 1.1.1.2 group pe1-pe2
[PE1-bgp] group pe1-pe4 external
[PE1-bgp] peer pe1-pe4 as-number 200
[PE1-bgp] peer pe1-pe4 ebgp-max-hop 255
[PE1-bgp] peer 1.1.1.4 group pe1-pe4
[PE1-bgp] peer pe1-pe2 connect-interface loopback 1
[PE1–bgp] ipv4-family vpn-instance a
[PE1-bgp-a] import-route ospf 2
[PE1-bgp-a] import-route direct
[PE1-bgp-a] quit
[PE1–bgp] ipv4-family vpn-instance b
[PE1-bgp-b] import-route ospf 3
[PE1-bgp-b] import-route direct
[PE1-bgp-b] quit
[PE1–bgp] ipv4-family vpnv4
[PE1–bgp-af-vpnv4] peer 1.1.1.4 enable
[PE1–bgp-af-vpnv4] quit
[PE1–bgp] quit
With BGP peers configured on PE 1, the interfaces MTI 0 and MTI 1 will automatically obtain IP
addresses, which are the loopback interface addresses specified in the BGP peer configuration.
The PIM mode running on MTI 0 is the same as on the interfaces in VPN instance a, and the PIM
mode running on MTI 1 is the same as on the interfaces in VPN instance b.
# Configure OSPF.
[PE1] ospf 1
[PE1-ospf-1] area 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.10.0.0 0.0.255.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
[PE1] ospf 2 vpn-instance a
[PE1-ospf-2] import-route bgp