码迷,mamicode.com
首页 > 系统相关 > 详细

Linux网桥设置

时间:2015-05-10 12:37:27      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:

1. sudo apt-get install bridge-utils
 
2. brctl --help
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
        hairpin <bridge> <port> {on|off} turn hairpin on/off
        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 [ <bridge> ] 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
 
3. 创建网桥
brctl addbr newbr
 
4. 将物理网卡1划入网桥
bectl addif newbr eth1
 
5. 取消物理网卡1的IP信息
ifconfig eth1 0.0.0.0
 
6. 分配IP地址给网桥
ifconfig newbr 3.242.164.147

Linux网桥设置

标签:

原文地址:http://www.cnblogs.com/IvanChen/p/4491950.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!