• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: DHCP is not working after removing supersede  (Read 2485 times)
star_trekguy
Newbie
*

Karma: 0
Posts: 10


View Profile
« on: June 20, 2009, 05:32:13 PM »

I am having tons of trouble with my DHCP settings i believe.

I try to ping google.com or another computer in my network (ammo-box) and i get the ping: unknown host google.com error. When i try to ping google's ip address (74.125.67.100) i get connect: Network is unreachable, but if I ping ammo-box with the IP, i get a return fine.

I'm not quite sure if this is a problem with the DHCP or something with my router maybe.

Here is my /etc/network/interfaces file:

Code:
auto lo
iface lo inet loopback
#address 192.168.1.99
#netmask 255.225.225.0

auto eth0
iface eth0 inet static
        address 192.168.1.99
        network 192.168.0.0
        netmask 225.225.225.0
        broadcast 192.168.1.225
        gateway 192.168.0.1

and my /etc/dhcp3/dhclient.conf:

Code:
#option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

send host-name "<hostname>";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes, ntp-servers;
require routers, subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.33.137.255;
#  option routers 192.33.137.250;
#  option domain-name-servers 127.0.0.1;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}

maybe I should have some of these things un-commented?

Any help would be appreciated. Thank you!

Logged

ianjb
Jr. Member
**

Karma: 0
Posts: 65


View Profile
« Reply #1 on: June 20, 2009, 06:51:42 PM »

Check this out

http://www.openplug.org/plugwiki/index.php/Frequently_Asked_Questions#Why_can.27t_it_resolve_hostnames.3F
Logged

star_trekguy
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #2 on: June 21, 2009, 09:48:36 AM »

Yea, I've tried that and it does some other weird things also. The supersede line is not in the file (It never was).

When i try the ifdown eth0 i get this error:

ifdown: interface eth0 not configured

I can use the ifconfig eth0 down command and once it is down, the ifup eth0 gives me this error:

SIOCSIFNETMASK: Invalid argument
Failed to bring up eth0.


When i bring it back up with the ifconfig eth0 up, it still cannot resolve google.com. I have tried rebooting also, and no change.

Thanks again for your help!
Logged

star_trekguy
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #3 on: June 21, 2009, 10:53:14 AM »

I was just thinking, does my problem have anything to do with having a static IP that is under the DCHP server's starting address of 192.168.1.100?
Logged

rc3
Newbie
*

Karma: 0
Posts: 36


View Profile
« Reply #4 on: June 24, 2009, 10:06:43 PM »

The problem is in your network configuration:

Quote
auto eth0
iface eth0 inet static
        address 192.168.1.99
        network 192.168.0.0  <-- this line should be 192.168.1.0
        netmask 225.225.225.0 <-- on a class C network, netmask should be 255.255.255.0
        broadcast 192.168.1.225 <-- save mistake as above
        gateway 192.168.0.1 <-- this line is also wrong, you can not use it as the default gateway since it's not in the 192.168.1.0/24 network segment


If your dhcp server's ip is 192.168.1.1, use this configuration
Quote
auto eth0
iface eth0 inet static
        address 192.168.1.99
        netmask 255.255.255.0
        gateway 192.168.1.1

If dhcp server is 192.168.0.1, try
Quote
auto eth0
iface eth0 inet static
        address 192.168.0.99
        netmask 255.255.255.0
        gateway 192.168.0.1

After saving the changes, reboot, first try to see if you can ping default gateway. Then try an external ip such the google ip in your initial post, then google.com. If pinging by name fails, check you have the correct dns settings in your /etc/resolv.conf, it should look something like
Quote
nameserver 192.168.1.1
(assuming your dhcp server is on 192.168.1.1 and it is runing or forwarding dns service)



Logged

star_trekguy
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #5 on: July 05, 2009, 10:08:32 PM »

Thanks for the suggestion, but I can still not resolve host names. It receives the IP address of 192.168.1.99 easily and can ping anything else on the network by its ip, but I still cannot ping google.com.

If I change the network configuration to iface eth0 inet dhcp the hosts resolve no problem and i can ping google fine.

I'm not sure if this points to my router or something?

Thank you for your help again!
Logged

Pages: [1]
Print
Jump to: