<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dipplum.com &#187; 802.1q</title>
	<atom:link href="http://dipplum.com/tag/8021q/feed/" rel="self" type="application/rss+xml" />
	<link>http://dipplum.com</link>
	<description>Be  the change you wanna see in the world</description>
	<lastBuildDate>Sat, 12 Nov 2011 07:38:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Debian下网卡对802.1Q VLAN的支持</title>
		<link>http://dipplum.com/2008/10/14/debian-vlan/</link>
		<comments>http://dipplum.com/2008/10/14/debian-vlan/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 10:39:13 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[802.1q]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://dipplum.com/2008/10/14/debian-vlan/</guid>
		<description><![CDATA[现在的交换机大部分都支持802.1Q VLAN了, 通过VLAN可以将一个交换机上的不同端口分隔成隔离的链路, 也可以将多个交换机上的端口连接到同一个链路. 有时候, 我们可能希望一台机器同时连入多个VLAN, 最好是通过一块网卡. 也就是说, 让一个网络端口同时属于多个VLAN. 要实现这样的功能, 需要做两个方面的配置: 交换机配置 首先要把该主机对应的交换机端口设置为混合端口, 只有混合端口可以同时加入多个VLAN, 下面是Huawei交换机的配置片段: interface Ethernet0/1 port link-type hybrid port hybrid vlan 10 20 tagged port hybrid pvid vlan 10 上述配置让交换机的1号端口成为混合端口, 并同时加入id号为10和20的VLAN, 主VLAN号是10. Debian主机配置 首先需要在Debian上安装vlan配置工具. apt-get install vlan 然后, 我们可以在Debian的网络配置文件中, 配置每个VLAN对应的网卡. 下面是/etc/network/interfaces文件的片段: auto eth0.10 iface eth0.10 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.254 [...]]]></description>
			<content:encoded><![CDATA[<p>现在的交换机大部分都支持802.1Q VLAN了, 通过VLAN可以将一个交换机上的不同端口分隔成隔离的链路, 也可以将多个交换机上的端口连接到同一个链路.</p>
<p>有时候, 我们可能希望一台机器同时连入多个VLAN, 最好是通过一块网卡. 也就是说, 让一个网络端口同时属于多个VLAN. 要实现这样的功能, 需要做两个方面的配置:</p>
<p><strong>交换机配置</strong></p>
<p>首先要把该主机对应的交换机端口设置为混合端口, 只有混合端口可以同时加入多个VLAN, 下面是Huawei交换机的配置片段:</p>
<p><code>interface Ethernet0/1      <br />port link-type hybrid       <br />port hybrid vlan 10 20 tagged       <br />port hybrid pvid vlan 10</code></p>
<p>上述配置让交换机的1号端口成为混合端口, 并同时加入id号为10和20的VLAN, 主VLAN号是10.</p>
<p><strong>Debian主机配置</strong></p>
<p>首先需要在Debian上安装vlan配置工具.</p>
<p><code>apt-get install vlan</code></p>
<p>然后, 我们可以在Debian的网络配置文件中, 配置每个VLAN对应的网卡. 下面是/etc/network/interfaces文件的片段:</p>
<p><code>auto eth0.10      <br />iface eth0.10 inet static       <br />address 192.168.1.10       <br />netmask 255.255.255.0       <br />gateway 192.168.1.254       </p>
<p>iface eth0.20 inet static       <br />address 192.168.2.10&#160; <br />netmask 255.255.255.0</code></p>
<p>上述配置文件配置的主机, 分别有两块虚拟网卡eth0.10, eth0.20, 对应VLAN 10和VLAN 20所在的网络.</p>
<p>除了配置文件之外, 管理员还可以通过vconfig命令, 增加或者删除VLAN.</p>
]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2008/10/14/debian-vlan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

