Re: two nic same server
On Thu, Oct 09, 2003 at 07:57:23AM -0400, Dan MacNeil wrote:
>
> I can't answer you question for sure, but have a vaguely similar
> question about two network cards in the same server.
>
> We have (2) nics in our main server. One faces our internal network runs
> samba & the like, the other faces the outside world and runs apache and
> the like.
>
> The internal network has a separate NAT gateway on a completely different
> machine.
>
> To get this setup to work we needed a:
>
> route add default gw 129.63.24.254
>
> ...which is in /etc/init.d/rc.local
>
> Putting the gateway in /etc/network/interfaces didn't work.
>
> When we reboot, everything is fine. When people do a ifup eth1, things
> don't work unless they also do a rc.local People have a habit of
> forgetting the rc.local bit...
>
> We could easily wrap ifup with something like:
>
> #!/bin/sh
> # this ifup is in path before /sbin/ifup
>
> route add default gw 129.63.24.254
> /sbin/ifup $1
>
> ...but I am concerned that we will then forget this information.
>
> 1) In general does it make some to avoid hiding too config details?
> 2) Is there a better way to do this than in rc.local?
>
>
see the manpage interfaces(5), specifically the up command.
auto eth1
iface eth1 inet static
...
up route add default gw 129.63.24.254
--
Frode Haugsgjerd
Norway
Reply to: