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

Re: problem with network configurations



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

> Recently I looked into setting up my laptop so that it could switch
> between static and dhcp.  I looked at an article on this group and
> tried the suggestion and it didn't work.  I restored my interfaces
> file back to normal (i had commented out what I had put in before) and
> thought all would be well, but now it doesn't seem to like even my old
> static ip network anymore.

Well, first off:

> # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
> iface eth0 inet dynamic

The last word of that line wants to be "static" or "dhcp", probably in
your case "static"; see interfaces(5) or the example in
/usr/share/doc/ifupdown.  You should get an error message if you run
'ifup eth0' by hand.

> Is there any sort of reconfig tool for the network in debian?
> Anybody see what might be wrong? Also, what is the best way to be
> able to switch between static and dhcp for me?

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

So at boot time, the network will try to come up (via ifplugd, but
that's a detail) and get DHCP.  If I know I want a static address
instead, I can do 'ifdown eth0; ifup eth0=net-home' to use a different
set of network parameters.

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



Reply to: