[Linux] 본딩(bonding) Active-Stand by 구성 방법

반응형
반응형

 

본딩(bonding)이란

 

여러개의 NIC(랜카드)을 논리적으로 묶어서 한 개의 NIC의 개수만큼 대역폭을 확장하는 기술

 

 

 

2개의 NIC을 한 개의 NIC로 묶어서 Active와 Stand By로 구성

 

ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="static"
ONBOOT="yes"
MASTER="bond0
SLAVE="yes"

 

ifcfg-eth1

DEVICE="eth1"
BOOTPROTO="static"
ONBOOT="yes"
MASTER="bond0
SLAVE="yes"

 

ifcfg-bond0

DEVICE="bond0"
TYPE="Bond"
BONDING_OPTS="mode=active-backup miimon=100 updelay=10000"
BOOTPROTO="static"
ONBOOT="yes"
DNS1="x.x.x.x"
IPADDR="x.x.x.x"
GATEWAY="x.x.x.x"
NETMASK="255.255.255.0"

active-backup 모드

: bond에서 하나의 슬레이브만 활성화된다. 다른 슬레이브는 standby 상태로 대기하다가 활성 중인 슬레이브가 fail 된 경우 standby 슬레이브가 활성화된다

miimon 

: 상태 체크 주기

updelay

: 링크를 up으로 하기 전에 대기시간

 

systemctl restart network 

- 네트워크 재구동

 

ifconfig

[root@test-1 ~]# ifconfig
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 192.168.231.67  netmask 255.255.255.0  broadcast 192.168.231.255
        ether 75:cd:43:77:95:dd  txqueuelen 1000  (Ethernet)
        RX packets 123013  bytes 32631948 (31.1 MiB)
        RX errors 0  dropped 2469  overruns 0  frame 0
        TX packets 9171  bytes 2771964 (2.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 75:cd:43:77:95:dd  txqueuelen 1000  (Ethernet)
        RX packets 66345  bytes 18564023 (17.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9176  bytes 2772854 (2.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 75:cd:43:77:95:dd  txqueuelen 1000  (Ethernet)
        RX packets 56686  bytes 14070595 (13.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

bond0

[root@test-1 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 10000
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 75:cd:43:77:95:dd
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 75:cd:43:77:95:de
Slave queue ID: 0

 

 

반응형

댓글

Designed by JB FACTORY

loading