In my Windows PC, installed scapy
tool for sending packets from my system to raspberry Pi board connected to my machine using VLAN.
In my raspberry Pi board, Firewall rules are already configured and one such rule is as below
Chain VARIABLE_IN
0 0 ACCEPT udp -- eth0.61 * 229.255.41.90 160.48.249.97 udp spt:1125 dpts:3490:1125
Using scapy, below command is executed to send packets
p=Ether(dst="ff:ff:ff:ff:ff:ff")/Dot1Q(vlan=61)/IP(src='229.255.41.90',dst='160.48.249.97')/UDP(sport=1125, dport=1125)/"hello123"
sendp(p,iface='Ethernet')
After executing above commands, packets are not updated in firewall rule.
But in firewall rule if source ip is changed to 160.48.249.90 like below
Chain VARIABLE_IN
0 0 ACCEPT udp -- eth0.61 * 160.48.249.90 160.48.249.97 udp spt:1125 dpts:3490:1125
and scapy command as below
p=Ether(dst="ff:ff:ff:ff:ff:ff")/Dot1Q(vlan=61)/IP(src='160.48.249.90',dst='160.48.249.97')/UDP(sport=1125, dport=1125)/"hello123"
sendp(p,iface='Ethernet')
Now packets are updated. What is the connection between VLAN eth0.61 and source ip address?
If i check ipconfig
in my board, then it shows as below:
eth0.61: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
inet 160.48.219.91 netmask 255.255.255.128 broadcast 160.48.249.127
inet6 fd80::212:22jf:ff33:4565 prefixlen 64 scopeid 0x20<link>
So IP address range starting from 160 series is only supported by eth0.68?
iproute
it daisplays229.255.41.90 dev eth0.61 scope link src 160.48.249.97
. So as per this destination ip is229.255.41.90
and multicast ip can be destination ip, right ?src='229.255.41.90'
which implies it is the source IP229.255.41.90
was considered as destination IP. But in my testing using scapy, passed this IP as source IP, hence it was not working.