0

This is related to these two questions, although they don't answer my question.

The machines are RHEL6.

1.ethtool not showing all the properties 2.changing network speed to 1000Mb/s

Output on VM:

 [root@foo ~]# ethtool eth0 Settings for eth0:
       Current message level: 0x00000007 (7)
         Link detected: yes

Output on Real Hardware: (interested in Speed)

# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        ***Speed: 1000Mb/s***
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

if there's anyway I can set this in VM, please suggest.

1 Answers1

1

I think it should be safe to assume that ethtool -I eth0 on the virtual server will display virtio_net or similar as the driver.

That means that eth0 is a virtual network interface and not a network card. It exists purely as a kernel construct in memory and has no limitations such as fixed speed, link detection etc. It only sends and receives packets.

You could instruct the hypervisor to emulate a NIC and then you would get ethtool to show speed, duplex setting and the whole shebang in the virtual server, but at quite a performance overhead.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • Do you meant `-i` instead of `-I`? The capital "I" switch doesn't seem to be implemented in newer version of ethtool. And `-i` shows the attached driver; that seems to be what you originally aimed at, correct? – TheDiveO Apr 11 '22 at 09:02