Help with content of /etc/network/interfaces file ** progress**

Jay Ridgley jridgley2 at
Tue Feb 23 02:33:30 UTC 2010

Nils Kassube wrote:
> Jay Ridgley wrote:
>> > Nils Kassube wrote:
>>> > > Jay Ridgley wrote:
>>>>> > >> > When I enter an ifconfig it shows the three nics, however, eth2
>>>>> > >> > does not have an IP address. If I remove the comment flag(#)
>>>>> > >> > from the iface line and the auto line my network fails to come
>>>>> > >> > up. Any examples I have found seem to avoid this type of
>>>>> > >> > arrangement (two nics doing DHCP one a client (for the internet)
>>>>> > >> > and one a server (for the Access Point).
>>> > >
>>> > > If I understand it correctly, you have eth0 connected to the
>>> > > internet and you get your configuration via DHCP from your
>>> > > provider. On your eth1 you have a first LAN where your DHCP server
>>> > > should hand out configuration to other machines and on eth2 you
>>> > > have a second LAN via that AP where your DHCP server should also
>>> > > hand out configuration data to other machines.
>> > 
>> > Not quite, eth0 is the DHCP client to the provider and provides my
>> >  connection to the INTERNET.
>> > 
>> > eth1 is a second nic on the same machine and eth2 is a third nic.
>> >  eth1 is a WIRED subnet with STATIC addresses (4 machines here
>> >  including this one).
>> > 
>> > eth2 is for a WIRELESS subnet that is WIRED to the WIRELESS Access
>> >  Point.
> OK, that's more or less what I wrote (or meant to write) but your 
> description is much better worded and with some more details.
>>> > > Now, if you uncomment the eth2 entries, there are two interfaces
>>> > > with DHCP entries (eth0 + eth2). These entries mean that the ports
>>> > > should act as DHCP clients. I suppose that's why your network fails
>>> > > to come up.
>> > 
>> > eth2 is for a DHCP SERVER not a CLIENT.
> Yepp, that is the problem. If you enable the eth2 lines in the 
> interfaces file, you try to set it up as dhcp CLIENT. And as there are 
> two such dhcp CLIENT entries, it fails.
>>>>> > >> > iface eth1 inet static
>>>>> > >> > address
>>>>> > >> > netmask
>>>>> > >> > gateway
>>>>> > >> > broadcast
>>> > >
>>> > > Are you sure that the gateway should be the same as the interface
>>> > > itself? That doesn't look right to me. IMHO the gateway should be
>>> > > the address of the internet port, i.e. the address received for
>>> > > eth0.
>> > 
>> > is the address of the machine which has the eth1 nic,
>> >  it is also my gateway, hence the duplication. This part is OK, it
>> >  has NOT changed.
> OK, I understand this, but your entry is for this particular interface, 
> not for the entire machine. The gateway for your machine is the 
> interface which connects to the internet, i.e. eth0. However your 
> gateway entry defines the default route to be via eth1. I suppose it 
> works because the dhcp negotiation on eth0 resets the default route 
> later on, but IMHO the gateway line should be taken out.
>> > The problem seems to revolve around the iface eth2 entries in the
>> >  interfaces file(contained in my original post).
> And these lines were this:
> | #iface eth2 inet dhcp
> | #auto eth2
> IMHO you should use a static entry for eth2, something like this:
> iface eth1 inet static
>  address
>  netmask
>  broadcast
> auto eth2
> Sorry, I originally wanted to add this to the previous mail but instead 
> of saving it as draft, I sent it away unfinished.
>>>>> > >> > dhcpd.conf:
>>>>> > >> >
>>>>> > >> > #DHCP subnet a wireless Access Point for eth2
>>>>> > >> >
>>>>> > >> > subnet netmask {
>>>>> > >> >      range;
>>>>> > >> >          option routers;
>>> > >
>>> > > is not in this subnet - I don't think this entry can
>>> > > work.
>> > 
>> > is the GATEWAY for my network. What other IP should be
>> >  used here? Should the option routers be option gateway instead???
> Your machine IS the router for your network. Therefore the option name 
> "routers" is OK (and according to the dhcpd-options man page there is no 
> option gateway). I never played with dhcpd, so I may be wrong, but to my 
> understanding "option routers;" means that dhcpd tells the 
> client that is their router, i.e. their default route, 
> where everything is sent which is not in the same subnet as defined by 
> the interface configuration. This is OK for your subnet 
> where is inside this subnet. But for the 
> client's gateway should be the address of your eth2, i.e. 
> in my example above.

Well I did as you suggested and have had some success, however, I still am not 
able to get a DHCP address assigned to my laptop. THANK YOU! Currently the 
/etc/network/interfaces entry for eth1 and eth2 contain:

iface eth1 inet static

auto eth1

iface eth2 inet static

auto eth2

And the /etc/dhcp3/dhcpd.conf file contains:

# DHCP configuration for CDJ Systems Wireless subnet of a Belkin Access Point

ddns-update-style interim;
ignore client-updates;

# DHCP for eth0 - outside world connection via cable modem
#  no entries here

# Static subnet for eth1

subnet netmask {
           option routers;
           option subnet-mask;
           option domain-name-servers,;
           option ip-forwarding off;

#DHCP subnet a wireless Access Point for eth2

subnet netmask {
         option routers;
         option subnet-mask;
         option broadcast-address;
         option domain-name-servers,;
         option ip-forwarding off;
         default-lease-time 21600;
         max-lease-time 43200;
# Include a static ip address for the Access Point (per vendor)

host bear_den {
         hardware ethernet 00:11:50:45:7A:42;

This seems to allow at least some connectivity to the access point. At least I 
have an ip address that has been assigned, since ifconfig eth2 shows:

eth2      Link encap:Ethernet  HWaddr 00:c0:4f:45:cf:06
           inet addr:  Bcast:  Mask:
           inet6 addr: fe80::2c0:4fff:fe45:cf06/64 Scope:Link
           RX packets:2153 errors:0 dropped:0 overruns:0 frame:0
           TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:159851 (156.1 KB)  TX bytes:468 (468.0 B)
           Interrupt:11 Base address:0xc000

I am also able to ping the access point from the system that contains the three 
nics and have been able to set the ESSID and WPA PSK for it, from the laptop 
with a wireless connection. And interestingly I am ALSO able to ping from hosts 
in the 0/28 sub net. Is this correct? I would have expected that this would not 
be possible. But it is a minor issue right now. I have not tried to ping from 
the 32/28 sub net to a host on the 0/28 subnet.

The last piece of this puzzle I need to get figured out is: How do I get a DHCP 
connection provided to my laptop? I am running Firestarter as my firewall, would 
that have anything to do with not getting a connection through wlan0?

Thanks once again for you help thus far!



Jay Ridgley
jridgley2 at
Registered Linux User ID - 9115
Registered Ubuntu User ID - 23320

More information about the ubuntu-users mailing list