Доброго дня. Есть задача прогнать 3 tag влана между 2мя физическими интерфейсам em0 и em1. Как это осуществить ? Номера вланов не должны меняться.
Спасибо.
man if_bridge
EXAMPLES
The following when placed in the file /etc/rc.conf will cause a bridge
called ``bridge0'' to be created, and will add the interfaces ``wlan0''
and ``fxp0'' to the bridge, and then enable packet forwarding. Such a
configuration could be used to implement a simple 802.11-to-Ethernet
bridge (assuming the 802.11 interface is in ad-hoc mode).
cloned_interfaces="bridge0"
ifconfig_bridge0="addm wlan0 addm fxp0 up"
For the bridge to forward packets all member interfaces and the bridge
need to be up. The above example would also require:
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="up ssid my_ap mode 11g"
ifconfig_fxp0="up"
Consider a system with two 4-port Ethernet boards. The following will
cause a bridge consisting of all 8 ports with Rapid Spanning Tree enabled
to be created:
ifconfig bridge0 create
ifconfig bridge0 \
addm fxp0 stp fxp0 \
addm fxp1 stp fxp1 \
addm fxp2 stp fxp2 \
addm fxp3 stp fxp3 \
addm fxp4 stp fxp4 \
addm fxp5 stp fxp5 \
addm fxp6 stp fxp6 \
addm fxp7 stp fxp7 \
up
The bridge can be used as a regular host interface at the same time as
bridging between its member ports. In this example, the bridge connects
em0 and em1, and will receive its IP address through DHCP:
cloned_interfaces="bridge0"
ifconfig_bridge0="addm em0 addm em1 DHCP"
ifconfig_em0="up"
ifconfig_em1="up"
The bridge can tunnel Ethernet across an IP internet using the EtherIP
protocol. This can be combined with ipsec(4) to provide an encrypted
connection. Create a gif(4) interface and set the local and remote IP
addresses for the tunnel, these are reversed on the remote bridge.
ifconfig gif0 create
ifconfig gif0 tunnel 1.2.3.4 5.6.7.8 up
ifconfig bridge0 create
ifconfig bridge0 addm fxp0 addm gif0 up
Note that FreeBSD 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 have a bug in the
EtherIP protocol. For more details and workaround, see gif(4) manual
page.
sysctl -a | grep net.link.bridge
net.link.bridge.ipfw: 0
net.link.bridge.inherit_mac: 0
net.link.bridge.log_stp: 0
net.link.bridge.pfil_local_phys: 0
net.link.bridge.pfil_member: 1
net.link.bridge.pfil_bridge: 1
net.link.bridge.ipfw_arp: 0
net.link.bridge.pfil_onlyip: 1
kldload if_bridge
ifconfig vlan0 create vlandev em0 vlan 10 up
ifconfig vlan1 create vlandev em1 vlan 10 up
ifconfig bridge0 create
ifconfig bridge0 addm vlan0 addm vlan1 up
sysctl net.link.bridge.ipfw=1
For the bridge to forward packets all member interfaces and the bridge need to be up.
ifconfig_em0="up"
ifconfig_em1="up"
ifconfig_bridge0 create
ifconfig_bridge0 addm vlan10 addm vlan11 up
ifconfig_bridge1 create
ifconfig_bridge1 addm vlan20 addm vlan21 up
ifconfig_bridge2 create
ifconfig_bridge2 addm vlan30 addm vlan31 up
amasis писал(а):причем не каждый в отдельности, а обший шейп на 3 бриджа.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 44