Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Everytime I wake the server from sleep it changes my gigabit speeds to 100 Mb. I am able to get the gigabit speed back up but have to run this command:
Code:
sudo ethtool -s eth0 speed 1000
This is vary annoying as I have to do it every time I wake my server. Is there a way to run this command on wake? Server is running Ubuntu Server 9.10 and the nic is an r8169. Computer is an MSI Wind Nettop. This is listed as a bug on Launchpad (https://bugs.launchpad.net/ubuntu/+s...ux/+bug/371159) but their fix doesnt work for me. Any help would be appreciated. Thanks,
When your computer goes "suspend" Ethernet card interface goes DOWN. When you wake it up, interface goes up, but the config file doesn't have information about the speed.
"ifcfg-eth<N>" - it the file with config settings, you can add there additional option ETHTOOL_OPTIONS = 'speed 1000 duplex full ...'
When your computer goes "suspend" Ethernet card interface goes DOWN. When you wake it up, interface goes up, but the config file doesn't have information about the speed.
"ifcfg-eth<N>" - it the file with config settings, you can add there additional option ETHTOOL_OPTIONS = 'speed 1000 duplex full ...'
Thanks minnull22, I'll give that a try when I get home tonight. I'll report back if it works or not. Thanks for the suggestion!
For Ubuntu there is no ifcfg. Looks like thats just for RedHat Linux. There is "interfaces" and "ifup/ifdown". Looking at the man pages for that now to see if I can run the "ETHTOOL_OPTIONS" as you suggested.
Under OpenSuSE™ 10.2, I placed the following in /etc/sysconfig/network/ifcfg-eth-id-00:16:3e:b1:d7:90 (the config file for eth0):
ETHTOOL_OPTIONS='............'
Under other distributions, the technique will vary. For example, under Debian™ or Ubuntu™, you can just add a 'post-up' entry to /etc/network/interfaces as shown here:
iface eth0 inet static
address 206.124.146.177
netmask 255.255.255.0
post-up ethtool ..............
Under OpenSuSE™ 10.2, I placed the following in /etc/sysconfig/network/ifcfg-eth-id-00:16:3e:b1:d7:90 (the config file for eth0):
ETHTOOL_OPTIONS='............'
Under other distributions, the technique will vary. For example, under Debian™ or Ubuntu™, you can just add a 'post-up' entry to /etc/network/interfaces as shown here:
iface eth0 inet static
address 206.124.146.177
netmask 255.255.255.0
post-up ethtool ..............
Check this.
Read the MAN pages and "post-up" is the command I'm using. It works, but I have to manually restart the network ("sudo /etc/init.d/networking restart") for the command to take effect. I know it works after that, but when I suspend the server, then bring it back up, the network doesnt seam to restart and is brought back to 100 Mbit. What I get from this is that when the server resumes from suspend, its not restarting the network. Any ideas? Again thanks for all the help so far nimnull22!
I'm a MONSTER!!!! Figured out that "pm-suspend"'s hooks can be altered to run commands during resume/hibernate/suspend/thaw. Heres the steps I took for anyone else who runs into this problem.
1. Create a file in "/etc/pm/sleep.d/" named "speed"
speed contains;
Code:
#!/bin/bash
case $1 in
resume)
ethtool -s eth0 speed 1000
;;
*) echo ""
;;
esac
2.
Code:
sudo chmod +x /etc/pm/sleep.d/speed
3. You're Done!!!!
I put an echo "whatever" in the script first to see if it would show on resume and it didnt on the main prompt. I had to look at "var/log/pm-suspend.log" to see it was working. Hope this helps other people. Thanks again for all your help nimnull22. Much appreciated!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.