Hi,
In my testing I am using multiple IP address for a single port, for this I am creating a stream to send GARP messages for each IP periodically. Currently I am manually fetching the MAC Address and updating in the packet details, is there any API we can use to get the MAC adress of the ports without needing to update them manually in case the port that is being used changes.
Below is the snipped from my script:
garp_base_pkt = Ether(src="ec:9e:cd:19:13:95",dst="ff:ff:ff:ff:ff:ff")/ARP(hwsrc="ec:9e:cd:19:13:95",hwdst="ec:9e:cd:19:13:95")
port0_range = {'src': {'start': "1.1.1.1", 'end': "1.1.1.17"}, 'vlan': {'start': 2222, 'end': 2222}}
ip = port0_range['src']
vlan = port0_range['vlan']
garpvm = [ STLVmFlowVar(name="ip", min_value=ip['start'], max_value=ip['end'], size=4, step=4, op="inc"),
STLVmWrFlowVar(fv_name="ip", pkt_offset="ARP.psrc"),
STLVmWrFlowVar(fv_name="ip", pkt_offset="ARP.pdst"),
]
garp_pkt = STLPktBuilder(garp_base_pkt, vm = garpvm)
garp = STLStream(packet = garp_pkt, mode = STLTXCont(pps = 1))
c.add_streams(garp, ports = 0)
Thanks in advance for your support.
Thanks and Regards,
Abhilash