LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   DHCP not working in Slackware 13.37 (Sci Linux 6 on same box works) (http://www.linuxquestions.org/questions/slackware-14/dhcp-not-working-in-slackware-13-37-sci-linux-6-on-same-box-works-4175429499/)

tuubaaku 09-28-2012 05:57 PM

DHCP not working in Slackware 13.37 (Sci Linux 6 on same box works)
 
I have two Linux installations on one box (desktop - no wireless involved) - Slackware 13.37 and Scientific Linux 6.2. Both were fine until I moved recently, and we got a Verizon FiOS router. Scientific gets an IP address from the router fine, while Slackware just times out.

On Slackware, I've tried using both dhcpcd and dhclient. I've tried turning off my firewall, blacklisting ipv6, and using wicd instead of rc.inet1. Nothing has gotten me an IP address at all.

Here are some of the logs - if anyone knows what I can do to get the IP address in Slackware, that would be great. Anything else I should try?

SciLi - works
Code:

Sep 27 18:22:25 localhost dhclient[2108]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x3153e888)
Sep 27 18:22:26 localhost dhclient[2108]: DHCPOFFER from 192.168.1.1
Sep 27 18:22:26 localhost dhclient[2108]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x3153e888)
Sep 27 18:22:26 localhost dhclient[2108]: DHCPACK from 192.168.1.1 (xid=0x3153e888)
Sep 27 18:22:26 localhost dhclient[2108]: bound to 192.168.1.3 -- renewal in 33473 seconds.

Slack - doesn't work
Code:

Sep 26 21:42:05 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 4
Sep 26 21:42:09 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 5
Sep 26 21:42:14 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 6
Sep 26 21:42:18 thomas dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Sep 26 21:42:21 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 12
Sep 26 21:42:22 thomas dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Sep 26 21:42:27 thomas dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
Sep 26 21:42:33 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 15
Sep 26 21:42:39 thomas dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
Sep 26 21:42:48 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 7
Sep 26 21:42:53 thomas dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
Sep 26 21:42:55 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 7
Sep 26 21:43:02 thomas dhclient: DHCPDISCOVER on eth0 to 192.168.1.1 port 67 interval 4
Sep 26 21:43:06 thomas dhclient: No DHCPOFFERS received.
Sep 26 21:43:06 thomas dhclient: No working leases in persistent database - sleeping.
Sep 26 21:43:12 thomas dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Sep 26 21:43:19 thomas dhclient: No DHCPOFFERS received.
Sep 26 21:43:19 thomas dhclient: No working leases in persistent database - sleeping.


tallship 09-29-2012 06:59 AM

Quote:

Originally Posted by tuubaaku (Post 4792011)
On Slackware, I've tried using both dhcpcd and dhclient. I've tried turning off my firewall, blacklisting ipv6, and using wicd instead of rc.inet1. Nothing has gotten me an IP address at all.

Forgive me if you've done something special in rc.inet1.conf, but if you're using wicd shouldn't your logs be reporting wlan0 instead of eth0?

I've pulled a couple of bonehead moves when I don't change my $IFACE to wlan0 when I go on the road, but haven't had any issues on my laptop at home on FiOS.

You're definitely asking for an address - but on eth0.

Have you tried changing your rc.inet1.conf to see if you're okay using a static IP?

Here's a couple of snippets from my rc.inet1.conf

Code:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
#USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""

# and...

#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"

Also, does wicd find an access point at all?

I hope that helps!

Kindest regards,

.

Didier Spaier 09-29-2012 09:26 AM

Strange. Here simply typing in an xterm either "dhclient eth0" or "dhcpcd eth0" work bring up the interface if need be then get the connection. But I have not the same router.

As dhcpcd is more verbose than dhclient I would try "dhcpcd eth0" and check the result in a previously opened other xterm with "tail -f /var/log/messages" though.

EDIT Both commands have a lot of options, some *could* help.

tuubaaku 09-29-2012 12:25 PM

@tallship: I'm not doing any wireless, so I assume the network card would stay as eth0, not wlan0, even if I'm using wicd.

Would it work if I just set a static IP on this machine, while other machines are using DHCP? (showing my network ignorance...)

@Didier: I did try dhcpcd, and I basically just saw timeout messages. The date was wrong at one point - went back to 2003 for some reason - maybe that messed something up? Although I fixed it already. Anyway, I can try dhcpcd again. Anyone know how to completely flush everything with the network, in case the router or slackware thinks it can't get an ip?

Didier Spaier 09-29-2012 01:52 PM

If you can set up your router to always give the same IP address to this machine yes, you should be able to connect it to the network using that static IP. the "netconfig" utility can set the static connection for you. Also you won't need wicd if that works, then "chmod -x /etc/rc.d/rc.wicd"

tallship 09-29-2012 05:56 PM

Quote:

Originally Posted by tuubaaku (Post 4792629)
Would it work if I just set a static IP on this machine, while other machines are using DHCP? (showing my network ignorance...)

Okay knowing your familiarity with networking helps a lot. So I'll point to a static config and mention the DHCP reservation that Didier Spaier talked about...

First, /etc/rc.d/rc.inet1.conf should look like this if this is the static addy you want to assign. Note that unlike the example above, DHCP is set to "no" (you're only going to have one line by default so just change "yes" to "no"

Code:

# Config information for eth0:
IPADDR[0]="192.168.1.225"
NETMASK[0]="255.255.255.0"
#USE_DHCP[0]="yes"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""

Two things about a static address. One is a DHCP reservation. For that you want to use the example in my first post (you are a DHCP client picking up the same IP always, regardless, based on your network card's MAC address.

Those FiOS modem/router/Wireless Access Points are really funky so I don't recommend you do this until you first google "DHCP Reservation <make / model number>" and read up on it, and understand it.

The other way, where you Assign a static IP as Didier Spaier suggests, is demonstrated in my second configuration code.

If you set a static IP, you *should* still go into the router and exclude a portion of your network block from the pool of available IP Addresses. Be CAREFUL because part of the address space (by default it is network 192.168.1.0/24) is for your television boxes and you know your wife and kids will kill you if you mess that up. :redface:

Just login and poke around on that router until you know what and where everything is.

Basically, I put in a high number in the code block example (.225 above), when you look in your router you'll note that it prolly has a large range of IP addresses that it hands out via DHCP - you want to shrink that number (by just a few IPs in the high range for your block) and then assign one of those excluded numbers to the machien manually - if you want a true static address. Once again, don't mess with the range that is used to assign addresses to your TV set top boxes and DVRs.

Usually, it's desirable and convenient to "reserve IP addresses on a wireless router, but those Verizon FiOS ones have a really funky interface and I find myself surfing around the screens until I remember where that capability is hidden.

If you log into the Verizon modem/router, you'll see that your machine already has an IP address waiting for your NICs particular MAC address - both Scientific and Slackware will likely be assigned the same IP because of that.

I hope between what Didier Spaier and I posted it helps some.

Kindest regards,

.

tuubaaku 09-29-2012 09:37 PM

Thank you both again for your thoughts. Since Slackware 14 is out now, I might also try installing that and seeing if that helps. If not, I may take a look at the static IP.

Richard Cranium 09-30-2012 04:28 PM

What does your rc.inet1.conf look like? My Slackware 13.37 system has no problem getting an IP address from my FIOS router.

tallship 09-30-2012 05:39 PM

Hey guys, we may have missed something more fundamental here.

We didn't ask the OP if he was running dual boot (I'm sure that we've presumed this) or if he's running Slackware as a guest OS inside say... VirtualBox.

@tuubaaku, If you're running Slackware as a virtual machine then did you select "Bridged" for your NIC?

If you're running dual boot then forget I asked :)

.

tuubaaku 09-30-2012 07:02 PM

rc.inet1.conf
Code:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

DEBUG_ETH_UP="no"

There's also some commented-out wireless settings. I might try setting the debug setting and see what it tells me.

This isn't a virtual machine - just two partitions on the same physical box.

Richard Cranium 09-30-2012 08:02 PM

OK, so the machine that I've got that talks to my FIOS router uses...
Code:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="external"
DHCP_KEEPRESOLV[0]="yes"
DHCP_KEEPNTP[0]="yes"

The resolv and ntp lines may not be applicable to you.

Richard Cranium 09-30-2012 08:07 PM

Now that I think about it, what does the command...
Code:

/sbin/ifconfig
...give you?

morrgp 10-01-2012 12:28 AM

How many ethernet ports do you have? I have one on the motherboard that does not work so I put in a network card. I use DHCP and it configures eth1, NOT eth0. If you run ifconfig, it will list the active port. Mine shows eth1 and, of course, lo. Good luck.

tuubaaku 10-02-2012 06:09 PM

Update: I installed 14.0, and it didn't connect either. Here's what I got:
Code:

dhcpcd[2074]: all: not configured to accept IPv6 RAs
dhcpcd[2074]: eth0: carrier acquired
dhcpcd[2074]: eth0: carrier lost
dhcpcd[2074]: eth0: waiting for carrier
dhcpcd[2074]: timed out
dhcpcd[2074]: allowing 8 seconds for IPv4LL timeout

On SL13.37, here's ifconfig:
Code:

eth0      Link encap:Ethernet  HWaddr 00:10:4B:6B:61:C3
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:17 Base address:0xc000

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:1296 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1296 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:100928 (98.5 Kb)  TX bytes:100928 (98.5 Kb)

and rc.inet1:
Code:

# /etc/rc.d/rc.inet1
Polling for DHCP server on interface eth0:
dhcpcd[2259]: version 5.2.12 starting
dhcpcd[2259]: eth0: waiting for carrier
dhcpcd[2259]: timed out
dhcpcd[2259]: allowing 8 seconds for IPv4LL timeout
dhcpcd[2259]: timed out

Looks like maybe some kind of IPv6 conflict/problem? I'm still not sure why Scientific is fine and Slackware's having trouble. Maybe I could disable IPv6 on my router?

tuubaaku 10-03-2012 06:30 PM

Sorry all. Major case of PEBKAC. :( I forgot that I had two network cards in this machine, and just had the cabe plugged into a different card than I did before. I guess Sci Linux automatically activates all network cards, whereas Slack only does what you tell it to. Thanks to you all for your thoughts.


All times are GMT -5. The time now is 03:27 PM.