Mailinglist Archive: opensuse (3349 mails)

< Previous Next >
Re: [SLE] Dual NICs
  • From: Anders Johansson <andjoh@xxxxxxxxxx>
  • Date: Thu, 12 May 2005 01:13:59 +0200
  • Message-id: <200505120113.59344.andjoh@xxxxxxxxxx>
On Thursday 12 May 2005 01:05, Steven R. Sharp wrote:
> Has anyone had any experience with a dual-homed machine? One NIC gets
> its info from a DHCP server, the other one has a static IP address. The
> DHCP-assigned NIC is the main interface for the internet, etc. The
> static is only used for a few internal networks. Can they both have a
> default gateway? If so, how is that setup?

A NIC doesn't have a gateway, a system does. The default gateway is where all
packets get sent that the system doesn't have a specific rule for.

However, all routing rules can have a gateway, just not a default gateway. You
can say for example "all packets to network 192.168.100.0/255.255.255.0
should be sent on device eth2 and go through gateway 192,168.10.5". It would
be something like

route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.5 dev eth2

The device is usually not needed, since for this rule to work, you need to
have another routing rule telling the system how to get to 192.168.10.5, and
the device is set in that rule

If you have multiple internal networks going through gateways, you may need to
add a few of these rules. See "man routes" for a description of how to make
it stick across reboots. If you only have one internal network, yast will set
everything up for you nicely


< Previous Next >
Follow Ups
References