...
Figure 1. PIM over GRE Tunnel Configuration Example
As shown in Figure 1, multicast services are deployed in the network. Switch B does not support multicast protocols, so multicast traffic needs to be transmitted between Switch A and Switch C through a GRE tunnel.
...
- Run OSPF route protocol on Switch A, Switch B and Switch C for underlay communication.
- Create GRE tunnel interfaces on Switch A and Switch C to establish a GRE tunnel; Run BGP route protocol on GRE tunnel interfaces.
- Enable PIM function on the GRE tunnel interfaces and underlay interfaces to enable the transmission of multicast packets by the GRE tunnel.
Procedure
Switch A
Step1 Configure VLAN interface.
Code Block |
---|
admin@SwitchA# set vlans vlan-id 11 l3-interface vlan11 admin@SwitchA# set vlans vlan-id 22 l3-interface vlan22 admin@SwitchA# set interface gigabit-ethernet te-1/1/45 family ethernet-switching native-vlan-id 11 admin@SwitchA# set interface gigabit-ethernet te-1/1/13 family ethernet-switching native-vlan-id 22 admin@SwitchA# set l3-interface loopback lo address 100.100.100.100 prefix-length 32 admin@SwitchA# set l3-interface vlan-interface vlan11 address 10.1.1.2 prefix-length 24 admin@SwitchA# set l3-interface vlan-interface vlan22 address 10.20.1.1 prefix-length 24 |
Step2 Enable IP routing.
Code Block |
---|
admin@SwitchA# set ip routing enable true |
Step3 Configure OSPF route protocol for underlay communication.
Code Block |
---|
admin@SwitchA# set protocols ospf router-id 1.1.1.1
admin@SwitchA# set protocols ospf network 10.20.1.0/24 area 0
admin@SwitchA# set protocols ospf network 100.100.100.100/32 area 0 |
Step4 Configure GRE tunnel name, IP, source IP, destination IP etc.
Code Block |
---|
admin@SwitchA# set l3-interface tunnel tnl0 address 10.40.1.1 prefix-length 24 admin@SwitchA# set l3-interface tunnel tnl0 tunnel-mode gre-ip admin@SwitchA# set l3-interface tunnel tnl0 source 10100.20100.1100.1100 admin@SwitchA# set l3-interface tunnel tnl0 destination 10200.30200.1200.2200 |
Step5 Configure BGP route protocol for the GRE tunnel.
Code Block |
---|
admin@SwitchA# set protocols bgp local-as 100 admin@SwitchA# set protocols bgp ebgp-requires-policy false admin@SwitchA# set protocols bgp neighbor 10.40.1.2 remote-as 200 admin@SwitchA# set protocols bgp ipv4-unicast network 10.1.1.0/24 |
Step6 Enable PIM on the VLAN interface and GRE tunnel interface, configure Switch A’s GRE tunnel interface as the static RP.
NOTE: Both GRE tunnel interface and underlay interface need to be enabled for PIM.
Code Block |
---|
admin@SwitchA# set protocols pim interface vlan11 sm admin@SwitchA# set protocols pim interface vlan22 sm admin@SwitchA# set protocols pim interface tnl0 sm admin@SwitchA# set protocols pim rp 10.40.1.1 group 225.0.0.0/8 |
Step7 Commit the configuration.
Code Block |
---|
admin@SwitchA# commit |
Switch B
Step1 Configure VLAN interface.
Code Block |
---|
admin@SwitchB# set vlans vlan-id 22 l3-interface vlan22 admin@SwitchB# set vlans vlan-id 33 l3-interface vlan33 admin@SwitchB# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 22 admin@SwitchB# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 33 admin@SwitchB# set l3-interface vlan-interface vlan22 address 10.20.1.2 prefix-length 24 admin@SwitchB# set l3-interface vlan-interface vlan33 address 10.30.1.1 prefix-length 24 |
Step2 Enable IP routing.
Code Block |
---|
admin@SwitchB# set ip routing enable true |
Step3 Configure OSPF for the connections between Switch A, Switch B and Switch C.
Code Block |
---|
admin@SwitchB# set protocols ospf router-id 2.2.2.2 admin@SwitchB# set protocols ospf network 10.30.1.0/24 area 0 admin@SwitchB# set protocols ospf network 10.20.1.0/24 area 0 |
Step4 Commit the configuration.
Code Block |
---|
admin@SwitchB# commit |
Switch C
Step1 Configure VLAN interface.
Code Block |
---|
admin@SwitchC# set vlans vlan-id 33 l3-interface vlan33
admin@SwitchC# set vlans vlan-id 44 l3-interface vlan44
admin@SwitchC# set interface gigabit-ethernet te-1/1/17 family ethernet-switching native-vlan-id 33
admin@SwitchC# set interface gigabit-ethernet te-1/1/23 family ethernet-switching native-vlan-id 44
admin@SwitchC# set l3-interface loopback lo address 200.200.200.200 prefix-length 32
admin@SwitchC# set l3-interface vlan-interface vlan33 address 10.30.1.2 prefix-length 24
admin@SwitchC# set l3-interface vlan-interface vlan44 address 10.2.1.2 prefix-length 24 |
Step2 Enable IP routing.
Code Block |
---|
admin@SwitchC# set ip routing enable true |
Step3 Configure OSPF routes for underlay communication.
Code Block |
---|
admin@SwitchC# set protocols ospf router-id 3.3.3.3 admin@SwitchC# set protocols ospf network 10.30.1.0/24 area 0 admin@SwitchC# set protocols ospf network 200.200.200.200 area 0 |
Step4 Configure GRE tunnel name, IP, source IP, destination IP etc.
Code Block |
---|
admin@SwitchC# set l3-interface tunnel tnl0 address 10.40.1.2 prefix-length 24 admin@SwitchC# set l3-interface tunnel tnl0 tunnel-mode gre-ip admin@SwitchC# set l3-interface tunnel tnl0 source 10200.30200.1200.2200 admin@SwitchC# set l3-interface tunnel tnl0 destination 10100.20100.1100.1100 |
Step5 Configure BGP routes for the GRE tunnel.
Code Block |
---|
admin@SwitchC# set protocols bgp local-as 200 admin@SwitchC# set protocols bgp ebgp-requires-policy false admin@SwitchC# set protocols bgp neighbor 10.40.1.1 remote-as 100 admin@SwitchC# set protocols bgp ipv4-unicast network 10.2.1.0/24 |
Step6 Enable PIM on the VLAN interface and GRE tunnel interface, configure Switch A’s GRE tunnel interface as the static RP.
NOTE: Both GRE tunnel interface and underlay interface need to be enabled for PIM.
Code Block |
---|
admin@SwitchC# set protocols pim interface vlan33 sm
admin@SwitchC# set protocols pim interface vlan44 sm
admin@SwitchC# set protocols pim interface tnl0 sm
admin@SwitchC# set protocols pim rp 10.40.1.1 group 225.0.0.0/8 |
Step7 Configure the IGMP function of the connected receiver interface.
Code Block |
---|
admin@SwitchC# set protocols igmp interface vlan44 |
Step8 Commit the configuration.
...
Code Block |
---|
admin@switchA# run show pim interface Interface State Address PIM Nbrs PIM DR FHR IfChannels tnl0 up 10.40.1.1 1 10.40.1.2 0 2 pimreg up 0.0.0.0 0 local 0 0 vlan11 up 10.1.1.2 0 local 0 0 vlan22 up 10.20.1.1 0 local 0 0 admin@switchC# run show pim interface Interface State Address PIM Nbrs PIM DR FHR IfChannels tnl0 up 10.40.1.2 1 local 0 0 pimreg up 0.0.0.0 0 local 0 0 vlan33 up 10.30.1.2 0 local 0 0 vlan44 up 10.2.1.2 0 local 0 2 |
- Run command run show l3-interface tunnel to display information about the GRE tunnel interface.
Code Block |
---|
admin@SwitchA# run show l3-interface tunnel tnl0 tnl0 State:UP Tunnel Source: 10100.20100.1.1 100.100 Tunnel Destnation: 10200.30200.1.2 200.200 Tunnel protocol/transport: gre-ip Inet addr: 10.40.1.1 Traffic statistics: 5 sec input rate IPv4 1200 packets/sec, IPv6 0 packets/sec 5 sec forwarding rate IPv4 80 packets/sec, IPv6 0 packets/sec IPv4 Input Packets............................28 IPv4 Forwarding Packets.......................5 IPv6 Input Packets............................0 IPv6 Forwarding Packets.......................0 |
...