브리지 script
작성자 정보
- 도치 작성
- 작성일
컨텐츠 정보
- 3,461 조회
- 0 추천
- 목록
본문
브리지 유틸 설치 하고 브리지 구성 할려고 합니다.
아래와 같이 script 를 작성하여 구성 하려고 하는데 , 잘못된 부분이나
추가 해야 할 내용 있음 지적해 주세요.. ^^
그리고 콘솔창에서 실행 하면 되나요. 아님 리부팅 하면서 자동으로 실행되도록
해야 하나요. ^^;
글구 bridge_script 는 부팅시마다 계속 실행 되도록 해야 하는건가요. ^^;
> bridge_script.sh
brctl=/usr/local/sbin/brctl
ifconfig=/sbin/ifconfig
iptables=/sbin/iptables
route=/sbin/route
# Configure Bridge
BRIDGE_NAME=mybridge
IP_ADDRESS=xxx.xxx.xxx.xxx
NETMASK=255.255.255.0
GATEWAY=xxx.xxx.xxx.xxx
# load bridge module
modprobe bridge
# load bypass NIC module
#modprobe bypass
# Add New Bridge NAME , "bridge"
$brctl addbr $BRIDGE_NAME
#Start STP
$brctl stp $BRIDGE_NAME on
# Add New Interface to Bridge
$brctl addif $BRIDGE_NAME eth0
$brctl addif $BRIDGE_NAME eth1
# Lancard initialize
$ifconfig eth0 down
$ifconfig eth1 down
# Interface initialize to Bridge
$ifconfig eth0 0.0.0.0
$ifconfig eth1 0.0.0.0
# Bridge interface up
$ifconfig $BRIDGE_NAME up
$ifconfig $BRIDGE_NAME $IP_ADDRESS netmask $NETMASK up
$route add -net 0/0 gw $GATEWAY
관련자료
-
이전
-
다음