Routing issue
Kevin Stevens
freebsd at pursued-with.net
Mon Jul 19 03:12:41 PDT 2004
On Jul 19, 2004, at 02:12, Web Walrus (Robert Wall) wrote:
> That network card has a config roughly like
>
> ifconfig_dc0 inet 1.2.3.4 netmask 255.255.255.248
> ifconfig_dc0_alias0 inet 2.3.4.5 netmask 255.255.255.248
> defaultrouter="1.2.3.1"
Excuse me why I interject that it's a royal PITA when people post
obfuscated IP information while asking IP-related questions. It
inevitably introduces confusion. Ok, I feel better now...
> When I have the network set up in this manner (packets coming in via
> two
> external lines plugged into the same switch), I can only access the
> network that is on the same network as the default router. In the
> example
> above, I can access the server by 1.2.3.4, but not by 2.3.4.5. If I
> change the defaultrouter to 2.3.4.1, I can access the server by 2.3.4.5
> but not 1.2.3.4.
Access the server from where? Let me test my understanding. You have
a server with one NIC and two addresses, plugged into a single switched
network along with two ethernet connections to external ISPs, and
you're trying to connect to the server from a remote network via the
different addresses?
If both addresses can reach the network you are connecting from, it
should work via either address. Note that the RESPONSE may come to you
from a different address, and if that confuses your application THAT
may break. For example, if you come in on 2.3.4.5, the reply will
still return via 1.2.3.4 - your server can only have one default
gateway, and if that's how it knows to reach you, that's where it will
go.
If your two networks can't both reach your source network, then yes, it
will break.
There are workarounds, most involve either a dynamic routing protocol
that can assign priorites to the different paths, or introducing an
external device (firewall, router) that basically does the same thing.
Essentially you need more elaborate routing that takes availability
into account.
KeS
More information about the freebsd-questions
mailing list