- 论坛徽章:
- 0
|
本帖最后由 Roemer 于 2010-08-14 22:05 编辑
在网上看到一篇文章~
HowTo: VLAN's and Bridging through network-scripts
Bridging over VLAN's
What?
As if you weren't confused enough already, now let's combine the two concepts and create a bridge across a VLAN. That would be a bridge between two ethernet interfaces, where one is a real ethernet card in the PC (or a wifi, or some other regular type of ethernet interface), and the other will be a VLAN interface.
Why?
Let's say you have a piece of equipment which by itself doesn't know how to talk VLAN -but you want to connect it to a VLAN. By constructing a bridge between a "normal" and a "VLAN" ethernet interface, the Linux computer will add and remove the VLAN headers on behalf of any other device(s) plugged into the "normal" card.
How?
Okay, now for the tricky part. It takes a slight modification of the procedures above. For this example, let's presume we have an ethernet interface eth0 connected to the network where a VLAN id 2 is present, and we have a device or devices on eth1 that need to be bridged into that VLAN 2.
Go ahead and first construct the VLAN interface like we did before (copy ifcfg-eth#, change DEVICE, add VLAN=yes), except also remove the BOOTPROTO, IPADDR, NETMASK, and GATEWAY lines if present. Add a line BRIDGE=br2 (or a different named bridge device of your choice). |
|