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

Re: problem with network configurations



David Z Maze <dmaze@debian.org> wrote in message news:<1ej0K-6EQ-3@gated-at.bofh.it>...
> 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.
> 
yeah, I noticed that this morning and slapped my forehead.
> > 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.
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?  A little more info
would be greatly appreciated.  Thank you,
 -Enantiomer



Reply to: