Example: Configuring IPv6 multicast forwarding over a GRE tunnel
Network configuration
As shown in Figure 98:
IPv6 multicast routing and IPv6 PIM-DM are enabled on Switch A and Switch C.
Switch B does not support IPv6 multicast.
Switch A, Switch B, and Switch C run OSPFv3. The source-side interface VLAN-interface 100 on Switch A does not run OSPFv3.
Configure the switches so that the receiver host can receive the IPv6 multicast data from Source.
Figure 98: Network diagram
Procedure
Assign an IPv6 address and prefix length to each interface, as shown in Figure 98. (Details not shown.)
Configure OSPFv3 on the switches. Do not run OSPFv3 on VLAN-interface 100 on Switch A. (Details not shown.)
Configure a GRE tunnel:
# On Switch A, create service loopback group 1, and specify the unicast tunnel service for the group.
<SwitchA> system-view [SwitchA] service-loopback group 1 type tunnel
# Assign HundredGigE 1/0/3 to service loopback group 1. (HundredGigE 1/0/3 does not belong to VLAN 100 or VLAN 101.)
[SwitchA] interface hundredgige 1/0/3 [SwitchA-HundredGigE1/0/3] port service-loopback group 1 [SwitchA-HundredGigE1/0/3] quit
# Create a GRE tunnel interface Tunnel 2, and specify the tunnel mode as GRE/IPv6.
[SwitchA] interface tunnel 2 mode gre ipv6
# Assign an IPv6 address to interface Tunnel 2, and specify its source and destination addresses.
[SwitchA-Tunnel2] ipv6 address 5001::1 64 [SwitchA-Tunnel2] source 2001::1 [SwitchA-Tunnel2] destination 3001::2 [SwitchA-Tunnel2] quit
# On Switch C, create service loopback group 1, and specify the unicast tunnel service for the group.
<SwitchC> system-view [SwitchC] service-loopback group 1 type tunnel
# Assign HundredGigE 1/0/3 to service loopback group 1. (HundredGigE 1/0/3 does not belong to VLAN 200 or VLAN 102.)
[SwitchC] interface hundredgige 1/0/3 [SwitchC-HundredGigE1/0/3] port service-loopback group 1 [SwitchC-HundredGigE1/0/3] quit
# Create a GRE tunnel interface Tunnel 2, and specify the tunnel mode as GRE/IPv6.
[SwitchC] interface tunnel 2 mode gre ipv6
# Assign an IPv6 address to interface Tunnel 2, and specify its source and destination addresses.
[SwitchC-Tunnel2] ipv6 address 5001::2 64 [SwitchC-Tunnel2] source 3001::2 [SwitchC-Tunnel2] destination 2001::1 [SwitchC-Tunnel2] quit
Enable IPv6 multicast routing, IPv6 PIM-DM, and MLD:
# On Switch A, enable IPv6 multicast routing, and enable IPv6 PIM-DM on each interface.
[SwitchA] ipv6 multicast routing [SwitchA-mrib6] quit [SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ipv6 pim dm [SwitchA-Vlan-interface100] quit [SwitchA] interface vlan-interface 101 [SwitchA-Vlan-interface101] ipv6 pim dm [SwitchA-Vlan-interface101] quit [SwitchA] interface tunnel 2 [SwitchA-Tunnel2] ipv6 pim dm [SwitchA-Tunnel2] quit
# On Switch C, enable IPv6 multicast routing.
[SwitchC] ipv6 multicast routing [SwitchC-mrib6] quit
# Enable MLD on the receiver-side interface VLAN-interface 200.
[SwitchC] interface vlan-interface 200 [SwitchC-Vlan-interface200] mld enable [SwitchC-Vlan-interface200] quit
# Enable IPv6 PIM-DM on VLAN-interface 102.
[SwitchC] interface vlan-interface 102 [SwitchC-Vlan-interface102] ipv6 pim dm [SwitchC-Vlan-interface102] quit [SwitchC] interface tunnel 2 [SwitchC-Tunnel2] ipv6 pim dm [SwitchC-Tunnel2] quit
On Switch C, configure a static IPv6 route with the destination address 1001::1/64 and the outgoing interface Tunnel 2.
[SwitchC] ipv6 route-static 1001::1 64 tunnel 2
Verifying the configuration
# Send an MLD report from Receiver to join the IPv6 multicast group FF1E::101. (Details not shown.)
# Send IPv6 multicast data from Source to the IPv6 multicast group FF1E::101. (Details not shown.)
# Display IPv6 PIM routing entries on Switch C.
[SwitchC] display ipv6 pim routing-table Total 1 (*, G) entry; 1 (S, G) entry (*, FF1E::101) Protocol: pim-dm, Flag: WC UpTime: 00:04:25 Upstream interface: NULL Upstream neighbor: NULL RPF prime neighbor: NULL Downstream interface(s) information: Total number of downstreams: 1 1: Vlan-interface200 Protocol: mld, UpTime: 00:04:25, Expires: - (1001::100, FF1E::101) Protocol: pim-dm, Flag: ACT UpTime: 00:06:14 Upstream interface: Tunnel2 Upstream neighbor: FE80::A01:101:1 RPF prime neighbor: FE80::A01:101:1 Downstream interface(s) information: Total number of downstreams: 1 1: Vlan-interface200 Protocol: pim-dm, UpTime: 00:04:25, Expires: -
The output shows the following information:
Switch A is the RPF neighbor of Switch C.
IPv6 multicast data from Switch A is delivered over the GRE tunnel to Switch C.