Question: Code provided: import socket #Not the actual RIP multicast group... MCAST_GRP = '224.1.1.2' MCAST_PORT = 520 # regarding socket.IP_MULTICAST_TTL # --------------------------------- # for all packets

Code provided:
import socket
#Not the actual RIP multicast group... MCAST_GRP = '224.1.1.2' MCAST_PORT = 520 # regarding socket.IP_MULTICAST_TTL # --------------------------------- # for all packets sent, after two hops on the network the packet will not # be re-sent/broadcast (see https://www.tldp.org/HOWTO/Multicast-HOWTO-6.html) MULTICAST_TTL = 2
rip_request = bytearray([0x01, 0x01, 0x00, 0x00, 0x01, 0x01,0x01])
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, MULTICAST_TTL) sock.sendto(rip_request, (MCAST_GRP, MCAST_PORT))
Need part C.
Using following: Python implement a simple code that performs the a. Listens on the RIP UDP port (520) for messages. b. Decodes RIPV1 messages passed on that port, and acts on a RIP Request (Command 0x01). You can ignore all other requests. Responds with a RIPv1 response with a simple routing table c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
