Posted on December 8, 2015 1:59 pm
 |  Asked by Atrey
 |  6660 views
RESOLVED
1
1
Print Friendly, PDF & Email

Is there a way to manually join a mcast group similar to “ip igmp join-group” on Cisco platform?

0
Answered on December 8, 2015 3:54 pm

EOS doesn’t support the equivalent command to ”ip igmp join-group” which is a SW switched method for forcing an interface to send IGMP joins.  The HW switched command ”ip igmp static-group” is supported.  This command is a little different in that is doesn’t force the CPU to send IGMP joins, but will manually program an OIL for the group/interface in question.

Additionally, if you need test traffic to be generated, you can use the following linux tool…

The idea being that you can have perhaps a separate Arista switch act as a multicast source, and sending towards the Arista switch which has the static IGMP entry.

switch#bash

Arista Networks EOS shell

[admin@switch ~]$ sudo ethxmit -h | less
[admin@switch ~]$ sudo ethxmit -D 01:00:5e:0a:0a:0a –ip-src=25.1.1.1 –ip-dst=224.10.10.10 -n 100 et5
[admin@switch ~]$ sudo ethxmit -D 01:00:5e:0a:0a:0a –ip-src=25.1.1.1 –ip-dst=224.10.10.10 -c et5

- Example (2)

[admin@switch ~]$ sudo ethxmit -D 01:00:5e:21:7e:0e –ip-src=1.1.1.1 –ip-dst=239.12.12.20 -s 1459 –dont-fragment –vlan=1000 et45 –data-type=random

ethxmit –help
Usage: ethxmit [ OPTIONS ] interface

Options:
-h, –help            show this help message and exit
-s SIZE, –size=SIZE  packet size, including CRC (default: minimum possible
size, typically 64)
-S SMAC, –smac=SMAC  source MAC address (default: use interface’s MAC
address)
-D DMAC, –dmac=DMAC  destination MAC address (default: ff:ff:ff:ff:ff:ff)
-e ETHERTYPE, –ethertype=ETHERTYPE
ethertype (default: 0x1234)
-V IP_VERSION, –ip-version=IP_VERSION
IP version either 4 or 6 (default: 4)
–vlan=VLAN           vlan id (default: no tag, or 0 if –vpri is set)
–vpri=VPRI           vlan priority (default: no tag, or 0 if –vlan is set)
–inner-vlan=INNER_VLAN
inner vlan id (default: no tag, or 0 if –inner-vpri
is set)
–inner-vpri=INNER_VPRI
inner vlan priority (default: no tag, or 0 if –inner-
vlan is set)
–ip-src=ADDR         source IP address
–ip-dst=ADDR         destination IP address
–ip-protocol=PROTO   IP protocol number or name (default: 63)
–ttl=TTL             IP TTL (Time To Live) value (default: 64)
–tos=TOS             IP TOS (Type Of Service) value (default: 0)
–dont-fragment       Set IP Don’t Fragment flag as 1
–more-fragments      Set IP More Fragments flag as 1
–frag-offset=FRAG_OFFSET
Fragment offset in units of 64-bits (e.g. 1 = 64 bits)
–ip-id=IP_ID         IP header id
–router-alert        add a Router Alert IP option
–udp-sport=PORT      UDP source port number
–udp-dport=PORT      UDP destination port number
–inner-udp-sport=PORT
inner source UDP port for a tunneled IP/UDP packet
–inner-udp-dport=PORT
inner dest UDP port for a tunneled IP/UDP packet
–inner-ip-protocol=PROTO
IP protocol number or name (default: 63) for a
tunneled IP packet
–inner-ttl=INNER_TTL
IP TTL (Time To Live) value (default: 64) for a
tunneled IP packet
–inner-tos=INNER_TOS
IP TOS (Type Of Service) value (default: 0) for a
tunneled IP packet
–inner-ip-src=ADDR   inner source IP address for a tunneled IP packet
–inner-ip-dst=ADDR   inner destination IP address for a tunneled IP packet
–inner-smac=INNER_SMAC
source MAC address for inner header of a tunneled
packet (default: 00:00:aa:aa:aa:aa)
–inner-dmac=INNER_DMAC
destination MAC address for inner header of a tunneled
packet (default ff:ff:ff:ff:ff:ff)
–inner-ethertype=INNER_ETHERTYPE
ethertype for inner header of a tunneled packet
(default: 0x0800 for IP)
–inner-ip-version=INNER_IP_VERSION
IP version either 4 or 6 (default: 4) of a tunneled IP
packet
–inner-dont-fragment
Set IP Don’t Fragment flag as 1 for a tunneled IP
packet
–inner-more-fragments
Set IP More Fragments flag as 1 for a tunneled IP
packet
–inner-frag-offset=INNER_FRAG_OFFSET
Fragment offset in units of 64-bits (e.g. 1 = 64 bits)
for a tunneled IP packet
–inner-ip-id=INNER_IP_ID
IP header id for a tunneled IP packet
–vxlan-vni=VXLAN_VNI
vni for Vxlan packet (adds vxlan header). Also: Sets
IP_PROTO to udp and dest port to vxlan port, unless
overridden
–mpls-label=LABEL    add an MPLS (Multiprotocol Label Switching) header to
the packet and set the label
–mpls-ttl=MPLS_TTL   MPLS TTL (Time To Live) value (default: 64)
–mpls-exp=MPLS_EXP   MPLS EXP (Experimental ) value (default: 0)
–gre                 enable Generic Routing Encapsulation (GRE)
–gre-over-mpls       enable Generic Routing Encapsulation (GRE) over MPLS
–gre-protocol=PROTO  set the protocol type of the GRE payload (default:
0x0800 (IP))
–gre-version=VER     set the GRE version number (default 0)
–gre-checksum=VALUE  enable Checksum Present bit in GRE header and insert
checksum with VALUE, not enabled by default
–gre-key=VALUE       enable Key Present bit in GRE header and insert key
with VALUE, not enabled by default
–gre-sequence=VALUE  enable Sequence Number Present bit in GRE header and
insert sequence number with VALUE, not enabled by
default
–data-type=TYPE      one of: constant, incrementing, random (default:
incrementing)
–data-value=VALUE    data value to use if data-type is ’constant’ (default:
0)
–random-seed=SEED    seed for random number generator
-n NUM, –num=NUM     total number of packets to send (default: 1)
–seq                 replace last four bytes of user payload with
incrementing sequence value
-b BURST, –burst=BURST
number of packets in each burst (default: 1)
–sleep=SLEEP         how long to sleep (in seconds) after each burst
(default: 0.0)
-c, –continuous      run continuously
-B SNDBUF, –sndbuf=SNDBUF
socket send-buffer size to use
–arp=ARP             ARP: ”request”, ”reply”
–rarp=RARP           RARP: ”request”, ”reply”
–isl-f1=F1           f1 field in ISL header
–isl-f2=F2           f2 field in ISL header
–isl-sglort=SGLORT   sglort field in ISL header
–isl-dglort=DGLORT   dglort field in ISL header
–stdout              write packet to stdout
[admin@switch ~]$

