"리눅스 본딩 확인"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-==참고 자료== +==참고==))
 
(사용자 2명의 중간 판 20개는 보이지 않습니다)
3번째 줄: 3번째 줄:
;리눅스 bonding 정보 수집
;리눅스 bonding 정보 수집


==1개 확인==
==방법 1: bondN 파일==
===명령어===
<source lang='console'>
<source lang='bash'>
[root@zetawiki ~]# grep -H ^'Slave Interface'  /proc/net/bonding/bond*
grep MASTER= /etc/sysconfig/network-scripts/ifcfg-장치명
/proc/net/bonding/bond0:Slave Interface: eth0
/proc/net/bonding/bond0:Slave Interface: eth1
/proc/net/bonding/bond1:Slave Interface: eth2
/proc/net/bonding/bond1:Slave Interface: eth3
</source>
</source>
:→ eth0 + eth1 = bond0
:→ eth2 + eth3 = bond1


===실행예시===
==방법 2: ifcfg-ethN 파일==
;bond인 경우
<source lang='console'>
<source lang='bash'>
[root@zetawiki ~]# grep -H MASTER= /etc/sysconfig/network-scripts/ifcfg-eth*
[root@localhost ~]# grep MASTER= /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth0:MASTER=bond0
MASTER=bond1
/etc/sysconfig/network-scripts/ifcfg-eth1:MASTER=bond0
/etc/sysconfig/network-scripts/ifcfg-eth2:MASTER=bond1
/etc/sysconfig/network-scripts/ifcfg-eth3:MASTER=bond1
</source>
</source>
:→eth0은 bond1에 속함
:→ eth0 + eth1 = bond0
:→ eth2 + eth3 = bond1


;bond가 아닌 경우
==방법 3: ip link==
<source lang='bash'>
<source lang='console'>
[root@localhost ~]# grep MASTER= /etc/sysconfig/network-scripts/ifcfg-eth2
[root@zetawiki ~]# ip link | grep bond0
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
5: eth3: <BROADCAST,MULTICAST,NOARP,SLAVE,DEBUG,AUTOMEDIA,PORTSEL,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
58: bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
</source>
</source>
:→bond가 아닌 경우 결과값 없음.
:→ eth2 + eth3 = bond0


==전체 확인==
==같이 보기==
===명령어===
*[[리눅스 본딩 구성]]
<source lang='bash'>
*[[리눅스 이더넷 펌웨어 버전 수집]]
DEVNAMES=(`ifconfig -a | grep eth | awk '{print $1}' | xargs echo`)
*[[/etc/sysconfig/network-scripts/ifcfg-eth0]]
for DEVNAME in "${DEVNAMES[@]}"
*[[/proc/net/bonding/bond0]]
do
*[[리눅스 ip link]]
        MASTER=`grep MASTER= /etc/sysconfig/network-scripts/ifcfg-$DEVNAME`
        echo "$DEVNAME --- $MASTER"
done
</source>
 
===실행예시===
<source lang='dos'>
[root@localhost ~]# for DEVNAME in "${DEVNAMES[@]}"; do MASTER=`grep MASTER= /etc/sysconfig/network-scripts/ifcfg-$DEVNAME`; echo "$DEVNAME --- $MASTER"; done
eth0 --- MASTER=bond1
eth1 --- MASTER=bond1
eth2 ---
eth3 ---
eth4 --- MASTER=bond0
eth5 ---
eth6 --- MASTER=bond0
eth7 ---
</source>
:→ eth0과 eth1이 bond1로 묶여 있음
:→ eth4과 eth6이 bond0으로 묶여 있음


==참고==
*http://linux-ip.net/html/ether-bonding.html
[[분류: 리눅스 네트워크]]
[[분류: 리눅스 네트워크]]

2017년 7월 11일 (화) 04:17 기준 최신판

리눅스 이더넷 bond 확인
리눅스 bonding 확인
리눅스 bonding 정보 수집

1 방법 1: bondN 파일[ | ]

[root@zetawiki ~]# grep -H ^'Slave Interface'  /proc/net/bonding/bond*
/proc/net/bonding/bond0:Slave Interface: eth0
/proc/net/bonding/bond0:Slave Interface: eth1
/proc/net/bonding/bond1:Slave Interface: eth2
/proc/net/bonding/bond1:Slave Interface: eth3
→ eth0 + eth1 = bond0
→ eth2 + eth3 = bond1

2 방법 2: ifcfg-ethN 파일[ | ]

[root@zetawiki ~]# grep -H MASTER= /etc/sysconfig/network-scripts/ifcfg-eth*
/etc/sysconfig/network-scripts/ifcfg-eth0:MASTER=bond0
/etc/sysconfig/network-scripts/ifcfg-eth1:MASTER=bond0
/etc/sysconfig/network-scripts/ifcfg-eth2:MASTER=bond1
/etc/sysconfig/network-scripts/ifcfg-eth3:MASTER=bond1
→ eth0 + eth1 = bond0
→ eth2 + eth3 = bond1

3 방법 3: ip link[ | ]

[root@zetawiki ~]# ip link | grep bond0
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
5: eth3: <BROADCAST,MULTICAST,NOARP,SLAVE,DEBUG,AUTOMEDIA,PORTSEL,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
58: bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
→ eth2 + eth3 = bond0

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}