Python Udp Sockets With Multiple Interfaces
Solution 1:
Given the output from "route", it looks like you're 10.10.10.12 and 10.31.9.0 interfaces have been configured with overlapping subnets. The OS is choosing to use 10.10.10.12 for all 10.x.x.x addresses as it's the first rule that applies.
Having overlapping subnets is normally a network configuration error: it's probably intended that 10.10.x.x and 10.31.x.x are the valid subnets and both should use a netmask of 255.255.0.0, and so the current 255.0.0.0 netmask used by the 10.10.10.12 interface is incorrect.
(It may be possible to 'fudge' a fix, if the intention is to make all 10.x.x.x requests use the 10.10.10.12 interface except for those in 10.31.x.x which should use the 10.31.9.0 address, by changing the 'metric' of the 10.31.0.0 routing rule so that anything for 10.31.x.x addresses matches that rule before the 10.x.x.x rule is checked. You can use the route
command to make that change, but it's definitely not recommended! Fixing the overlapping subnets is the proper solution.)
Solution 2:
Turns out, the Packets that my "server" was sending where not IP kosher. so they where getting rejected at the network and transport layers. Solution was to not use python socket class, but instead communicate directly to OSI-L2 using winpcap and ctypes
Post a Comment for "Python Udp Sockets With Multiple Interfaces"