<?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>老管网络日志 &#124; funpower blog &#187; 网络</title>
	<atom:link href="http://guanjianfeng.com/archives/tag/%e7%bd%91%e7%bb%9c/feed" rel="self" type="application/rss+xml" />
	<link>http://guanjianfeng.com</link>
	<description>老男孩</description>
	<lastBuildDate>Mon, 23 Apr 2012 14:56:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>ospf邻居状态在Exstart与Exchange来回切换</title>
		<link>http://guanjianfeng.com/archives/1444</link>
		<comments>http://guanjianfeng.com/archives/1444#comments</comments>
		<pubDate>Sun, 05 Sep 2010 03:23:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[计算机\网络]]></category>
		<category><![CDATA[随写]]></category>
		<category><![CDATA[ospf]]></category>
		<category><![CDATA[网络]]></category>

		<guid isPermaLink="false">http://guanjianfeng.com/?p=1444</guid>
		<description><![CDATA[路由器不断显示如下信息： 00:33:10: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done 00:33:11: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done 00:33:11: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done 00:33:12: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, [...]]]></description>
			<content:encoded><![CDATA[<p>路由器不断显示如下信息：</p>
<blockquote><p>00:33:10: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done<br />
00:33:11: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done<br />
00:33:11: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done<br />
00:33:12: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done<br />
00:33:12: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done<br />
00:33:12: %OSPF-5-ADJCHG: Process 100, Nbr 88.10.10.254 on FastEthernet1/1 from EXCHANGE to FULL, Exchange Done</p></blockquote>
<p>查看邻居状态：</p>
<blockquote><p>cisco-master#sh ip ospf neighbor<br />
Neighbor ID     Pri   State            Dead Time   Address         Interface<br />
10.88.90.254      1   FULL/DR          00:00:30    10.88.90.254    FastEthernet0/0<br />
10.88.90.112      1   <span style="color: #ff0000;">Exstart</span>/DROTHER  00:00:30    10.88.90.112    FastEthernet0/0<br />
26.10.10.254      1   FULL/DR          00:00:30    172.0.0.1       FastEthernet0/1<br />
69.10.10.254      1   FULL/DR          00:00:30    172.1.0.1       FastEthernet1/0<br />
88.10.10.254      1   FULL/DR          00:00:33    172.2.0.1       FastEthernet1/1</p>
<p>cisco-master#sh ip ospf neighbor<br />
Neighbor ID     Pri   State             Dead Time   Address         Interface<br />
10.88.90.254      1   FULL/DR           00:00:30    10.88.90.254    FastEthernet0/0<br />
10.88.90.112      1   <span style="color: #ff0000;">Exchange</span>/DROTHER  00:00:30    10.88.90.112    FastEthernet0/0<br />
26.10.10.254      1   FULL/DR           00:00:30    172.0.0.1       FastEthernet0/1<br />
69.10.10.254      1   FULL/DR           00:00:30    172.1.0.1       FastEthernet1/0<br />
88.10.10.254      1   FULL/DR           00:00:33    172.2.0.1       FastEthernet1/1</p></blockquote>
<p>邻居状态在Exstart与Exchange中来回切换。</p>
<p>参考<a href="http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080093f0d.shtml">此文</a>解决：</p>
<p>由于两路由器间的MTU不匹配引起的，调整相应接品的MTU或者设置为忽略检测MTU，该设置不支持交换口。</p>
<p>在接口上启用如下命令来忽略MTU的检测：</p>
<blockquote><p>cisco-master#configure terminal<br />
Enter configuration commands, one per line.  End with CNTL/Z.<br />
cisco-master(config)#interface fastEthernet 0/0<br />
cisco-master(config-if)#ip ospf mtu-ignore</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://guanjianfeng.com/archives/1444/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>联想天工iSpirit 2948G交换机端口和MAC绑定及端口带宽限制</title>
		<link>http://guanjianfeng.com/archives/797</link>
		<comments>http://guanjianfeng.com/archives/797#comments</comments>
		<pubDate>Tue, 06 Jan 2009 01:11:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器维护]]></category>
		<category><![CDATA[计算机\网络]]></category>
		<category><![CDATA[随写]]></category>
		<category><![CDATA[lenovo]]></category>
		<category><![CDATA[交换机]]></category>
		<category><![CDATA[天工]]></category>
		<category><![CDATA[网络]]></category>

		<guid isPermaLink="false">http://guanjianfeng.com/?p=797</guid>
		<description><![CDATA[前段时间接触了联想天工交换机，核心为联想天工iSpirit8800，楼层都为天工iSpirit 2948G，在楼层上做了两个限制，一是将端口与用户的网卡MAC绑定，只有绑定的网卡数据包才能出去，二是限制了每个端口的带宽（防止P2P下载），配置如下： 1、端口与MAC地址绑定 MAC与端口绑定 shiyan#conf t //进入配置模式 shiyan_config#interface fastEthernet 0/11 //进入交换机11端口配置模式 shiyan_config_f0/11#switchport port-security mode static accept //打开安全端口的模式 shiyan_config_f0/11#switchport port-security static mac-address 0001.4A22.E728 //设置安全端口的安全MAC shiyan_config_f0/11#switchport port-security static mac-address 0001.4DFF.EEFD //设置安全端口的安全MAC shiyan_config_f0/11#exit shiyan_config#exit shiyan#wr //写入配置 Saving current configuration&#8230; OK! 去除MAC与端口绑定 shiyan#conf t //进入配置模式 shiyan_config#interface fastEthernet 0/11 //进入交换机11端口配置模式 shiyan_config_f0/11#no switchport port-security static mac-address 0001.4A22.E728 //设置去除安全端口的安全MAC地址 shiyan_config_f0/11#no switchport port-security [...]]]></description>
			<content:encoded><![CDATA[<p>前段时间接触了<a href="http://www.lenovonetworks.com">联想天工交换机</a>，核心为联想天工iSpirit8800，楼层都为天工iSpirit 2948G，在楼层上做了两个限制，一是将端口与用户的网卡MAC绑定，只有绑定的网卡数据包才能出去，二是限制了每个端口的带宽（防止P2P下载），配置如下：</p>
<p><strong>1、端口与MAC</strong><strong>地址绑定</strong></p>
<p><strong>MAC与端口绑定</strong></p>
<blockquote><p>shiyan#conf t<br />
//进入配置模式<br />
shiyan_config#interface fastEthernet 0/11<br />
//进入交换机11端口配置模式<br />
shiyan_config_f0/11#switchport port-security mode static accept<br />
//打开安全端口的模式<br />
shiyan_config_f0/11#switchport port-security static mac-address 0001.4A22.E728<br />
//设置安全端口的安全MAC<br />
shiyan_config_f0/11#switchport port-security static mac-address 0001.4DFF.EEFD<br />
//设置安全端口的安全MAC<br />
shiyan_config_f0/11#exit<br />
shiyan_config#exit<br />
shiyan#wr<br />
//写入配置<br />
Saving current configuration&#8230;<br />
OK!</p></blockquote>
<p><strong>去除MAC与端口绑定</strong></p>
<blockquote><p>shiyan#conf t<br />
//进入配置模式<br />
shiyan_config#interface fastEthernet 0/11<br />
//进入交换机11端口配置模式<br />
shiyan_config_f0/11#no switchport port-security static mac-address 0001.4A22.E728<br />
//设置去除安全端口的安全MAC地址<br />
shiyan_config_f0/11#no switchport port-security static mac-address<br />
//设置去除所有安全端口的安全MAC<br />
shiyan_config_f0/11#exit<br />
shiyan_config#exit<br />
shiyan#wr<br />
//写入配置<br />
Saving current configuration&#8230;<br />
OK!</p></blockquote>
<p><strong>只打开端口的安全端口功能(此端口不能上网)</strong></p>
<blockquote><p>shiyan#conf t<br />
//进入配置模式<br />
shiyan_config#interface fastEthernet 0/11<br />
//进入交换机11端口配置模式<br />
shiyan_config_f0/11#switchport port-security mode static accept<br />
//打开11口的安全端口功能<br />
shiyan_config_f0/11#exit<br />
shiyan_config#exit<br />
shiyan#wr<br />
//写入配置<br />
Saving current configuration&#8230;<br />
OK!</p></blockquote>
<p><strong>打开多端口的安全端口功能(此些端口不能上网)</strong></p>
<blockquote><p>shiyan#conf t<br />
//进入配置模式<br />
shiyan_config#interface range fastEthernet 0/11 &#8211; 20<br />
//进入交换机11-20端口配置模式<br />
shiyan_config_f0/11#switchport port-security mode static accept<br />
//打开11口的安全端口功能<br />
shiyan_config_f0/11#exit<br />
shiyan_config#exit<br />
shiyan#wr<br />
//写入配置<br />
Saving current configuration&#8230;<br />
OK!</p></blockquote>
<p><strong>2、端口带宽限制</strong></p>
<p>通过设置端口的rate-limit参数来限制端口带宽，共有1-32个单位可以设置，每个单位速度为3.3Mbps(约330KB/S)下载速度。端口有进和出的限制，都限制为1，这样上行和下行的带宽共为2个单位，约660KB/S。操作如下：</p>
<blockquote><p>shiyan#conf t<br />
shiyan_config#interface fastEthernet 0/42<br />
shiyan_config_f0/42#switchport rate-limit 1 ingress<br />
shiyan_config_f0/42#switchport rate-limit 1 egress<br />
//limit单位1-32,每个单位速度为3.3Mbps<br />
shiyan_config_f0/42#exit<br />
shiyan_config#exit<br />
shiyan#wr</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://guanjianfeng.com/archives/797/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>核心H3C S7506E与边界3COM 4400通过光纤口链接时的注意</title>
		<link>http://guanjianfeng.com/archives/782</link>
		<comments>http://guanjianfeng.com/archives/782#comments</comments>
		<pubDate>Sun, 04 Jan 2009 23:32:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[*BSD]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[服务器维护]]></category>
		<category><![CDATA[网页设计]]></category>
		<category><![CDATA[计算机\网络]]></category>
		<category><![CDATA[随写]]></category>
		<category><![CDATA[3com]]></category>
		<category><![CDATA[4400]]></category>
		<category><![CDATA[h3c]]></category>
		<category><![CDATA[vlan]]></category>
		<category><![CDATA[网络]]></category>

		<guid isPermaLink="false">http://guanjianfeng.com/?p=782</guid>
		<description><![CDATA[by funpower，2009年1月5日21：31，funpower#gmail.com，转载请注明出处。水平有限，文中难免有错误，望指正。 前段时间将一个网络中的核心交换机替换为H3C S7506E，与核心相连的四十几个边界交换机都为3COM 4400，在网络切割中出现了一些小问题，做个笔记。 简单拓扑图： 1、速率及全双工、半双工问题 经调试下来，H3C S7506E与3COM 4400都设置为自协商，光纤口也不能起来，有可能是品牌不同引起，最后将两边都强制为1000兆且全双工，光纤口就起来了。 因此切割前一定要先查看所有边界交换机的速率及全双工、半双工设置，进入3COM交换机管理界面后输入：phy eth sum 1:26，查看显示的光纤口的设置。 上图mode显示为1000full，即模式为强制1000兆并且全双工，如果显示为1000&#60;auto&#62;，为1000兆并且自动协商，需改为强制全双式，输入命令：phy eth portmode，然后输入1:26，接下来是确定自动协商为disable还是enable，这里要强制，不协商，所以输入disable，接下来为端口模式，输入1000full，步骤如下图。 这样就把一个边界交换机的光纤口设置为强制1000及全双工了。 然后连接到H3C S7506E核心交换机上，将连接至边界交换机的光纤口也都改成1000兆且全双工，如下： [center7506]interface gig2/0/1 [center7506-GigabitEthernet2/0/1]speed 1000 [center7506-GigabitEthernet2/0/1]duplex full [center7506-GigabitEthernet2/0/1]q 2、3COM交换机VLAN1带标记的问题 在调试过程中，出现了一个问题，边界交换机的其它VLAN都能和三层交换通讯且可以出防火墙上互联网，唯独VLAN1不能和三层通讯，最后发现是所有的边界交换机把VLAN1口也打上TAG标记再送给核心三层，如下图： 但H3C默认是不认打标记的VLAN1的帧，所以会产生其它非VLAN1打标记都能和三层通讯。此时有两种解决方法，第一是将所有的边界交换机都改成VLAN1不打标记，第二种方法就是如果核心交换机支持HYBRID模式，就可以将核心交换机的和边界交换机相连的所有光纤口都从TRUNK模式改为HYBRID模式。这里采用了第二种方法：具体如下： [center7506]interface gig 2/0/1 [center7506-GigabitEthernet2/0/1]undo port link-type trunk [center7506-GigabitEthernet2/0/1]port link-type hybrid [center7506-GigabitEthernet2/0/1]port hybrid vlan 1 to 2 4 to 46 51 to 59 tagged [center7506-GigabitEthernet2/0/1]q 这样就将光口2/0/1改为了hybrid模式，这样就强制该端口的VLAN1也打上tag。就能认边界发过来的带tag的VLAN1的帧了。]]></description>
			<content:encoded><![CDATA[<p><span style="color: #808080;">by funpower，2009年1月5日21：31，funpower#gmail.com，转载请注明出处。水平有限，文中难免有错误，望指正。</span></p>
<p>前段时间将一个网络中的核心交换机替换为H3C S7506E，与核心相连的四十几个边界交换机都为3COM 4400，在网络切割中出现了一些小问题，做个笔记。</p>
<p><strong>简单拓扑图：</strong></p>
<p><img class="alignnone size-full wp-image-783" title="h3c6" src="http://guanjianfeng.com/wp-content/uploads/2009/01/h3c6.gif" alt="h3c6" width="520" height="350" /></p>
<p><strong>1、速率及全双工、半双工问题</strong></p>
<p>经调试下来，H3C S7506E与3COM 4400都设置为自协商，光纤口也不能起来，有可能是品牌不同引起，最后将两边都强制为1000兆且全双工，光纤口就起来了。</p>
<p>因此切割前一定要先查看所有边界交换机的速率及全双工、半双工设置，进入3COM交换机管理界面后输入：phy eth sum 1:26，查看显示的光纤口的设置。</p>
<p><img class="alignnone size-full wp-image-784" title="h3c1" src="http://guanjianfeng.com/wp-content/uploads/2009/01/h3c1.gif" alt="h3c1" width="516" height="239" /></p>
<p><img class="alignnone size-full wp-image-785" title="h3c2" src="http://guanjianfeng.com/wp-content/uploads/2009/01/h3c2.gif" alt="h3c2" width="487" height="83" /></p>
<p>上图mode显示为1000full，即模式为强制1000兆并且全双工，如果显示为1000&lt;auto&gt;，为1000兆并且自动协商，需改为强制全双式，输入命令：phy eth portmode，然后输入1:26，接下来是确定自动协商为disable还是enable，这里要强制，不协商，所以输入disable，接下来为端口模式，输入1000full，步骤如下图。</p>
<p><img class="alignnone size-full wp-image-786" title="h3c3" src="http://guanjianfeng.com/wp-content/uploads/2009/01/h3c3.gif" alt="h3c3" width="521" height="280" /></p>
<p>这样就把一个边界交换机的光纤口设置为强制1000及全双工了。</p>
<p>然后连接到H3C S7506E核心交换机上，将连接至边界交换机的光纤口也都改成1000兆且全双工，如下：</p>
<blockquote><p>[center7506]interface gig2/0/1<br />
[center7506-GigabitEthernet2/0/1]speed 1000<br />
[center7506-GigabitEthernet2/0/1]duplex full<br />
[center7506-GigabitEthernet2/0/1]q</p></blockquote>
<p><strong>2、3COM交换机VLAN1带标记的问题</strong></p>
<p>在调试过程中，出现了一个问题，边界交换机的其它VLAN都能和三层交换通讯且可以出防火墙上互联网，唯独VLAN1不能和三层通讯，最后发现是所有的边界交换机把VLAN1口也打上TAG标记再送给核心三层，如下图：</p>
<p><img class="alignnone size-full wp-image-788" title="h3c5" src="http://guanjianfeng.com/wp-content/uploads/2009/01/h3c5.gif" alt="h3c5" width="510" height="137" /></p>
<p>但H3C默认是不认打标记的VLAN1的帧，所以会产生其它非VLAN1打标记都能和三层通讯。此时有两种解决方法，第一是将所有的边界交换机都改成VLAN1不打标记，第二种方法就是如果核心交换机支持HYBRID模式，就可以将核心交换机的和边界交换机相连的所有光纤口都从TRUNK模式改为HYBRID模式。这里采用了第二种方法：具体如下：</p>
<blockquote><p>[center7506]interface gig 2/0/1<br />
[center7506-GigabitEthernet2/0/1]undo port link-type trunk<br />
[center7506-GigabitEthernet2/0/1]port link-type hybrid<br />
[center7506-GigabitEthernet2/0/1]port hybrid vlan 1 to 2 4 to 46 51 to 59 tagged<br />
[center7506-GigabitEthernet2/0/1]q</p></blockquote>
<p>这样就将光口2/0/1改为了hybrid模式，这样就强制该端口的VLAN1也打上tag。就能认边界发过来的带tag的VLAN1的帧了。</p>
]]></content:encoded>
			<wfw:commentRss>http://guanjianfeng.com/archives/782/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>华为Quidway 8508交换机上做策略路由笔记</title>
		<link>http://guanjianfeng.com/archives/740</link>
		<comments>http://guanjianfeng.com/archives/740#comments</comments>
		<pubDate>Wed, 24 Dec 2008 15:40:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器维护]]></category>
		<category><![CDATA[计算机\网络]]></category>
		<category><![CDATA[随写]]></category>
		<category><![CDATA[huawei]]></category>
		<category><![CDATA[s8508]]></category>
		<category><![CDATA[策略路由]]></category>
		<category><![CDATA[网络]]></category>

		<guid isPermaLink="false">http://guanjianfeng.com/?p=740</guid>
		<description><![CDATA[by funpower，2008年12月24日23：38，funpower#gmail.com，转载请注明出处。水平有限，文中难免有错误，望指正。 总体说明，网络中有VLAN用户若干，有三条出口。在核心交换机上设置策略路由，使核心交换机根据预先设置好的ACL流的匹配来决定将数据库丢往三个出口的其中一个。简单配置步骤如下： 一、网络说明 设备管理地址： 核心交换机：型号Quidway S8508，IP 192.168.0.254（vlan1） 楼层交换机：型号Quidway 3600-28TP-SI，IP 192.168.0.20 – 192.168.0.28（vlan1） 内网VLAN及IP地址： 192.168.0.0/24，vlan1，服务器及用户A段IP 192.168.1.0/24，vlan2，用户B段IP 192.168.2.0/24，vlan3，用户C段IP 192.168.3.0/24，vlan4，用户D段IP 10.8.0.0/24，vlan5，用户E段IP 三个出口设备内网IP地址： 外网1出口防火墙内网IP地址：192.168.0.11，所在核心交换机端口：inter gig 3/3/1 外网2出口防火墙内网IP地址：192.168.0.12，所在核心交换机端口：inter gig 3/3/2 外网3出口防火墙内网IP地址：192.168.0.13，所在核心交换机端口：inter gig 3/3/3 分布： 楼宇A：所在核心交换机端口：inter gig 6/1/1，存在vlan：vlan1、vlan3、vlan5 楼宇B：所在核心交换机端口：inter gig 6/1/2，存在vlan：vlan1、vlan4、vlan5 楼宇C：所在核心交换机端口：inter gig 6/1/3，存在vlan：vlan1、vlan2、vlan4、vlan5 楼宇D：所在核心交换机端口：inter gig 6/1/4，存在vlan：vlan1、vlan2、vlan3、vlan5 网络中心服务器群：所在核心交换机端口：inter gig 3/1/1，存在vlan：vlan1 网络拓扑图： 二、实现功能 1、当楼宇A、B、C、D中vlan1、vlan2及vlan3的用户电脑访问网络时从外网1也就是核心交换机的gig 3/3/1端口上出去 2、当这些楼宇中的vlan4的用户电脑访问网络时从外网2出口出去 3、当这些楼宇的vlan5中的用户电脑访问网络时从外网3出口出去 4、所有vlan均能访问vlan1的服务器群网段 三、配置步骤 思路：首先建立一个普通的三层网络，在核心交换机上利用默认路由将楼宇交换机来的数据包全部丢到核心的192.168.0.11上也就是外网1出口上，然后在接楼宇端口上利用核心交换机的traffic-redirect功能通过源地址acl流匹配将vlan4和vlan5的数据包丢到192.168.0.12（外网2）或192.168.0.13（外网3）上。 1、在核心上建立三层网络，并配置好各楼宇交换机，这里略过。然后在核心交换机上添加一条默认路由，这样所有的数据包就都从外网1出口出去： [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #808080;">by funpower，2008年12月24日23：38，funpower#gmail.com，转载请注明出处。水平有限，文中难免有错误，望指正。</span></p>
<p>总体说明，网络中有VLAN用户若干，有三条出口。在核心交换机上设置策略路由，使核心交换机根据预先设置好的ACL流的匹配来决定将数据库丢往三个出口的其中一个。简单配置步骤如下：</p>
<p><strong>一、网络说明</strong></p>
<p><strong>设备管理地址：<br />
</strong>核心交换机：型号Quidway S8508，IP 192.168.0.254（vlan1）<br />
楼层交换机：型号Quidway 3600-28TP-SI，IP 192.168.0.20 – 192.168.0.28（vlan1）</p>
<p><strong>内网VLAN及IP地址：<br />
</strong>192.168.0.0/24，vlan1，服务器及用户A段IP<br />
192.168.1.0/24，vlan2，用户B段IP<br />
192.168.2.0/24，vlan3，用户C段IP<br />
192.168.3.0/24，vlan4，用户D段IP<br />
10.8.0.0/24，vlan5，用户E段IP</p>
<p><strong>三个出口设备内网IP地址：<br />
</strong>外网1出口防火墙内网IP地址：192.168.0.11，所在核心交换机端口：inter gig 3/3/1<br />
外网2出口防火墙内网IP地址：192.168.0.12，所在核心交换机端口：inter gig 3/3/2<br />
外网3出口防火墙内网IP地址：192.168.0.13，所在核心交换机端口：inter gig 3/3/3</p>
<p><strong>分布：</strong><br />
楼宇A：所在核心交换机端口：inter gig 6/1/1，存在vlan：vlan1、vlan3、vlan5<br />
楼宇B：所在核心交换机端口：inter gig 6/1/2，存在vlan：vlan1、vlan4、vlan5<br />
楼宇C：所在核心交换机端口：inter gig 6/1/3，存在vlan：vlan1、vlan2、vlan4、vlan5<br />
楼宇D：所在核心交换机端口：inter gig 6/1/4，存在vlan：vlan1、vlan2、vlan3、vlan5<br />
网络中心服务器群：所在核心交换机端口：inter gig 3/1/1，存在vlan：vlan1</p>
<p><strong>网络拓扑图：</strong></p>
<p><img class="alignnone size-full wp-image-741" title="s8508router" src="http://guanjianfeng.com/wp-content/uploads/2008/12/s8508router.gif" alt="s8508router" width="561" height="537" /><br />
<strong></strong></p>
<p><strong>二、实现功能</strong></p>
<p>1、当楼宇A、B、C、D中vlan1、vlan2及vlan3的用户电脑访问网络时从外网1也就是核心交换机的gig 3/3/1端口上出去<br />
2、当这些楼宇中的vlan4的用户电脑访问网络时从外网2出口出去<br />
3、当这些楼宇的vlan5中的用户电脑访问网络时从外网3出口出去<br />
4、所有vlan均能访问vlan1的服务器群网段</p>
<p><strong>三、配置步骤</strong></p>
<p>思路：首先建立一个普通的三层网络，在核心交换机上利用默认路由将楼宇交换机来的数据包全部丢到核心的192.168.0.11上也就是外网1出口上，然后在接楼宇端口上利用核心交换机的traffic-redirect功能通过源地址acl流匹配将vlan4和vlan5的数据包丢到192.168.0.12（外网2）或192.168.0.13（外网3）上。</p>
<p>1、在核心上建立三层网络，并配置好各楼宇交换机，这里略过。然后在核心交换机上添加一条默认路由，这样所有的数据包就都从外网1出口出去：</p>
<blockquote><p>ip route-static 0.0.0.0 0.0.0.0 192.168.0.11 preference 60</p></blockquote>
<p>2、因为在接楼宇端口上应用traffic-redirect后数据包就直接丢到外网的内网口了，这样vlan4和vlan5访问vlan1的服务器群就有问题了。所以我们先在端口上做acl。</p>
<p>建立acl：</p>
<blockquote><p>[center] acl number 3001<br />
[center acl number 3001] rule 0 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.0.0 0.0.0.255<br />
[center acl number 3001] rule 1 permit ip source 10.0.8.0 0.0.0.255 destination 192.168.0.0 0.0.0.255</p></blockquote>
<p>下发楼宇A端口：</p>
<blockquote><p>[center] inter gig 6/1/1<br />
[center-GigabitEthernet6/1/1] packet-filter inbound ip-group 3001</p></blockquote>
<p>其他楼宇端口下发方法相同，这里略过。另外，对于是vlan1属性的inter gig 3/1/1，因为端口下只有一个vlan，所以就不需要做策略路由。在下发顺序上也是应该也下发acl规则，然后再下发策略路由。这样就可以先匹配内网的访问需求了。</p>
<p>3、在连接楼宇交换机的核心交换机端口上做策略路由</p>
<p>建立vlan4的acl流匹配规则：</p>
<blockquote><p>[center] acl number 3002<br />
[center-acl number 3002] rule 0 permit ip source 192.168.3.0 0.0.0.255</p></blockquote>
<p>建立vlan5的acl流匹配规则：</p>
<blockquote><p>[center] acl number 3003<br />
[center-acl number 3003] rule 0 permit ip source 10.8.0.0 0.0.0.255</p></blockquote>
<p>下发针对vlan4的楼宇A端口的下一跳路由：</p>
<blockquote><p>[center] inter gig 6/1/1<br />
[center-GigabitEthernet6/1/1] traffic-redirect inbound ip-group 3002 next-hop 192.168.0.12</p></blockquote>
<p>下发针对vlan5的楼宇A端口的下一跳路由：</p>
<blockquote><p>[center] inter gig 6/1/1<br />
[center-GigabitEthernet6/1/1] traffic-redirect inbound ip-group 3003 next-hop 192.168.0.13</p></blockquote>
<p>这样配置后，vlan1至vlan3仍然从核心交换机的默认路由192.168.0.11外网1出口出去。如果源地址为192.168.3.0网络地址进入核心交换机的连接楼宇的端口后，针对源地址为192.168.3.0的acl规则3002就被匹配，这样就被路由至192.168.0.12的外网2出口上。同理如果是源地址为10.8.0.0网络的地址流入核心交换机的端口上则根据端口定义好的下一跳路由它将被送往192.168.0.13的外网3网络上。</p>
<p>最后附上核心交换机的完整配置：</p>
<blockquote><p>#<br />
sysname center<br />
#<br />
radius scheme system<br />
server-type huawei<br />
primary authentication 127.0.0.1 1645<br />
primary accounting 127.0.0.1 1646<br />
user-name-format without-domain</p>
<p>domain system<br />
radius-scheme system<br />
access-limit disable<br />
state active<br />
idle-cut disable<br />
self-service-url disable</p>
<p>domain default enable system<br />
#<br />
local-server nas-ip 127.0.0.1 key huawei<br />
#<br />
Xbar load-single<br />
#<br />
temperature-limit 3 10 65<br />
temperature-limit 4 10 50<br />
temperature-limit 5 10 50<br />
temperature-limit 6 10 65<br />
#<br />
dot1x<br />
#<br />
acl number 3001<br />
rule 0 permit ip source 10.10.6.0 0.0.0.255 destination 192.168.0.0 0.0.0.255<br />
rule 0 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.0.0 0.0.0.255<br />
acl number 3002<br />
rule 0 permit ip source 192.168.3.0 0.0.0.255<br />
acl number 3003<br />
rule 0 permit ip source 10.8.0.0 0.0.0.255<br />
#<br />
vlan 1<br />
description bangong_and_server<br />
#<br />
vlan 2<br />
description user_a<br />
#<br />
vlan 3<br />
description user_b<br />
#<br />
vlan 4<br />
description user_c<br />
#<br />
vlan 5<br />
description user_d<br />
#<br />
interface Vlan-interface1<br />
description bangong_and_server<br />
ip address 192.168.0.254 255.255.255.0<br />
#<br />
interface Vlan-interface2<br />
description user_a<br />
ip address 192.168.1.254 255.255.255.0<br />
#<br />
interface Vlan-interface3<br />
description user_b<br />
ip address 192.168.2.254 255.255.255.0<br />
#<br />
interface Vlan-interface4<br />
description user_c<br />
ip address 192.168.3.254 255.255.255.0<br />
#<br />
interface Vlan-interface5<br />
description user_d<br />
ip address 10.8.0.254 255.255.255.0<br />
#<br />
interface Aux4/0/1<br />
#<br />
interface M-Ethernet4/0/0<br />
#<br />
interface GigabitEthernet3/1/1<br />
description to_server-group<br />
#<br />
interface GigabitEthernet3/1/2<br />
#<br />
interface GigabitEthernet3/1/3<br />
#<br />
interface GigabitEthernet3/1/4<br />
#<br />
interface GigabitEthernet3/2/1<br />
#<br />
interface GigabitEthernet3/2/2<br />
#<br />
interface GigabitEthernet3/2/3<br />
#<br />
interface GigabitEthernet3/2/4<br />
#<br />
interface GigabitEthernet3/3/1<br />
description to_waiwang1<br />
#<br />
interface GigabitEthernet3/3/2<br />
description to_waiwang3<br />
#<br />
interface GigabitEthernet3/3/3<br />
description to_waiwang3<br />
#<br />
interface GigabitEthernet3/3/4<br />
#<br />
interface GigabitEthernet6/1/1<br />
port link-type trunk<br />
port trunk permit vlan all<br />
packet-filter inbound ip-group 3001 rule 0 system-index 1<br />
packet-filter inbound ip-group 3001 rule 1 system-index 2<br />
traffic-redirect inbound ip-group 3002 rule 0 system-index 3 next-hop 192.168.0.12<br />
traffic-redirect inbound ip-group 3003 rule 0 system-index 4 next-hop 192.168.0.13<br />
#<br />
interface GigabitEthernet6/1/2<br />
port link-type trunk<br />
port trunk permit vlan all<br />
packet-filter inbound ip-group 3001 rule 0 system-index 5<br />
packet-filter inbound ip-group 3001 rule 1 system-index 6<br />
traffic-redirect inbound ip-group 3002 rule 0 system-index 7 next-hop 192.168.0.12<br />
traffic-redirect inbound ip-group 3003 rule 0 system-index 8 next-hop 192.168.0.13<br />
#<br />
interface GigabitEthernet6/1/3<br />
port link-type trunk<br />
port trunk permit vlan all<br />
packet-filter inbound ip-group 3001 rule 0 system-index 9<br />
packet-filter inbound ip-group 3001 rule 1 system-index 10<br />
traffic-redirect inbound ip-group 3002 rule 0 system-index 11 next-hop 192.168.0.12<br />
traffic-redirect inbound ip-group 3003 rule 0 system-index 12 next-hop 192.168.0.13<br />
#<br />
interface GigabitEthernet6/1/4<br />
port link-type trunk<br />
port trunk permit vlan all<br />
packet-filter inbound ip-group 3001 rule 0 system-index 14<br />
packet-filter inbound ip-group 3001 rule 1 system-index 15<br />
traffic-redirect inbound ip-group 3002 rule 0 system-index 16 next-hop 192.168.0.12<br />
traffic-redirect inbound ip-group 3003 rule 0 system-index 17 next-hop 192.168.0.13<br />
#<br />
interface GigabitEthernet6/2/1<br />
#<br />
interface GigabitEthernet6/2/2<br />
#<br />
interface GigabitEthernet6/2/3<br />
#<br />
interface GigabitEthernet6/2/4<br />
#<br />
interface GigabitEthernet6/3/1<br />
#<br />
interface GigabitEthernet6/3/2<br />
#<br />
interface GigabitEthernet6/3/3<br />
#<br />
interface GigabitEthernet6/3/4<br />
#<br />
interface NULL0<br />
#<br />
ip route-static 0.0.0.0 0.0.0.0 192.168.0.11 preference 60<br />
#<br />
snmp-agent<br />
snmp-agent local-engineid 80507DBD05757576F5DD55A46877<br />
snmp-agent community write jsisaa<br />
snmp-agent sys-info version all<br />
#<br />
user-interface con 0<br />
user-interface aux 0<br />
user-interface vty 0 4<br />
user privilege level 3<br />
set authentication password simple winsaaa<br />
#<br />
return</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://guanjianfeng.com/archives/740/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>锐捷交换机光电复用口将光口改为电口</title>
		<link>http://guanjianfeng.com/archives/671</link>
		<comments>http://guanjianfeng.com/archives/671#comments</comments>
		<pubDate>Thu, 10 Jan 2008 11:39:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器维护]]></category>
		<category><![CDATA[计算机\网络]]></category>
		<category><![CDATA[随写]]></category>
		<category><![CDATA[交换机]]></category>
		<category><![CDATA[网络]]></category>
		<category><![CDATA[配置]]></category>
		<category><![CDATA[锐捷]]></category>

		<guid isPermaLink="false">http://guanjianfeng.com/archives/671</guid>
		<description><![CDATA[锐捷交换机的光电复用口 的转换，前阵子是把光口改成了电口来使用（默认开启的是电口），现在这交换机上有三个口又要改成用当电口来使用，光口改电口是使用med fiber参数来调整，通过med ?参数查看除fiber以外的值，发现只有copper和fiber，很明显电口的值就是copper，如下图： 这样，通过使用med copper参数就可以将光口改为电口了，这里我是修改gig 0/2-4口，步骤如下： shixunlou5750#conf Enter configuration commands, one per line. End with CNTL/Z. shixunlou5750(config)#int range gig 0/2-4 shixunlou5750(config-if-range)#med copper shixunlou5750(config-if-range)#end shixunlou5750#wr Building configuration&#8230; [OK] shixunlou5750#]]></description>
			<content:encoded><![CDATA[<p>锐捷交换机的光电复用口 的转换，前阵子是把光口改成了电口来使用（默认开启的是电口），现在这交换机上有三个口又要改成用当电口来使用，光口改电口是使用med fiber参数来调整，通过med ?参数查看除fiber以外的值，发现只有copper和fiber，很明显电口的值就是copper，如下图：</p>
<p><img src="http://guanjianfeng.com/wp-content/uploads/2008/01/ruijiecopperfiber.gif" alt="ruijiecopperfiber.gif" /></p>
<p>这样，通过使用med copper参数就可以将光口改为电口了，这里我是修改gig 0/2-4口，步骤如下：</p>
<blockquote><p>shixunlou5750#<strong>conf</strong><br />
Enter configuration commands, one per line.  End with CNTL/Z.<br />
shixunlou5750(config)#<strong>int range gig 0/2-4</strong><br />
shixunlou5750(config-if-range)#<strong>med copper</strong><br />
shixunlou5750(config-if-range)#<strong>end</strong><br />
shixunlou5750#<strong>wr</strong></p>
<p>Building configuration&#8230;</p>
<p>[OK]<br />
shixunlou5750#</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://guanjianfeng.com/archives/671/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

