커널 2.4.x 대에서는 별도에 커널옵션 항목이 필요하며 2.6.x 대에서는 기본으로 bridge 모듈이 포함되어있다....
# YUM 을 통한 Brige Uitl 설치...(브리지를 컨트롤 하는 유틸)
yum install brige-util
[root@localhost ~]# brctl
Usage: brctl [commands]
commands:
addbr <bridge> add bridge
delbr <bridge> delete bridge
addif <bridge> <device> add interface to bridge
delif <bridge> <device> delete interface from bridge
setageing <bridge> <time> set ageing time
setbridgeprio <bridge> <prio> set bridge priority
setfd <bridge> <time> set bridge forward delay
sethello <bridge> <time> set hello time
setmaxage <bridge> <time> set max message age
setpathcost <bridge> <port> <cost> set path cost
setportprio <bridge> <port> <prio> set port priority
show show a list of bridges
showmacs <bridge> show a list of mac addrs
showstp <bridge> show bridge stp info
stp <bridge> {on|off} turn stp on/off
# 네트워크 인터페이스 설정
- IN / OUT 을 위해 최소 2개이상의 이더넷 포트가 필요하다.
- 나는 접근용 포트를 별도로 분리해서 총 3개의 포트를 사용했다.
[root@localhost ~]# brctl addbr br0
[root@localhost ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
[root@localhost ~]# brctl addif br0 eth1
[root@localhost ~]# brctl addif br0 eth2
[root@localhost ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0015173a009c no eth1
eth2
[root@localhost network-scripts]# ifconfig eth1 0.0.0.0 promisc up
[root@localhost network-scripts]# ifconfig eth2 0.0.0.0 promisc up
[root@localhost network-scripts]# ifconfig br0 promisc up
브릿지 start / stop 스크립트는 알아서 작성하시길...