Re: problem switching from airport to ethernet
Re: problem switching from airport to ethernet
- Subject: Re: problem switching from airport to ethernet
- From: "Peter Sichel" <email@hidden>
- Date: Thu, 16 Jun 2005 21:22:34 -0400
On 6/16/05, David T. Greenfield wrote:
>AirPort is turned on and I've got a network connection through it.
>Ethernet and modem network ports are turned on but not connected (no ethernet
>cable plugged in and modem not dialed in).
>My client application is connected to the server via AirPort.
>
>Now, if I plug a live ethernet cable into the laptop, after a few seconds it
>gets an IP address assignment for the ethernet network port and then my
client
>application can no longer communicate with the server, but OpenTransport
>doesn't
>produce any errors.
In Mac OS X, Open Transport is just a compatibility library on top of
BSD sockets. As I understand it, when you plugged in your Ethernet
cable it became the primary interface and captured the router or default
gateway.
>I assume what's happening is that once the ethernet network connection is
>established then OpenTransport sends everything out that network port
>using its
>IP address.
I believe Mac OS X uses a "weak endpoint system model" which means it
can send packets via Ethernet with the source IP address of your AirPort
interface. If your TCP connection is still established (easy enough to
check with a tool like IPNetMonitorX), packets should still be
originating from the correct endpoint, but they are being routed to a
different default gateway. If either the AirPort or Ethernet gateway is
a NAT gateway, it could be translating the source IP address incorrectly.
> Is there a way that I can make my application continue to use the
>network port on which its connection was established?
I have implemented a feature called "source aware routing" in
IPNetRouterX that tracks which port connections were established on and
redirects packets out the correct port overriding the default gateway.
Drop me a note if you would like to try this so I can send you the
latest version. My intent was to be able to serve connections on two
ports at the same time using redundant cable and DSL connections for example.
> If not then does the
>client have to check its host's default IP address before each attempt to
>communicate with the server and make a new connection if the address has
>changed? Or maybe there's some other means of dealing with this?
You can request the System Configuration Framework to notify you when
keys in the Dynamic Store are changed. For example, you could get a
callback whenever the router address changes and use this to restart the
connection.
Kind Regards,
- Peter Sichel
Sustainable Softworks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden