SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just installed Slack 14.2 on a 10 year old laptop, I figured why not, I wanted a beater I could bring to work and not worry about.
I've got it configured how I want it and have most of the software I want installed. It's working well, well for what it is any way.
While booting I noticed it hangs for a while waiting for eth0 to obtain a DHCP address. About 99% of the time I use wireless, so to get rid of the boot lag, I decided to set a static address, in /etc/rc.d/rc.inet1.conf for eth0.
Now all ethernet traffic is sent to eth0 even though wlan0 shows as being connected, I can't even ping my access point.
Is there a way to push everything to wlan0?
Or...
A) Disable eth0 completely.
B) Live with the boot lag as eth0 waits for no DHCP address.
Bypass all that and use networkmanager. it's installed by default
networkmanager is what's showing me wlan0 is connected. Perhaps I'm missing something simple here, I usually do, but I see no way to have eth0 avoid looking for DHCP or forcing wlan0 for traffic.
Choose something from below:
1. Make sure you not overlap network settings between eth0 and wlan0.
2. If wlan0 is static set GATEWAY to wlan0 gateway.
3. You can set DHCP_TIMEOUT[some_number] for eth0 interface to low number.
4. You can blacklist eth0 kernel module.
5. If you don't want eth0 just don't configure it. Set IFNAME[0] to wlan0.
I've always turned off my NIC in BIOS on my laptops, and never experienced what you're speaking of. maybe it is not so old as to not have a means to turn off your NIC via Bios, no detect , no look?
I've always turned off my NIC in BIOS on my laptops, and never experienced what you're speaking of. maybe it is not so old as to not have a means to turn off your NIC via Bios, no detect , no look?
that's what I figure mine must be doing...(?)
No option for this in the BIOS on this old machine. For now, I set eth0 back to DHCP and wlan0 handles the ethernet traffic again.
If that's happening with the ethernet cable disconnected from the laptop while using wifi, that's bloody silly, isn't it.
Yes it is, and that is exactly what it does.
Quote:
Originally Posted by TheRealGrogan
How about, blacklist your kernel module for the ethernet NIC, and unblacklist it when you want to use it? There should be no boot delay then :-)
That's a good thought, I may try it if there are no better solutions.
Quote:
Originally Posted by bassmadrigal
If your computer is trying to get an address from the dhcp server during boot, it is likely because it is requested via /etc/rc.d/rc.inet1.conf.
If you go in there and change USE_DHCP[0]="yes" under eth0 to USE_DHCP[0]="", it won't hunt for an IP on boot anymore.
That's where I set the IP address for eth0, and I set USE_DHCP[0]="no".
I tried your suggestion, it seems to work well enough, and will be easy enough to change later if needed.
Do you even need these /etc/rc.d/inet* thingies if you use NetworkManager anyway?
Did you opt for NetworkManager when you configured the network during install? That's what I do nowadays, and I no longer experience any of the issues that you describe.
#!/bin/sh
case "${1:-start}" in
start) echo "Starting Network Interfaces..."
ip -batch - <<-EOF
address flush dev lo
address add 127.0.0.1 dev lo
link set lo up
EOF
if [ ! -e /var/run/wpa_supplicant/wlan0 ]; then
iw reg set GB
wpa_supplicant -B -c /etc/wpa_supplicant/wlan0.conf -i wlan0 >/dev/null
fi
dhcpcd -q -b -L -M wlan0 eth0
;;
stop) echo "Stopping Network Interfaces..."
dhcpcd -q -k
sleep 2
ip -batch - <<-EOF
link set eth0 down
link set wlan0 down
EOF
if [ -e /var/run/wpa_supplicant/wlan0 ]; then
wpa_cli -i wlan0 terminate >/dev/null
fi
;;
esac
I can't say I've noticed any delay when eth0 isn't plugged in. The wlan0 interface gets assigned a higher metric than eth0, so eth0 will be used in preference to wlan0 when both are connected.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by ceh383
Yes it is, and that is exactly what it does.
That's a good thought, I may try it if there are no better solutions.
That's where I set the IP address for eth0, and I set USE_DHCP[0]="no".
I tried your suggestion, it seems to work well enough, and will be easy enough to change later if needed.
Thanks all
Why are you giving it an IP address if you don't want to use it?
#!/bin/sh
case "${1:-start}" in
start) echo "Starting Network Interfaces..."
ip -batch - <<-EOF
address flush dev lo
address add 127.0.0.1 dev lo
link set lo up
EOF
if [ ! -e /var/run/wpa_supplicant/wlan0 ]; then
iw reg set GB
wpa_supplicant -B -c /etc/wpa_supplicant/wlan0.conf -i wlan0 >/dev/null
fi
dhcpcd -q -b -L -M wlan0 eth0
;;
stop) echo "Stopping Network Interfaces..."
dhcpcd -q -k
sleep 2
ip -batch - <<-EOF
link set eth0 down
link set wlan0 down
EOF
if [ -e /var/run/wpa_supplicant/wlan0 ]; then
wpa_cli -i wlan0 terminate >/dev/null
fi
;;
esac
I can't say I've noticed any delay when eth0 isn't plugged in. The wlan0 interface gets assigned a higher metric than eth0, so eth0 will be used in preference to wlan0 when both are connected.
Thank you for this, I'll give it a try.
Quote:
Originally Posted by rkelsen
There are a couple of steps to this.
Step 1.
Code:
# chmod -x /etc/rc.d/rc.netdevice
Step 2.
Edit the eth0 section of /etc/rc.d/rc.inet1.conf so that it looks like this:
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
Once you make these changes and reboot, networkmanager will be in control and you should no longer have the problem.
If the above doesn't work for me, I'll give this a try. Thank you.
Quote:
Originally Posted by 273
Why are you giving it an IP address if you don't want to use it?
A) Thought it would get rid of the DHCP caused delay at boot.
B) It would still be usable at home if I needed it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.