- 작성시간 : 2010/08/19 14:33
- 퍼머링크 : mcchae.egloos.com/10557954
- 덧글수 : 0
보통 eth0, eth1,... 등과 같이 리눅스 머신에서 NIC 이더넷 카드가 존재한다.
이런 이더넷은
Ethernet - 10Mbps
FastEthernet - 100Mbps
GigabitEthernet = 1Gbps
TenGigabitEthernet = 10Gbps
등과 같이 속도가 차이가 날 수 있는데,
이를 쉽게 알 수 있는 방법에 대해 알아본다.
1) dmesg | grep eth
이 명령으로 eth<n>의 정보가 보일 수 있는데,
[ 3383.703917] e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
[ 3383.703920] 0000:0b:00.1: eth1: 10/100 speed: disabling TSO
[ 3383.706386] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 3394.144003] eth1: no IPv6 routers present
[ 3407.488869] e1000e: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[ 3407.489059] ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
[ 3417.984005] eth2: no IPv6 routers present
이런 식으로 정보를 보여주는 경우도 있고,
[ 2611.862755] r8169: eth0: link up
[ 2611.863135] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 2621.944037] eth0: no IPv6 routers present
[ 2692.376048] eth1: no IPv6 routers present
[ 3148.796602] r8169: eth0: link up
[ 3159.300041] eth0: no IPv6 routers present
[ 3166.950070] r8169: eth0: link down
[ 3207.230027] r8169: eth0: link up
이런 식으로 안 보여주는 경우도 있다.
2) ethtool
# apt-get install ethtool
로 ethtool 을 설치한다.
toor@NetSpear:~$ sudo 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: pumbag
Wake-on: g
Current message level: 0x00000001 (1)
Link detected: yes
와 같이 결과가 나온다.
3) mii-tool
대부분 설치되 있지만,
# apt-get install net-tools
toor@NetSpear:~$ sudo mii-tool eth2
SIOCGMIIREG on eth2 failed: Input/output error
SIOCGMIIREG on eth2 failed: Input/output error
eth2: negotiated 1000baseT-FD flow-control, link ok
toor@NetSpear:~$ dpkg -l | grep nettools
와 같이 정보를 NIC 카드의 연결 속도를 구해볼 수 있다.
덧글