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

Re: problem with network configurations



jpugh@gladstone.uoregon.edu (enantiomer) writes:

> David Z Maze <dmaze@debian.org> wrote in message news:<1ej0K-6EQ-3@gated-at.bofh.it>...
>> My laptop's /etc/network/interfaces file looks very loosely like
>> 
>> iface eth0 inet dhcp
>> 
>> iface net-home inet static
>>         address 192.168.1.3
>>         netmask 255.255.255.0
>>         broadcast 192.168.1.255
>>         gateway 192.168.1.1
>
> and if i declare the static part first, then it would load the static
> ip first and I would have to manually call ifup for the dhcp?  would i
> have to name the static like: "iface eth0 inet static" and the dhcp
> like "iface at-school inet dhcp"? Is it the order that matters in the
> interfaces file?  I am a little confused on the naming convention
> here.  Do I even have to use the "eth0" phrase?

eth0 is the actual name of the hardware interface.  (If you run
'ifconfig', you should see a listing for eth0.)  If you declare 'auto
eth0', at boot time 'ifup eth0' will happen, which will do whatever is
declared in your 'iface eth0' stanza.  The ordering is irrelevant.
Names that don't correspond to interfaces can be anything, but I
intentionally picked net-foo to (a) be consistent and (b) try to avoid
stomping on potential network interface names in the future.  I also
have several net-foo stanzas for different places I might need a
static IP, so I can 'ifup eth0=net-home' or 'ifup eth0=net-mit' or
whatever.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: