您的位置:首页 > 其它

2.4. Connecting to an Ethernet 802.1q VLAN

2009-12-30 20:44 399 查看

2.4. Connecting to an Ethernet 802.1q VLAN

Virtual LANs are a way to take a single switch and subdivide it into logical media segments. A single switch port in a VLAN-capable switch can carry packets from multiple virtual LANs and linux can understand the format of these Ethernet frames. For more on this, see the linux 802.1q VLAN implementation site.

Kernels in the late 2.4 series have support for VLAN incorporated into the stock release. The vconfig tool, however needs to be compiled against the kernel source in order to provide userland configurability of the kernel support for VLANs.

There are a few items of note which may prevent quick adoption of VLAN support under linux. Ben McKeegan wrote a good summary of the MTU/MRU issues involved with VLANs and 10/100 Ethernet. Gigabit Ethernet drivers are not hamstrung with this problem. Consider using gigabit Ethernet cards from the outset to avoid these potential problems.

Example 2.11. Bringing up a VLAN interface
[root@real-router]#
vconfig add eth0 7

[root@real-router]#
ip addr add dev eth0.7 192.168.30.254/24 brd +

[root@real-router]#
ip link set dev eth0.7 up

[/code]
Each interface defined using the vconfig utility takes its name from the base device to which it has been bound, and appends the VLAN tag ID, as shown in Example 2.11, “Bringing up a VLAN interface”.

This documentation is sparse. Visit the main site and the VLAN mailing list archives.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: