리눅스 이더넷 장치명 뽑기

Jmnote (토론 | 기여)님의 2012년 5월 8일 (화) 14:17 판 (새 문서: ;gathering ethernet device names in linux ;리눅스 이더넷 장치명 목록 확인 ==ifconfig== ===목록 보기=== <source lang='dos'> [root@jmnote ~]# ifconfig -a | grep eth e...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
gathering ethernet device names in linux
리눅스 이더넷 장치명 목록 확인

1 ifconfig

1.1 목록 보기

[root@jmnote ~]# ifconfig -a | grep eth 
eth0      Link encap:Ethernet  HWaddr 71:23:45:0B:3D:90  
eth1      Link encap:Ethernet  HWaddr 71:23:45:0B:3D:91  
eth2      Link encap:Ethernet  HWaddr 71:23:45:0B:3D:92  
eth3      Link encap:Ethernet  HWaddr 71:23:45:0B:3D:93  
eth4      Link encap:Ethernet  HWaddr DE:F0:64:30:F1:28  
eth5      Link encap:Ethernet  HWaddr DE:F0:64:30:F1:2C  
eth6      Link encap:Ethernet  HWaddr DE:F0:64:30:F1:28  
eth7      Link encap:Ethernet  HWaddr DE:F0:64:30:72:5C  
eth8      Link encap:Ethernet  HWaddr 00:44:55:E7:D0:74  
eth9      Link encap:Ethernet  HWaddr 00:44:55:E7:D0:74  
eth10     Link encap:Ethernet  HWaddr 00:44:55:E7:D0:74  
eth11     Link encap:Ethernet  HWaddr 00:44:55:E7:D0:74

1.2 장치명만 뽑기

[root@jmnote ~]# ifconfig -a | grep eth | awk '{print $1}'
eth0
eth1
eth2
eth3
eth4
eth5
eth6
eth7
eth8
eth9
eth10
eth11

2 netstat

2.1 목록 보기

[root@jmnote ~]# netstat -ain | grep eth
eth0       1500   0        0      0      0      0        0      0      0      0 BM
eth1       1500   0        0      0      0      0        0      0      0      0 BM
eth2       1500   0        0      0      0      0        0      0      0      0 BM
eth3       1500   0        0      0      0      0        0      0      0      0 BM
eth4       9000   0 1817580326      0      0      0 1734983418      0      0      0 BMsRU
eth5       1500   0        0      0      0      0        0      0      0      0 BMU
eth6       9000   0   968740      0      0      0        0      0      0      0 BMsRU
eth7       1500   0 902941906      0      0      0 455988412      0      0      0 BMRU
eth8       1500   0 462123140      0      0      0 692422784      0      0      0 BMsRU
eth9       1500   0 1037464109      0      0      0 692423228      0      0      0 BMsRU
eth10      1500   0 463173821      0      0      0 692419632      0      0      0 BMsRU
eth11      1500   0 1036394616      0      0      0 692424467      0      0      0 BMsRU
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}