Re: Detecting virtual IP addresses



On Mon, 05 Dec 2005 21:50:29 GMT, Joseph Dionne wrote:
> It is my assumption that I cannot bind to a virtual "interface," and
> I could be wrong. However, since the only "error" is a connection
> timeout, that does not provide any useful information to detect
> virtual IP addresses.

A network interface as seen by the application - virtual or otherwise
- is nothing but a data structure in the kernel, regardless of whether
there is an underlying physical interface. If it were not possible to
bind a Socket to them they would be of little use to anyone, since
binding is an inherent part of every Socket connection (even though
it's usually implicit on the client side).

There is AFAIK no way for an application to detect with certainty
whether a given interface is virtual or not, even from C. Use a
heuristic instead, for example the vmware interfaces are usually
called vmnet0 etc.

It sounds to me like your problem is one of routing, i.e. "you can't
get there from here". When you bind your Socket to one of the virtual
interfaces it can't reach the destination you're trying to connect to.
Have a look at your routing table, and try using ethereal to see what
actual traffic is generated.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
.



Relevant Pages

  • Re: Site-to-Site VPN client routing question - clients at branch office not able to acce
    ... it is just a matter of checking the routing tables. ... Your DC might only have one NIC, but as soon as your VPN connection is made it has two IP addresses, so you get all sorts of problems. ... On the RRAS server at HQ, configure a demand-dial interface. ... On the RRAS server in Shanghai, configure a demand-dial interface and give it a static route to 194.1.1.0/24 as above. ...
    (microsoft.public.windows.server.networking)
  • Re: Two Networks on one System
    ... On the assumption that A and B are completely disconnected, then the only solution for this problem that I know of is to do policy-based routing using the source address or interface to make routing decisions, rather than using solely the destination address. ... there are two different ISP providing access to two different interfaces. ... If there is only a master DNS on the server, then I guess the worst thing that could happen would be strange timeouts and connection reset. ...
    (freebsd-questions)
  • Re: Problem configuring NAT to share Internet Connection
    ... One of my NICs in the server connect to a DSL ... modem and it connects to internet. ... > interface, that connects to the DSL modem, LAN interface, that connects to ... >> 7.- To connect server to Internet, I create a new network connection. ...
    (microsoft.public.win2000.ras_routing)
  • Re: Long Time Samba No Work-Need Expert Help On Samba/Networking
    ... I can ping the WinXP and Ubuntu pcs very ... Yielding connection to IPC$ ... added interface ip=192.168.1.64 bcast=192.168.1.255 ... Default User Disk ...
    (Ubuntu)
  • Re: Site-to-Site VPN client routing question - clients at branch office not able to acce
    ... You can check this by making sure that the dd interface on the answering router has changed to connected status. ... Your DC might only have one NIC, but as soon as your VPN connection is made it has two IP addresses, so you get all sorts of problems. ... select the demand-dial interface from the dropdown list. ...
    (microsoft.public.windows.server.networking)