Skip to content

ethtool 사용법

조회 수 22254 추천 수 0 2009.06.04 02:26:21
ethtool 명령을 이용하여 랜카드 속도 및 전송 모드 지정하는 방법입니다.

1. 현재 eth0 설정 확인

아래와 같이 현재 eth0 카드의 설정을 확인합니다.

[root@sakang /]# ethtool eth0
Settings for eth0:
       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
                               100baseT/Half 100baseT/Full
       Advertised auto-negotiation: Yes
       Speed: 100Mb/s
       Duplex: Full

       Port: MII
       PHYAD: 1
       Transceiver: internal
       Auto-negotiation: on
       Supports Wake-on: pumbg
       Wake-on: d
       Current message level: 0x00000001 (1)
       Link detected: yes


현재 스피드가 100M 이고 전송모드는 Full Duplex  임을 확인할 수 있습니다.



2. 10M 로 변경하기

ethtool -s eth0 speed 10 duplex full autoneg on

위 명령으로 스피드를 10M 변경하고 확인해 봅시다.

[root@sakang /]# ethtool eth0
Settings for eth0:
       Supported ports: [ TP MII ]
       Supported link modes:   10baseT/Half 10baseT/Full
                               100baseT/Half 100baseT/Full
       Supports auto-negotiation: Yes
       Advertised link modes:  10baseT/Full
       Advertised auto-negotiation: Yes
       Speed: 10Mb/s
       Duplex: Full
       Port: MII
       PHYAD: 1
       Transceiver: internal
       Auto-negotiation: on
       Supports Wake-on: pumbg
       Wake-on: d
       Current message level: 0x00000001 (1)
       Link detected: yes

스피드가 10M 로 변경 되었습니다.

3. duplex 변경

아래 명령으로 전송모드를 변경할 수 있습니다.

ethtool -s eth0 speed 10 duplex half autoneg on

eth0 을 확인해 보면

Settings for eth0:
       Supported ports: [ TP MII ]
       Supported link modes:   10baseT/Half 10baseT/Full
                               100baseT/Half 100baseT/Full
       Supports auto-negotiation: Yes
       Advertised link modes:  10baseT/Half
       Advertised auto-negotiation: Yes
       Speed: 10Mb/s
       Duplex: Half

       Port: MII
       PHYAD: 1
       Transceiver: internal
       Auto-negotiation: on
       Supports Wake-on: pumbg
       Wake-on: d
       Current message level: 0x00000001 (1)
       Link detected: yes

전송 모드가 half Duplex 로 변경되었습니다.

이 상태에서 ethtool -s eth0 autoneg off 명령으로 자동협상기능을 끄고

ethtool -s eth0 autoneg on 명령으로 다시 켭니다.

그리고 나서 eth0 카드를 확인해 보면 100M Full Duplex 로 바뀌어져 있습니다.

이유는 eth0 카드와 연결된 스위치의 설정이 100M Full Duplex 이기 때문입니다.



사용 방법이 비슷한 mii-tool 이란 도구도 있으니 한번 사용해 보시기 바랍니다.
profile

일요일은 짜빠게뤼~ 먹는날~^^

엮인글 :
http://adminplay.com/1802/448/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
147 ssh, ftp 접근 딜레이 현상 발생시 조치방법 ADMINPLAY 2009-04-27 20094
146 DRBD Network Mirroring ADMINPLAY 2012-01-16 19999
145 파일에 대한 기본 지식 [1] l2zeo 2010-05-29 19913
144 chkconfig ADMINPLAY 2009-09-24 19859
143 [squid] 캐시 로그 결과 값(access_log) ADMINPLAY 2012-03-07 19824
142 리눅스에서 SSD 빠르게 쓰기 ADMINPLAY 2010-12-13 19783
141 CentOS 5.4 Crond 설치 ADMINPLAY 2011-02-07 19753
140 리눅스에서 테잎드라이브 쓰는방법 ADMINPLAY 2009-12-10 19725
139 ssh 특정 ip or 특정대역폭만 접속 허용 ADMINPLAY 2012-03-20 19560
138 clocksource tsc unstable 에러 ADMINPLAY 2010-10-29 19360
137 TOP 프로그램에서 사용하는 기능키 ADMINPLAY 2010-05-04 19348
136 우분투에 Samba 를 설치하자 ADMINPLAY 2010-11-08 19232
135 GBIC(지빅) 이 뭘까?? file ADMINPLAY 2012-08-02 19225
134 메신저 프로그램 사용 포트 ADMINPLAY 2010-05-19 19218
133 rm -rf * 잘못 쳤을 때 울지 않기! ADMINPLAY 2009-09-30 19209
132 [설치/설정] APM 튜닝정보 조금 ADMINPLAY 2009-09-24 19134
131 마우스 오른쪽 버튼 막기... ADMINPLAY 2008-12-14 19105
130 관리, 개발자를 위한 vi 환경 설정 ( vim-enhanced) ADMINPLAY 2009-04-27 19000
129 리눅스 터미널에서 사용하는 단축 키 ADMINPLAY 2009-05-28 18998
128 리눅스 java tocmat 설치 ADMINPLAY 2009-05-07 18984

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234