2
Posted by Dave Thelen
Answered on December 8, 2015 4:13 pm

Are you looking to simulate a PIM join or IGMP join?

 

Depending on what code you are running we do support igmp host proxy:

 

ro502-alta-lab……08:12:28(config-if-Vl1)#ip igmp host-proxy ?
A.B.C.D          Group Address
access-list      Group Access List name
exclude          Exclude source
include          Include source
report-interval  Time interval between unsolicited reports
version          IGMP version on IGMP host-proxy interface
<cr>

This will allow the switch to send an IGMP join out.  If you just want a PIM join then ip igmp static-group would be the way to go.

For older EOS version, you could use a simple script:

#! /usr/bin/python
import socket
import sys
import time

MCAST_GRP = sys.argv[1]
SOURCE_IP = sys.argv[2]

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
mreq = socket.inet_aton(MCAST_GRP) + socket.inet_aton(SOURCE_IP)
sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)

while True:
time.sleep(60)

(Alexis Dacquay at December 11, 2015 2:31 pm)
0
Posted by Alexraj Durairaj
Answered on December 8, 2015 4:25 pm

ip igmp static-group 236.0.0.1

0
Posted by Christie Joseph
Answered on December 8, 2015 10:12 pm

Hi Atrey,

You can use the ip igmp static-group command on an interface.

Command Syntax : ip igmp static-group group_address [SOURCE_ADDRESS]

 

 

From the config guide:

”The ip igmp static-group  command configures the configuration mode interface as a static member of

a specified multicast group. This allows the router to forward multicast group packets through the

interface without otherwise appearing or acting as a group member. By default, static group

memberships are not configured on any interfaces.

If the command includes a source address, only multicast group messages received from the specified

host address are fast-switched. Otherwise, all multicast messages of the specified group are

fast-switched.”

 

Marked as spam
0
Posted by Alexraj Durairaj
Answered on December 9, 2015 9:13 am

should be the below

ip igmp static-group 239.30.0.1

Post your Answer

You must be logged in to post an answer.