Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th May 2006, 21:00
edopizza edopizza is offline
Junior Member
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question Static IP address doesn't work - DHCP does

Hello!
I am trying to install a Debian 3.1 server with the help of this tutorial
http://www.howtoforge.com/perfect_setup_debian_sarge

When I want to change from DHCP to static, it become impossible to connect to the internet, even after a complete reboot. I can still ping the router and the other computers in my LAN, and I get pinged by the other computers.
The IP I choose is in the correct router's range for the static IP.
ifconfig will show the choosed static ip but the router list wont list it.

I had exactly the same problem with my father's computer which run win98; I thought it was due to the fact it is an old box and I then left his computer running on DHCP.

Has anybody found the solution for that problem?
Reply With Quote
Sponsored Links
  #2  
Old 12th May 2006, 21:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Make sure you use the correct gateway IP address (your router's local IP address). Also specifiy valid nameservers in /etc/resolv.conf (you can use those from the tutorial). And finally make sure that you don't give your system an IP address that is already used by another computer in your LAN.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 13th May 2006, 11:58
edopizza edopizza is offline
Junior Member
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Still in trouble...

Hello Falko, thanks for you help.
I checked and rechecked the settings and everything should be correct but the system still don't want to connect to the wan. I am going to reinstall all from the beginning without plugging the lan cable, so the installer is going to ask me for the network settings.

About /etc/resolv.conf, I tryed three settings:
first with the two DNS my IPS gave, second with the router IP and third with both of them. Nothing seems to improve.

What is the correct setting for the DNS?
Reply With Quote
  #4  
Old 13th May 2006, 12:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by edopizza
Hello Falko, thanks for you help.
I checked and rechecked the settings and everything should be correct but the system still don't want to connect to the wan. I am going to reinstall all from the beginning without plugging the lan cable, so the installer is going to ask me for the network settings.
What's in /etc/network/interfaces?

Quote:
Originally Posted by edopizza
About /etc/resolv.conf, I tryed three settings:
first with the two DNS my IPS gave, second with the router IP and third with both of them. Nothing seems to improve.

What is the correct setting for the DNS?
You can use the nameservers mentioned in the tutorial. They work fine.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 13th May 2006, 12:18
edopizza edopizza is offline
Junior Member
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Voilà!

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.0.35
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
Reply With Quote
  #6  
Old 13th May 2006, 12:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Looks ok so far. Is 192.168.0.1 your router's internal IP address?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 13th May 2006, 12:40
edopizza edopizza is offline
Junior Member
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default By the way...

By the (gate)way I solved the problem by reinstalling all with the option "linux netcfg/disable_dhcp=true".
In the /ect/network/interfaces there are now two lines more:

dns-nameservers 145.253.2.75 193.174.32.18 194.25.0.60
dns-search example.com

Thanks for your inspiration!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Garbled dns queries bosei Installation/Configuration 8 6th February 2006 22:29
Question on Static IP / Router ezfilez HOWTO-Related Questions 7 26th November 2005 16:53
static IP to dhcp :o toyito Installation/Configuration 2 25th October 2005 21:02
postfix config jmroth Installation/Configuration 6 18th September 2005 15:58


All times are GMT +2. The time now is 16:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.