Question about "brctl hairpin br0 eth5 on"

老腊肉泡酒 2015-01-30 10:26:02
大家好,我想家配置一个从eth5收到包后再从eth5发送出去。 查了最新的brctl有支持 haipin 功能。

原命令说明如下:
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

我没有成功配置 hairpin. 我的命令如下。 求大家帮助:
brctl addbr br0
brctl addif br0 eth4
brctl hairpin br0 eth4 on

ifconfig br0 10.10.0.12 netmask 255.255.255.0 up
ifconfig br0:1 53.53.0.12 netmask 255.255.240.0 up
ifconfig eth4 up


cat /etc/sysconfig/network-scripts/ifcfg-eth4
DEVICE=eth4
BOOTPROTO=none
ONBOOT=yes
PROMISC=yes
BRIDGE=br0

cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.10.0.12
BROADCAST=10.10.0.255
NETMASK=255.255.255.0

cat /etc/sysconfig/network-scripts/ifcfg-br0:1
DEVICE=br0:1
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=none
IPADDR=53.53.0.12
NETMASK=255.255.240.0
...全文
153 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
老腊肉泡酒 2015-01-30
  • 打赏
  • 举报
回复
Sorry. 这个功能在rhel 7支持。 之前我装在rhel6.1上了。 命令本身是对的。

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