LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-24-2004, 09:20 AM   #1
sterrenkijker
Member
 
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302

Rep: Reputation: 31
changing from dynamic to static ip


Hello,

I'm on a network with a router (E-tech), I'm the only linuxcomputer here in the house. I've put off the dhcp server in the router, switching to static ip. The router's manual explains perfectly how to configure the windows computers here, and they work fine now. But I just can't get my Debian box back online. At boot-time I don't get any error messages, and the mta just starts. But when I try to get on the internet (opera) or refresh my packages list in aptitude all connections fail (server not found on every website).

My settings:

/etc/network/interfaces:
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.105
netmask 255.255.255.0
gateway 192.168.1.1

#iface eth1 inet static
# address 192.168.1.100
# netmask 255.255.255.0
# gateway 192.168.1.1

old config of /etc/network/interfaces:
auto lo
iface lo inet loopback

# This entry was created during the Debian installation
auto eth0
iface eth0 inet dhcp


/etc/resolve.conf:
search home.nl
nameserver 213.51.129.170
nameserver 213.51.144.170


output of ifconfig:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:70 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4360 (4.2 KiB) TX bytes:4360 (4.2 KiB)

dmesg:
via-rhine.c:v1.10-LK1.1.19-2.5 July-12-2003 Written by Donald Becker
http://www.scyld.com/network/via-rhine.html
eth0: VIA VT6102 Rhine-II at 0xdc00, 00:0c:6e:c4:fd:54, IRQ 23.
eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 41e1.

I changed for the windows computers in tcp/ip properties "specify an ip adress", "enable DNS" and in that tab I filled Host: testhost, domain: testdomein, DNS server search order: 192.168.1.1 (which is the router's ip). And for gateway I did 192.168.1.1.

What have I done wrong or forgotten? I hope anyone can help me, I'm quite a networking newbie...

Greetings and thanks in advance,

Corien

Last edited by sterrenkijker; 05-24-2004 at 01:49 PM.
 
Old 05-24-2004, 10:47 AM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
since you turned off dhcp you will also need say your box so. this is done in /etc/network/interfaces:

iface eth0 inet static
address 192.168.1.x <yours here
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1 < maybe your router

comment the old eth0 lines out.
this will make a static IP at bootup.
/etc/resolv.conf seems all right if they are you ISP's DNS
 
Old 05-24-2004, 10:54 AM   #3
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
oh - sorry. just saw you did that right.

try
ifconfig eth0 up (any messages?)

the ethernet card seems to be recognized ok.
 
Old 05-24-2004, 01:47 PM   #4
sterrenkijker
Member
 
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302

Original Poster
Rep: Reputation: 31
got online! yes!!!

Hey mritch,

I got it online. Thanks for your help.

Solved it by modifying my old config. I now have in my /etc/network/interfaces:

auto lo
iface lo inet loopback

# This entry was created during the Debian installation
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

Quite sure the auto eth0 did it... When I read back the manpage of interfaces it's logical, but before I knew the manpage was quite hard to understand...

I'm really happy! That's the kick of linux, you can't get it done, and suddenly you find it out . I love it . Now I can bring my server online. That's what this all started about. I've installed apache. Not that I have anything usefull to put on a website, but I want to get it online, just for the fun and for the learning. I've already learned quite something about networking...

Thanks anyway, greetings,

Corien
 
Old 05-24-2004, 04:11 PM   #5
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic IP to Static Temujin_12 *BSD 2 06-10-2005 04:58 PM
Static vs Dynamic Big Al Linux - Networking 2 12-08-2003 03:10 PM
NS with static or dynamic IP cijunet Linux - Networking 3 05-08-2003 11:04 PM
Changing from static IP to dynamic one cijunet Linux - Networking 1 04-10-2003 10:07 PM
Dynamic DHCP or static IP joeljensen Linux - Networking 7 04-01-2003 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration