Last week I was diving into IP multicast and decided to write a multicast calculator in Python to reinforce multicast addressing schemes. When the script is ran, it prompts the user for an IP address. If an IPv4 or IPv6 multicast address is entered, the corresponding multicast MAC address is calculated and returned. If an IPv4 unicast address is entered, a message returns and the script is terminated. I also included output to identify some of the well known multicast ranges and addresses. If an IPv6 unicast address is entered, the script will calculate and return the solicited node multicast address. Any IPv6 input also returns the fully specified address with all 0s included.
IPv4 Multicast Demo Runs
C:\Users\user\some\path>Multicast_Info.py
Welcome to the routingloop.net multicast calculator. If a multicast address is entered, we will calculate the corresponding multicast MAC address. If an IPv6 unicast address is entered, we will calculate the solicited node multicast MAC address.
Please enter an IP address: 224.0.0.10
This is an IPv4 multicast address. Calculating multicast MAC address.
The corresponding multicast MAC address for for 224.0.0.10 is 01-00-5e-00-00-0a
This is a Local Network Control Block address.
This is the EIGRP Routers address.
C:\Users\user\some\path>Multicast_Info.py
Welcome to the routingloop.net multicast calculator. If a multicast address is entered, we will calculate the corresponding multicast MAC address. If an IPv6 unicast address is entered, we will calculate the solicited node multicast MAC address.
Please enter an IP address: 224.1.0.15
This is an IPv4 multicast address. Calculating multicast MAC address.
The corresponding multicast MAC address for for 224.1.0.15 is 01-00-5e-01-00-0f
This is a Reserved address.
C:\Users\user\some\path>Multicast_Info.py
Welcome to the routingloop.net multicast calculator. If a multicast address is entered, we will calculate the corresponding multicast MAC address. If an IPv6 unicast address is entered, we will calculate the solicited node multicast MAC address.
Please enter an IP address: 192.168.0.1
This is IPv4 unicast, nothing to calculate.
IPv6 Multicast Demo Runs
C:\Users\user\some\path>Multicast_Info.py
Welcome to the routingloop.net multicast calculator. If a multicast address is entered, we will calculate the corresponding multicast MAC address. If an IPv6 unicast address is entered, we will calculate the solicited node multicast MAC address.
Please enter an IP address: ff02::a
This is an IPv6 multicast address. Calculating multicast MAC address.
With ommitted zeros included, this address is ff02:0000:0000:0000:0000:0000:0000:000a
The corresponding multicast MAC address for for ff02::a is 33-33-00-00-00-0a
This is a Link-local scope address.
This is the EIGRP Routers multicast address.
C:\Users\user\some\path>Multicast_Info.py
Welcome to the routingloop.net multicast calculator. If a multicast address is entered, we will calculate the corresponding multicast MAC address. If an IPv6 unicast address is entered, we will calculate the solicited node multicast MAC address.
Please enter an IP address: ff01::a
This is an IPv6 multicast address. Calculating multicast MAC address.
With ommitted zeros included, this address is ff01:0000:0000:0000:0000:0000:0000:000a
The corresponding multicast MAC address for for ff01::a is 33-33-00-00-00-0a
This is an Interface-local scope address.
IPv6 Unicast Demo Run
C:\Users\user\some\path>Multicast_Info.py
Welcome to the routingloop.net multicast calculator. If a multicast address is entered, we will calculate the corresponding multicast MAC address. If an IPv6 unicast address is entered, we will calculate the solicited node multicast MAC address.
Please enter an IP address: 2001:db8:a:b::1
This is an IPv6 unicast address. We will calcualte the solicited node multicast address.
With ommitted zeros included, this address is 2001:0db8:000a:000b:0000:0000:0000:0001
The solicited node multicast address for 2001:db8:a:b::1 is FF02::1:FF00:0001
If anyone wants it, I can share the code. I do not guarantee that the output is accurate, I have not really debugged the code or done much testing. The code is also pretty cruddy, I am not trained in programming and generally crash course my way though scripting with lots of trial and error.