LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2014, 09:11 AM   #1
cbjones50
LQ Newbie
 
Registered: Dec 2007
Posts: 28

Rep: Reputation: 0
Set Ethernet Speed at Start Up - Debian


Auto-negotiation between the Ethernet adapter on my Dell Optiplex and my Linksys E2500 router. Actually they do negotiate only one side decides on 10M and the other on 100M which does not work so well.

Therefore I have to issue the following command with the associated program in place as root to successfully connect to the Linksys router.

ethtool -s eth0 speed 10 autoneg off duplex full

My question is how to automate this process at startup at the proper time. It must occur after the network manager has begun negotiation.

Thanks for any help?
 
Old 08-07-2014, 09:41 AM   #2
wizard10000
LQ Newbie
 
Registered: Jun 2014
Location: midwestern us
Distribution: debian unstable
Posts: 17

Rep: Reputation: Disabled
You can do it this way in /etc/network/interfaces -

Code:
auto eth0
    allow-hotplug eth0
    iface eth0 inet dhcp
    up sleep 5; /sbin/ethtool -s eth0 speed 10 autoneg off duplex full
But - if you do this you might as well remove network manager, as the Debian version of NM will not configure a network interface that's listed in /etc/network/interfaces.

Hope this helps -
 
Old 08-07-2014, 11:13 PM   #3
cbjones50
LQ Newbie
 
Registered: Dec 2007
Posts: 28

Original Poster
Rep: Reputation: 0
My object was to modify the attributes of the Ethernet interface with Network Manager in place.

I was aware that the primary network interface is commented out due to the use of Network Manager as you can see in the following from "/etc/network/interfaces".

# The primary network interface
allow-hotplug eth0
#NetworkManager#iface eth0 inet dhcp

I did not wish to loose the Network Manager applet in the Gnome GUI and I assume I would without Network Manager in place.

A brief note on how to remove Network Manager and what happens with the interface when I make "eth0" active in the "interfaces" file as well as what happens with the Gnome Network Manager applet would be helpful.

Thanks for the reply
 
Old 08-07-2014, 11:21 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

does network manager not provide hooks for pre/post up/down scripts? I know that wicd does.

Evo2.
 
Old 08-08-2014, 06:43 AM   #5
wizard10000
LQ Newbie
 
Registered: Jun 2014
Location: midwestern us
Distribution: debian unstable
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

does network manager not provide hooks for pre/post up/down scripts? I know that wicd does.
You can with network manager's dispatcher - here's a pretty good readme -

https://wiki.archlinux.org/index.php/NetworkManager

But - to answer OP's question there's no reason I can think of to use network manager to manage a wired interface. First thing I do with a new install is get rid of NM - like you, I prefer wicd.
 
Old 08-08-2014, 05:41 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,383

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
Maybe at end of network manager add in script?

Wonder if a cron or timer job might work.


In reality I'd think the negotiation is failing due to poor wiring or interference.
 
Old 08-09-2014, 06:19 AM   #7
wizard10000
LQ Newbie
 
Registered: Jun 2014
Location: midwestern us
Distribution: debian unstable
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Maybe at end of network manager add in script?

Wonder if a cron or timer job might work.


In reality I'd think the negotiation is failing due to poor wiring or interference.
Agree on wiring or interference. Fixing the problem is probably a better solution than implementing a workaround

Problem with using a NM add-in script (I think) is that NM runs in the user context and ethtool needs to run as root - it'd probably work, but it'd also prompt him for a password unless he does a little sudoers magic

Last edited by wizard10000; 08-09-2014 at 06:23 AM.
 
1 members found this post helpful.
Old 08-21-2014, 06:16 PM   #8
cbjones50
LQ Newbie
 
Registered: Dec 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Interface Followup

As for being a hardware interface media issue all that is involved here is the on mother board Ethernet RJ-45 adapter on a Dell Optiplex GX620, a 6' Cat-5 RJ-45 to RJ-45 patch cable and an RJ-45 Ethernet port on a Linksys E2500. I believe the problem to be internal to the Dell Ethernet and it's API with the Linux OS.

I had previously been told by someone who makes his living running and maintaining Linux servers with no GUI that Ethernet negotiation failure in Linux although not common is not that unusual either. More specifically I was told that if I wanted an Ethernet interface on a Linux system to come up after a power failure or a power on reset I had better set the speed of the Ethernet interface manually.

I could do away with Network Manager and figure out how that works. Specifics on how to accomplish that so I could try it would be appreciated. I do not think that it is that complex but I do not know what it means to the system in terms of connectivity after the change has been made.

Writing the script for Network Manager indicated is currently out of scope for my skill set although I am willing to work on changing that.

I assume the script would do nothing if the interface were up and would set the speed and other options if the interface were down.

One question would be, when the interface is trying to come up based on the Network Manager applet is the interface in some pending state and neither up nor down?

A starting point for learning the applicable scripting capability would be helpful.

Thanks for the help.

At least I know how to possibly solve the problem with the correct resources.
 
Old 08-21-2014, 06:27 PM   #9
StepNjump
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Rep: Reputation: Disabled
test. sorry

test sorry
 
Old 08-21-2014, 06:49 PM   #10
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Sigh...

NM provides a setting for turning off autonegotiation and set a fixed speed. Why making it complicated when it can be done easily?

jlinkels
 
Old 08-22-2014, 09:49 AM   #11
cbjones50
LQ Newbie
 
Registered: Dec 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Network Manager Configuration

Does the above mean that if I can somehow figure out how to modify "etc/NetworkManager/NetworkManager.conf" with the correct modifications it might solve the auto-negotiation issue?

I both have and had checked the "Gnome" page for information on configuration of "NetworkManager" and found no content that seemed to help.
 
Old 08-22-2014, 10:10 AM   #12
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Go to Manage Connections
Tab Wired
Tab Ethernet
Left corner below checkbox Autonegotiate. Uncheck
Two addition input lines appear. One of them is speed.

At least I hope the Gnome NM is the same as KDE NM

jlinkels
 
Old 09-05-2014, 09:48 AM   #13
cbjones50
LQ Newbie
 
Registered: Dec 2007
Posts: 28

Original Poster
Rep: Reputation: 0
Network Manager Applet - Gnome 2

The NM applet, upper right normally, only allows one to disable or enable all interfaces or just specific interfaces like eth0. The interface of the NM Applet in Gnome provides no options other than the ability to configure a VPN.

Interestingly enough the NM applet when it's menu is active takes full control of the keyboard not even allowing one to issue a command to capture a screen image.
 
  


Reply

Tags
debian, ethernet


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I am running debian, and I was wondering how I would set up a bridge between ethernet darkstarbyte Linux - Software 6 12-22-2011 09:51 PM
How to get ethernet speed in your program frostecheg Linux - Kernel 0 12-09-2008 07:49 AM
Speed of ethernet consty Solaris / OpenSolaris 2 11-16-2006 07:29 AM
Ethernet port Speed dweeb Linux - Networking 2 01-05-2006 07:19 AM
Redhat Ethernet Speed GomiCowboy Linux - Networking 1 12-15-2003 03:52 AM


All times are GMT -5. The time now is 12:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration