Page 1 of 1

[Ethtool] Modify ethernet card speed

Posted: 31. Mar 2010, 16:02
by spycken
Hello.
I try to modify my ethernet card speed from 100Mbps to 10Mbps, so i type

Code: Select all

ethtool -s eth1 speed 10 duplex full autoneg off
(the last part specify if autonegotiation is enabled. In the usual case it is, but might cause some problems with some network devices, so you can turn it off)

but if i check my connection wit:

Code: Select all

ethtool eth1
the prompt display:

Code: Select all

Settings for eth1:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full ethtool -s eth0 speed 10 duplex half
                            100baseT/Half 100baseT/Full 
    Advertised auto-negotiation: Yes
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Current message level: 0x00000007 (7)
    Link detected: yes
Can someone helps me?

Re: [Ethtool] Modify ethernet card speed

Posted: 31. Mar 2010, 16:40
by dmcgraw
Are you doing this in the host or the guest? Also, what are you trying to accomplish?

Re: [Ethtool] Modify ethernet card speed

Posted: 31. Mar 2010, 16:52
by spycken
In the guest.
I try to limit my ethernet speed!
it's ok if i do it in the host but when i try on the guest .. nothing happens.

Re: [Ethtool] Modify ethernet card speed

Posted: 31. Mar 2010, 17:02
by dmcgraw
If you are trying to limit the bandwidth available to the guest, I am not sure that this is the way to go about it. A network connected has 2 ends which have to agree on the speed of the connection. I don't know if this is possible to do with the virtual network adapter in VB.

There are other ways to control network bandwidth in a Linux system. This is called traffic control and can be implemented using the "iptables" and "tc" commands.

However, configuring these settings is far from trivial.

Re: [Ethtool] Modify ethernet card speed

Posted: 1. Apr 2010, 14:09
by spycken
But it's work with the host! I don't understand ..However, configuring these settings is far from trivial.

"configuring these settings is far from trivial."
So, do you know if there are some easier ways to do it?

Note: do you know if there are commands to control VirtualBox settings?
For example i found this:

Code: Select all

VBoxManage modifyvm         <uuid|name>
                            [--name <name>]
                            [--ostype <ostype>]
                            [--memory <memorysize in MB>]
                            [--vram <vramsize in MB>]
                            [--acpi on|off]
                            [--ioapic on|off]
                            [--pae on|off]
                            [--hwvirtex on|off]
                            [--nestedpaging on|off]
                            [--vtxvpid on|off]
                            [--cpuidset <leaf> <eax> <ebx> <ecx> <edx>]
                            [--cpuidremove <leaf>]
                            [--cpuidremoveall]
                            [--cpus <number>]
                            [--monitorcount <number>]
                            [--accelerate3d <on|off>]
                            [--firmware bios|efi|efi32|efi64]
                            [--bioslogofadein on|off]
                            [--bioslogofadeout on|off]
                            [--bioslogodisplaytime <msec>]
                            [--bioslogoimagepath <imagepath>]
                            [--biosbootmenu disabled|menuonly|messageandmenu]
                            [--biossystemtimeoffset <msec>]
                            [--biospxedebug on|off]
                            [--boot<1-4> none|floppy|dvd|disk|net>]
                            [--nic<1-N> none|null|nat|bridged|intnet]
                            [--nictype<1-N> Am79C970A|Am79C973]
                            [--cableconnected<1-N> on|off]
                            [--nictrace<1-N> on|off]
                            [--nictracefile<1-N> <filename>]
                            [--nicspeed<1-N> <kbps>]
the last option seems to be usefull but i don't know how to use it and if it will resolve my problem