LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   New ISP, trouble getting DHCP lease (http://www.linuxquestions.org/questions/slackware-14/new-isp-trouble-getting-dhcp-lease-897897/)

/dev/me 08-17-2011 01:38 PM

New ISP, trouble getting DHCP lease
 
Hi,

I'm switching ISP's, and right now in transition I have two modems and thus two connections.

The old modem is a cable modem. It still works, although it's probably going to be cut off today or tomorrow.
The new one is a router that provides ADSL over copper (telephony).


My server, that I use as gateway, mail- and webserver is my reliable headless Slackware 13.0 machine, with two NIC's. One NIC I let udev name ethLAN (for the LAN part) and the other ethWAN (for the WAN part).


Now when I have the network cable from ethWAN into the cable modem and I issue `dhcpcd ethWAN` or `dhclient ethWAN` this works normally and as expected. It gets a new lease reliably.
But when I plug it in to the new 'copper modem' and do the same, I don't get a lease. It times out and falls back to some 169.x.x.x default IPV4LL address.


When I hook up my laptop, Slackware 12.2, directly to the copper modem, and do `dhcpcd eth0` or `dhclient eth0` it sometimes gets a lease and internet works.
But more often it complains about 'no network' and internet doesn't work. When that happens I also can't configure my network settings statically, and I can't ping the router. I tried two different network cables between laptop and router and also different ports on the router.

This is my laptop, correctly plugged in to the new modem:
Code:

7 root@wilnix:/home/me $dhcpcd -k eth0
7 root@wilnix:/home/me $dhcpcd -R eth0
Broadcasting DHCP_DISCOVER
recvfrom: Network is down
7 root@wilnix:/home/me $dhcpcd -R eth0
          ****  dhcpcd: already running
          ****  dhcpcd: if not then delete /etc/dhcpc/dhcpcd-eth0.pid file
7 root@wilnix:/home/me $dhcpcd -k eth0
7 root@wilnix:/home/me $dhcpcd -R eth0
Broadcasting DHCP_DISCOVER
recvfrom: Network is down
7 root@wilnix:/home/me $dhcpcd -k eth0
7 root@wilnix:/home/me $dhcpcd eth0
Broadcasting DHCP_DISCOVER
recvfrom: Network is down
7 root@wilnix:/home/me $dhcpcd eth0
          ****  dhcpcd: already running
          ****  dhcpcd: if not then delete /etc/dhcpc/dhcpcd-eth0.pid file
7 root@wilnix:/home/me $dhcpcd -k eth0
7 root@wilnix:/home/me $dhcpcd eth0
          ****  dhcpcd: already running
          ****  dhcpcd: if not then delete /etc/dhcpc/dhcpcd-eth0.pid file
7 root@wilnix:/home/me $dhcpcd -k eth0
7 root@wilnix:/home/me $dhcpcd eth0
Broadcasting DHCP_DISCOVER
broadcastAddr option is missing in DHCP server response. Assuming 192.168.1.255
dhcpIPaddrLeaseTime=86400 in DHCP server response.
dhcpT1value is missing in DHCP server response. Assuming 43200 sec
dhcpT2value is missing in DHCP server response. Assuming 75600 sec
DHCP_OFFER received from  (192.168.1.254)
Broadcasting DHCP_REQUEST for 192.168.1.8
dhcpIPaddrLeaseTime=86400 in DHCP server response.
dhcpT1value is missing in DHCP server response. Assuming 43200 sec
dhcpT2value is missing in DHCP server response. Assuming 75600 sec
DHCP_ACK received from  (192.168.1.254)
Broadcasting ARPOP_REQUEST for 192.168.1.8
arpCheck: recvfrom: Network is down
requested 192.168.1.8 address is in use
Broadcasting DHCP_DECLINE
dhcpDecline: sendto: Network is down
Broadcasting DHCP_DISCOVER
sendto: Network is down
7 root@wilnix:/home/me $ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:xx:xx:xx:xx
          inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:38ff:fecb:c585/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1200 (1.1 KiB)  TX bytes:2142 (2.0 KiB)
          Interrupt:17

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:406338 errors:0 dropped:0 overruns:0 frame:0
          TX packets:406338 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:21435658 (20.4 MiB)  TX bytes:21435658 (20.4 MiB)


For what it's worth, the cable modem is a direct connection, whereas the new modem is a NAT router. I don't think it should make a difference, but I'm not sure anymore.
The troublesome modem is a Davolink DV-2020

Any thoughts on how to approach this?

Peacedog 08-17-2011 10:04 PM

Hi /dev/me, Have you tried setting a static IP then accessing the web interface to configure the router? Try the 192.168.1.2 or 192.168.1.3 and subnet 255.255.255.0 then try accessing the web interface of the router to set it up.

Good luck. ;-)

ReaperX7 08-17-2011 10:11 PM

If you use dhcpd it should automatically grab an available IP from the router for eth0 if you use that as the primary NIC for external networking and eth1 as internal.

Check your router to see if it has the DHCP and DNS service running and the router is running as a router for PPPoE and not a bridge.

rknichols 08-17-2011 10:48 PM

Are you sure you're using the right protocol? DSL typically uses PPPoE, not DHCP, for network setup.

/dev/me 08-18-2011 01:35 AM

I was making it too complicated... too long at it I suppose.


It boils down to this, this NAT router should be just a matter of plugging in and go. It is connected tot the internet, so you just hook up your laptop and ask for a DHCP lease. That should be all there is to it. But this doesn't work reliable. I have to ask several times before I get one. And then it works perfectly.
But with my s/headelss server/glorified PC/g this doesn't work at all. It gets no lease.



Quote:

Originally Posted by rknichols
Are you sure you're using the right protocol? DSL typically uses PPPoE, not DHCP, for network setup.

That is a good point, but the ADSL router is preconfigured NAT router. And it works for my laptop, but not reliably.



Quote:

Originally Posted by Peacedog
Hi /dev/me, Have you tried setting a static IP then accessing the web interface to configure the router? Try the 192.168.1.2 or 192.168.1.3 and subnet 255.255.255.0 then try accessing the web interface of the router to set it up.

No, when I can't get a lease, I can't access the router or the internet if I define IP address, subnet and gateway statically. I can't ping it either. Otherwise I can access the webinterface just fine.

/dev/me 08-18-2011 10:58 AM

/hangs head in shame


I got RTFM'ed by the helpdesk. The routers LAN ports 1&2 would have provided digital television, had I opted for that service. No wonder no DHCP server was listening on those ports. Or at least, this should have been obvious to anyone who had read page 25 of the manual.

Peacedog 08-18-2011 07:48 PM

Nice! =D Glad you got it sorted.

Good luck. ;-)


All times are GMT -5. The time now is 08:03 AM.