LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-06-2004, 07:09 AM   #1
nazdrowie
Member
 
Registered: Oct 2004
Distribution: Debian
Posts: 39

Rep: Reputation: 15
dhcp works fine with router but NOT without


My configuration includes a computer hooked up to a router, which is hooked up to a high-speed Internet modem. When I installed Debian under this configuration, I had no problems with networking, but lately I've been trying to take the router out of the loop, and dhcp isn't working for some reason:
Code:
##########################################
# What happens when I try to bring up eth0
# with the router bypassed - NOT SUCCESSFUL:
##########################################
lomza:/# ifup eth0
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit <snipped url cause lq.org doesn't like it>

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth0/...
Sending on   LPF/eth0/...
Sending on   Socket/fallback/fallback-net
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20
No DHCPOFFERS received.
Trying recorded lease 192.168.0.101
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

bound: renewal in 298195 seconds.

###################################
# What happens when I bring up eth0
# with the router (which was the 
# setup at time of install) - SUCCESSFUL:
###################################
lomza:/# ifup eth0
Internet Software Consortium DHCP Client 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit <snipped url>

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth0/...
Sending on   LPF/eth0/...
Sending on   Socket/fallback/fallback-net
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.101 -- renewal in 302400 seconds.
My /etc/network/interfaces file looks fine:
Code:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
so I have no clue what's wrong. Anyone?
 
Old 11-06-2004, 07:37 AM   #2
mAineAc
Member
 
Registered: Nov 2000
Location: Hermon, ME
Distribution: slackware
Posts: 201

Rep: Reputation: 30
you have the gateway set up for 192.168.0.1 which was probably your gateway when you had the router set up but will not be when you have it directly to your highspeed connection. You need fix this and it will work. when using dhcp don't use a set gateway or netmask and use the dns servers for your isp.
 
Old 11-06-2004, 09:36 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Futhermore, if your broadband connection is DSL then you will need to configure pppoe (or pppoa depending on service) too. This isn't required for a cable modem.
 
Old 11-06-2004, 01:49 PM   #4
nazdrowie
Member
 
Registered: Oct 2004
Distribution: Debian
Posts: 39

Original Poster
Rep: Reputation: 15
I was under the impression that the dhcp-client is supposed to set up the gateway and such. I'm just curious: mAineAc, did you have the same problem, change the gateway, and then have it work?

Anyways, turns out there's a simple solution in the DHCP mini-HOWTO (see section 3.10.7):
http://www.ibiblio.org/mdw/HOWTO/DHC...ROUBLESHOOTING
which says to restart your cable modem (cut its power then plug it back in), because otherwise it memorizes the "ethernet address of your network card", which was my router at first, but then changed to my computer's network card. (I'm not sure what they mean by "ethernet address" though; maybe they mean the hardware address?)

Thanks for the replies.
 
Old 11-06-2004, 01:58 PM   #5
mAineAc
Member
 
Registered: Nov 2000
Location: Hermon, ME
Distribution: slackware
Posts: 201

Rep: Reputation: 30
Re: dhcp works fine with router but NOT without

Quote:
Originally posted by nazdrowie

Sending on Socket/fallback/fallback-net
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.101 -- renewal in 302400
I was going by what you posted. This section shows it looking for 192.168.0.1 which is bound to 192.168.0.101. THis would not be the case if you were hooked up to your cable modem. This is the case if you were hooked up to your router. I was just assuming you had a static gateway set, which you can do with dhcp. But like you had found out it was just 'remembering' that and needed to be reset.
 
Old 11-06-2004, 02:51 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Your correct it is the interface's MAC that is "stored"
 
  


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
acpi works fine with 2.4 but not with 2.6 sneutrinono Linux - Laptop and Netbook 6 11-19-2004 05:04 AM
e0 will Rx, but not Tx...e1 works fine giant Linux - Networking 2 09-15-2004 01:13 PM
wget gives me 404 when IE works just fine...? ivj Linux - Software 7 07-24-2004 10:13 PM
Everything works fine... but no ADSL!! Conexus Slackware 10 04-11-2004 06:29 AM
Works just fine...I think /home/kyle Linux - Software 0 03-10-2004 05:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:45 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