|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Strange socket bind behavior on multihome system
Hi guys,
On a multihome Windows system I am sending packets over a raw socket. If I bind to an IP address with a higher metric in the route table, the packet actually goes out an interface with a lower metric in the route table. The IP src addr in the packet is still the bound IP address. I think I am hitting the route feature as described in the following. blogs.msdn.com/zhengpei/archive/2007/04/25/socket-binding-on-a-multihomed-host.aspx Quoted from above link: "Even if you call bind() to bind the socket to a specific local address (which means connection manager's AutoLSP is not associated with the socket), still your packets on this socket are subject to the routing decision in terms of choosing which physical interface will be used. " If I change the route to make the bound IP address a lower (therefore preferred) metric then it works as expected. Does anyone know if this is the case? Is there anyway around this? I'm trying to use Pcap to grab packets and am finding it impossible since my packets are going out a different interface than I expect! Thanks, Mona |
|
#2
|
||||
|
||||
|
this would be a networking question methinks, unless you have code ...
__________________
--Ax without exception, there is no rule ... The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones ![]() 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie Zawinski |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Strange socket bind behavior on multihome system |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|