Nic’in özelliklerinin elde edilmesi
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: 100Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: d Wake-on: d Link detected: yes
Duplex değeri için 3 olasılık vardır
- Full duplex : Enables sending and receiving of packets at the same time. This mode is used when the ethernet device is connected to a switch.
- Half duplex : Enables either sending or receiving of packets at a single point of time. This mode is used when the ethernet device is connected to a hub.
- Auto-negotiation : If enabled, the ethernet device itself decides whether to use either full duplex or half duplex based on the network the ethernet device attached to.
ethtool -s ile nic özellikleri değiştirilebilir.
autoneg özelliğini değiştirelim.
ifdown eth0 eth0 device: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) eth0 configuration: eth-bus-pci-0000:0b:00.0 ethtool -s eth0 autoneg off 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: Not reported Advertised auto-negotiation: No Speed: Unknown! (65535) Duplex: Unknown! (255) Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: off Supports Wake-on: g Wake-on: g Link detected: no # ifup eth0
Nic’in speed değerini sabitlemek için:
ethtool -s eth0 speed 100 autoneg off 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: Not reported Advertised auto-negotiation: No Speed: Unknown! (65535) Duplex: Unknown! (255) Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: off Supports Wake-on: g Wake-on: g Link detected: no
ethtool -i ile firmware ve driver özellikleri öğrenilebilir.
# ethtool -i eth0 driver: bnx2 version: 2.0.1-suse firmware-version: 1.9.3 bus-info: 0000:04:00.0
Nic’in ağ istatistiklerini öğrenmek için ethtool -S kullanılabilir
# ethtool -S eth0 NIC statistics: rx_bytes: 74356477841 rx_error_bytes: 0 tx_bytes: 110725861146 tx_error_bytes: 0 rx_ucast_packets: 104169941 rx_mcast_packets: 138831 rx_bcast_packets: 59543904 tx_ucast_packets: 118118510 tx_mcast_packets: 10137453 tx_bcast_packets: 2221841 tx_mac_errors: 0 tx_carrier_errors: 0 rx_crc_errors: 0 rx_align_errors: 0 tx_single_collisions: 0 tx_multi_collisions: 0 tx_deferred: 0 tx_excess_collisions: 0 tx_late_collisions: 0 tx_total_collisions: 0 rx_fragments: 0 rx_jabbers: 0 rx_undersize_packets: 0 rx_oversize_packets: 0 rx_64_byte_packets: 61154057 rx_65_to_127_byte_packets: 55038726 rx_128_to_255_byte_packets: 426962 rx_256_to_511_byte_packets: 3573763 rx_512_to_1023_byte_packets: 893173 rx_1024_to_1522_byte_packets: 42765995 rx_1523_to_9022_byte_packets: 0 tx_64_byte_packets: 3633165 tx_65_to_127_byte_packets: 51169838 tx_128_to_255_byte_packets: 3812067 tx_256_to_511_byte_packets: 113766 tx_512_to_1023_byte_packets: 104081 tx_1024_to_1522_byte_packets: 71644887 tx_1523_to_9022_byte_packets: 0 rx_xon_frames: 0 rx_xoff_frames: 0 tx_xon_frames: 0 tx_xoff_frames: 0 rx_mac_ctrl_frames: 0 rx_filtered_packets: 14596600 rx_discards: 0 rx_fw_discards: 0
Network düzgün çalışmıyorsa
- Speed ve Duplex değerlerinin “Unknown” olmasına
- Link detection değerinin No olmasına
bakılabilir.
Nic’in ledini yakmak için -p kullanılabilir
ethtool -p eth0
Bir cevap yazın