반응형

네트워크 카드 정보 역시 하드웨어 적인 이슈를 확인 할 때 매우 유용하게 사용된다.

root@choi:/media# lspci |grep -i ether

00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 


위 시스템은 인텔에서 인보드 형태로 만든  82579M 모델이고 기가비트 네트워크 카드 입니다. 이 정보가 중요한 이유는 가혹 특정 모델에서 버그나 이슈가 보고 될때 자신의 시스템이 해당되는지 확인해야 되고 관련된 펌웨어를 찾기 위함입니다.


이번에는 ethtool을 이용해서 연결 상태를 확인해 보겠습니다.

root@choi:/media# ethtool eth0

Settings for eth0:

        Supported ports: [ TP ]

        Supported link modes:   10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Supported pause frame use: No

        Supports auto-negotiation: Yes

        Supported FEC modes: Not reported

        Advertised link modes:  10baseT/Half 10baseT/Full

                                100baseT/Half 100baseT/Full

                                1000baseT/Full

        Advertised pause frame use: No

        Advertised auto-negotiation: Yes

        Advertised FEC modes: Not reported

        Speed: 1000Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 1

        Transceiver: internal

        Auto-negotiation: on

        MDI-X: on (auto)

        Supports Wake-on: pumbg

        Wake-on: g

        Current message level: 0x00000007 (7)

                               drv probe link

        Link detected: yes 


ethtool을 통해서 확인할 수 있는 정보는 우선 해당 네트워크 카드가 어느정도 속도 까지 지원되는지 확인이 가능하고 현재 연결된 스피드, 네트워크 연결상태의 정상 유무를 확인 할수 잇습니다.


또한 ethtool을 이용해서 네트워크 카드의 여러가지 세팅 정보도 확인이 가능합니다.


-g 옵션을 이용해서 Ring Buffer의 크기를 확인 할 수 있고 -G 옵션을 이용해서 Ring buffer의 사이즈를 조절할 수 있습니다.

root@choi:/media# ethtool -g eth0

Ring parameters for eth0:

Pre-set maximums:

RX:             4096

RX Mini:        0

RX Jumbo:       0

TX:             4096

Current hardware settings:

RX:             256

RX Mini:        0

RX Jumbo:       0

TX:             256


root@choi:/media# ethtool -G eth0 rx 300

root@choi:/media# ethtool -g eth0

Ring parameters for eth0:

Pre-set maximums:

RX:             4096

RX Mini:        0

RX Jumbo:       0

TX:             4096

Current hardware settings:

RX:             304

RX Mini:        0

RX Jumbo:       0

TX:             256 



-k 옵션을 이용해서 현재 사용중인 옵션을 이용해서 네트워크 카드의 다양한 성능 최적화 옵션을 확인 할 수 있고 -K 옵션을 이용해서 성능 최적화를 설정할 수 있습니다.

root@choi:/media# ethtool -k eth0

Features for eth0:

rx-checksumming: on

tx-checksumming: on

        tx-checksum-ipv4: off [fixed]

        tx-checksum-ip-generic: on

        tx-checksum-ipv6: off [fixed]

        tx-checksum-fcoe-crc: off [fixed]

        tx-checksum-sctp: off [fixed]

scatter-gather: on

        tx-scatter-gather: on

        tx-scatter-gather-fraglist: off [fixed]

tcp-segmentation-offload: on

        tx-tcp-segmentation: on

        tx-tcp-ecn-segmentation: off [fixed]

        tx-tcp-mangleid-segmentation: off

        tx-tcp6-segmentation: on

udp-fragmentation-offload: off

generic-segmentation-offload: on

generic-receive-offload: on

...중략...


root@choi:/media# ethtool -K eth0  gro off

root@choi:/media# ethtool -k eth0

Features for eth0:

rx-checksumming: on

tx-checksumming: on

        tx-checksum-ipv4: off [fixed]

        tx-checksum-ip-generic: on

        tx-checksum-ipv6: off [fixed]

        tx-checksum-fcoe-crc: off [fixed]

        tx-checksum-sctp: off [fixed]

scatter-gather: on

        tx-scatter-gather: on

        tx-scatter-gather-fraglist: off [fixed]

tcp-segmentation-offload: on

        tx-tcp-segmentation: on

        tx-tcp-ecn-segmentation: off [fixed]

        tx-tcp-mangleid-segmentation: off

        tx-tcp6-segmentation: on

udp-fragmentation-offload: off

generic-segmentation-offload: on

generic-receive-offload: off

...중략...


여기서 제가 off한 기능은 tcp-offload 기능인데 이 기능은 MTU 이상의 크기를 가지는 패킷의 분할 작업을 CPU가 아닌 네트워크 카드가 직접 함으로서 CPU의 부담을 줄이고 패킷 처리 성능을 높이는 기능입니다. 하지만 이 기능은 네트워크 대역폭이 너무 높은 서버들에서 이슈를 일으킬 수 있기 때문에 불특정한 패킷 유실이 일어나는 것 같다면 기능을 off 하는것이 좋다. 

반응형

+ Recent posts