[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DHCP Problems



On Thu, 2003-12-25 at 11:00, Alan Chandler wrote:
> I have been reconfiguring the networking on my SARGE based server so 
> that it can act as an internet gateway for my home network.  This 
> requires that it uses dhcp (client) to get an ip address from my ISP for 
> the internet interface (eth0) and that it has a fixed ip address with a 
> dhcp server for the lan side interface (eth1).
> 
> In /etc/network/interfaces if have two stanzas, One for the external 
> interface is
> 
> 
> iface eth0 inet dhcp
>          pre-up /etc/firewall $IFACE
>          pre-up echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> the other for the lan side is
> 
> iface eth1 inet static
>          address 10.0.10.100
>          netmask 255.255.255.0
>  
> 
> 
> However, I am suffering because dhclient appears to operate on both 
> interfaces, and seems to get a lease from the the server on this machine 
> which it the overwrites the static interface definition.
> 
> I have temporarily made my server recognise the ethernet MAC address of 
> the static interface and allocate the same address - but surely there is 
> a way to tell dhclient not to try and discover an address for an 
> interface.  I tried to use the alias option in dhclient.conf, but that 
> didn't seem to do anything.
> 
> Is there a better way?
> 
> 

Hi Alan,

   have the same setup as you do, compared my /etc/network/interfaces
with yours, only difference I found is I have the 'auto' statements:

auto eth0
iface eth0 inet static
        address 192.168.x.y
...
auto eth1
iface eth1 inet dhcp
        hostname "XYZ"

Also, as you see, my internal net is setup first. Hope you can do
something with this. My /etc/dhclient.conf only contains a
'send host-name "XYZ"'

Sincerely,

Jan.



Reply to: