<?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>IPCPU——网络之路 &#187; VLAN</title>
	<atom:link href="http://www.ipcpu.com/tag/vlan/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ipcpu.com</link>
	<description></description>
	<lastBuildDate>Sat, 03 Dec 2011 17:16:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>交换机原理、VLAN、TRUNK、VTP</title>
		<link>http://www.ipcpu.com/2010/01/switch-vlan-trunk-vtp/</link>
		<comments>http://www.ipcpu.com/2010/01/switch-vlan-trunk-vtp/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 16:08:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[网络技术]]></category>
		<category><![CDATA[TRUNK]]></category>
		<category><![CDATA[VLAN]]></category>
		<category><![CDATA[思科]]></category>
		<category><![CDATA[网络]]></category>

		<guid isPermaLink="false">http://www.ipcpu.com/?p=1255</guid>
		<description><![CDATA[一、交换机原理： 1． 基于源MAC地址学习，基于目标MAC地址转发。 2.  对于没有目标MAC地址表项的帧，向本VLAN的其他所有接口（）转发 3． 收到广/组播帧, 向本VLAN的其他所有接口（）转发 4.  同一个MAC地址被多个接口学习到，选择后学习到的接口 5． 同一接口可以学习到多个MAC地址 思科交换机默认MAC地址老化时间是300S, 修改老化时间，可以针对单个VLAN来改动 Sw1(config)# mac-addresst-able aging-time 150 [vlan 10] 1 2 3 4 5 6 7 8 9 10 Switch#sh mac-address-table Mac Address Table ------------------------------------------- &#160; Vlan Mac Address Type Ports ---- ----------- -------- ----- &#160; 1 0030.f2b4.4601 DYNAMIC Fa0/1 10 0001.00cc.0521 STATIC Fa0/1 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>一、交换机原理：</strong><br />
1． 基于源MAC地址学习，基于目标MAC地址转发。<br />
2.  对于没有目标MAC地址表项的帧，向本VLAN的其他所有接口（）转发<br />
3． 收到广/组播帧, 向本VLAN的其他所有接口（）转发<br />
4.  同一个MAC地址被多个接口学习到，选择后学习到的接口<br />
5． 同一接口可以学习到多个MAC地址</p>
<p>思科交换机默认MAC地址老化时间是300S,</p>
<p>修改老化时间，可以针对单个VLAN来改动</p>
<p>Sw1(config)# mac-addresst-able aging-time 150 [vlan 10]</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">Switch</span><span style="color: #666666; font-style: italic;">#sh mac-address-table
</span>Mac Address Table
<span style="color: #339933;">-------------------------------------------</span>
&nbsp;
Vlan    Mac Address       Type        Ports
<span style="color: #339933;">----</span>    <span style="color: #339933;">-----------</span>       <span style="color: #339933;">--------</span>    <span style="color: #339933;">-----</span>
&nbsp;
<span style="color: #cc66cc;">1</span>    <span style="color: #208080;">0030</span><span style="color: #339933;">.</span>f2b4<span style="color: #339933;">.</span>4601    DYNAMIC     Fa0<span style="color: #339933;">/</span><span style="color: #cc66cc;">1</span>
<span style="color: #cc66cc;">10</span>    0001<span style="color: #339933;">.</span>00cc<span style="color: #339933;">.</span>0521    STATIC      Fa0<span style="color: #339933;">/</span><span style="color: #cc66cc;">1</span>
<span style="color: #b1b100;">Switch</span><span style="color: #666666; font-style: italic;">#</span></pre></td></tr></table></div>

<p>三元组：VLAN、MAC、Port</p>
<p>自行绑定静态MAC地址<br />
SW(config)#mac-address-table static 0001.00cc.0521 vlan 10 interface FastEthernet0/1</p>
<p>对于每个网卡而言，都有自己的MAC地址，那么如何查看每个交换机接口的内置MAC地址，那么怎么查看呢？哈哈，这个问题有些无聊啊，用sh int就可以查看了。</p>
<p><strong>二、VLAN</strong></p>
<p>VLAN作用：隔离广播域</p>
<p>VLAN创建<br />
Sw1(config)#vlan 2<br />
Sw1(config-vlan)#name ipcpu</p>
<p>查看VLAN<br />
Sw1#show vlan<br />
Sw1#show vlan brief</p>
<p>注意：<span id="more-1255"></span><br />
VLAN的数据保存在flash中的vlan.dat文件中，sh ru不能查看VLAN</p>
<p><strong>三、TRUNK</strong></p>
<p>在单条物理链路上承载多个VLAN的流量。一般用在交换机与交换机之间。</p>
<p>Trunk运用的2种协议：<br />
1.802.1Q：基本标准的IEEE协议，属业界标准。<br />
2.ISL（Inter-Switch Link）：Cisco专有的Trunk封装方式。</p>
<p>常见配置：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">!</span>
<span style="color: #000000; font-weight: bold;">interface</span> FastEthernet0<span style="color: #339933;">/</span><span style="color: #cc66cc;">11</span>
switchport trunk allowed vlan <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">20</span>
switchport trunk encapsulation dot1q
switchport mode trunk
<span style="color: #339933;">!</span>
<span style="color: #000000; font-weight: bold;">interface</span> FastEthernet0<span style="color: #339933;">/</span><span style="color: #cc66cc;">12</span>
switchport access vlan <span style="color: #cc66cc;">10</span>
switchport mode access
<span style="color: #339933;">!</span></pre></td></tr></table></div>

<p><strong>四、VTP</strong></p>
<p>VTP是一种2层消息协议，通过管理VTP域内的VLAN增/删/改，保持VLAN配置的一致性。<br />
交换机只能在802.1Q/ISL Trunk中传送VTP信息。<br />
这是思科私有协议，相似功能的业内标准有GVRP。</p>
<p>VTP有三种模式：<br />
Server<br />
Client<br />
Transparent[本地有效]</p>
<p>VTP信息每5分钟通告一次，或触发更新。<br />
VLAN信息同步规则：低版本号的跟高版本号的学习</p>
<p>注意：网络中新增交换机应该先配置成transparent再接入，然后修改成server或者client，防止存在高</p>
<p>版本VLAN信息，将原先VTP server中的信息刷掉。</p>
<p>常用操作：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">Switch</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">#vtp domain ipcpu.com
</span>Changing VTP domain name from <span style="color: #009900; font-weight: bold;">NULL</span> to ipcpu<span style="color: #339933;">.</span>com
<span style="color: #b1b100;">Switch</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">#vtp password haha
</span><span style="color: #b1b100;">Switch</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">#vtp mode server
</span>Device mode already VTP SERVER<span style="color: #339933;">.</span></pre></td></tr></table></div>

<p>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcpu.com/2010/01/switch-vlan-trunk-vtp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dynamips模拟交换机VLAN的查看</title>
		<link>http://www.ipcpu.com/2009/11/vlan-switch-dynamips/</link>
		<comments>http://www.ipcpu.com/2009/11/vlan-switch-dynamips/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 13:02:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[网络技术]]></category>
		<category><![CDATA[dynamips]]></category>
		<category><![CDATA[VLAN]]></category>

		<guid isPermaLink="false">http://www.ipcpu.com/?p=311</guid>
		<description><![CDATA[工大模拟器 Dynamips@Edurainbow GUI最新版本 V7.2 Router(config)#vlan 10 Router(config-vlan)#vlan 20 Router(config-vlan)# 查看VLAN SW1#sh vlan-switch VTP的一样的。 电脑重启了好几次，还是去实验室弄吧~]]></description>
			<content:encoded><![CDATA[<p>工大模拟器 <a href="mailto:Dynamips@Edurainbow">Dynamips@Edurainbow</a> GUI最新版本 V7.2</p>
<p>Router(config)#vlan 10<br />
Router(config-vlan)#vlan 20<br />
Router(config-vlan)#</p>
<p><strong>查看VLAN<br />
SW1#sh vlan-switch</strong></p>
<p>VTP的一样的。 电脑重启了好几次，还是去实验室弄吧~</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcpu.com/2009/11/vlan-switch-dynamips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

