Lose connectivity to the net after reboot


Forum: Networking
Topic: Lose connectivity to the net after reboot
started by: pcdoctor

Posted by pcdoctor on April 19 2008,08:12
I'm used to using ubuntu/kubuntu so DSL is a little new to me.

I have this in my \etc\network\interfaces file

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

auto eth0
iface eth0 static ip
address 192.168.0.2
netmask 255.255.255.0
sudo eth0 autoneg off speed 100 duplex full

I have to type these three commands in order to get my internet connection working after a reboot.  This pc is sharing the internet with another one, at least until I give it to my cousin.  Once I give the pc to my cousin, it will be connected to a router.

Here are my three commands that I type in the terminal:

ifconfig eth0 192.168.0.2
route add default gw 192.168.0.1
echo nameserver 192.168.0.1 > /etc/resolv.conf

I've even done a sudo /etc/init.d/networking restart but nothing works until I type the three lines in.
What file do I need to modify so that my internet connection works after reboot and/or restart?
Basically, what can I do so that I don't have to issue the three commands above all the time?  
thx.

Posted by roberts on April 19 2008,09:36
How to manually assign a static ip is a  common question with answer in the wiki; place your commands in /opt/bootlocal.sh.

Or better yet use the gui tool provided in DSL which does this for you.

Posted by pcdoctor on April 19 2008,12:14
thx. (as always)
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.