交换机虚拟网(Virtual LANs)的设置:
Catalyst 5000上实现VLAN划分及外部VLAN路由设置
分配VTP域(a VTP Domain)
将Cat5000加入域
指定中继端口
(a Trunk)
Dynamic ISL
分配VLAN到端口
设置VLAN 20
配置Router
注:存在三个VLAN,在VLAN之间通过Router做路由.
-----------------------------------------------------------------
分配VTP域
什么是VTP?
VTP是VLAN Trunk Protocol的简写,它提供每个设备 (router 或 LAN-switch)在中继端口(trunk ports)发送广播. 这些广播被发送到一个组播地址,并被所有相邻设备接收. 这些广播列出了发送设备的管理域,它的配置修订号,已知的VLAN, 及已知VLAN的确定参数.通过听这些广播,在相同管理域的所有设备都可以学习到在发送设备上配置的新的VLAN.使用这种方法,新的 VLAN只需要在管理域内的一台设备上建立和配置.信息会自动被相同管理域内的其它设备学到.
分配VTP域
首先分配VTP域名(a VTP domain name),在相同管理域内的交换机可以通过VTP协议互相学习VTP信息.
Cat5001> (enable) sho vtp domain
Domain Name Domain Index VTP Version Local Mode
-------------------------------- ------------ ----------- -----------
1 1 server
Advt Interval Vlan-count Max-vlan-storage Config Revision SNMP Traps
------------- ---------- ---------------- --------------- -----------
300 5 256 0 disabled
Last Updater
---------------
0.0.0.0
Cat5001> (enable)
Cat5001> (enable) set vtp domain cisco
VTP domain cisco modified
Cat5001> (enable) sho vtp domain
Domain Name Domain Index VTP Version Local Mode
-------------------------------- ------------ ----------- -----------
cisco 1 1 server
Advt Interval Vlan-count Max-vlan-storage Config Revision SNMP Traps
------------- ---------- ---------------- --------------- -----------
300 5 256 0 disabled
Last Updater
---------------
0.0.0.0
Cat5001> (enable)
--------------------------------------------------------------------------------
将Catalyst 5002加入域
需要将Catalyst 5002加入名为cisco的VTP管理域, 并设为VTP client,它将接收来自VTP server 的VTP配置及更新.
注意:Catalyst 5000系列交换机默认为VTP server.
cat5002> (enable)
cat5002> set vtp domain cisco mode client
指定中继端口(Trunk ports)
VLAN Trunk协议(VTP)只在中继口(ISL , LANE 和802.10)上传输,应在二个Catalyst5000
交换机间定义哪个口作为中继端口(Trunk port).
Inter-Switch Link (ISL) 中继用于Fast Ethernet和Gigabit Ethernet端口
IEEE 802.10中继用于FDDI/CDDI端口
LAN Emulation (LANE) 中继用于ATM 端口
Cat5001> (enable) set trunk 1/1 on
Port 1/1 mode set to on.
Cat5001> (enable)
Wed Jun 19 1996, 15:00:02 Port 1/1 has become trunk.
--------------------------------------------------------------------------------
Dynamic ISL
有了DISL(Dynamic ISL), 你不需要修改远端的Catalyst 5000;以下信息将显示在远端的Catalyst 5000.
Wed Jun 19 1996, 15:51:59 Port 1/2 has become trunk.
Cat5001> (enable) sho trunk
Port Mode Status
------- --------- ------------
1/1 on trunking
1/2 auto not-trunking
2/1-2 off not-trunking
5/1 auto not-trunking
5/2 auto not-trunking
5/3 auto not-trunking
5/4 auto not-trunking
5/5 auto not-trunking
5/6 auto not-trunking
5/7 auto not-trunking
5/8 auto not-trunking
5/9 auto not-trunking
5/10 auto not-trunking
5/11 auto not-trunking
5/12 auto not-trunking
Port Vlans allowed
------- ---------------------------------------------------------------------
1/1 1-1000
1/2 1-1000
2/1-2 1-1000
5/1 1-1000
5/2 1-1000
5/3 1-1000
5/4 1-1000
5/5 1-1000
5/6 1-1000
5/7 1-1000
5/8 1-1000
5/9 1-1000
5/10 1-1000
5/11 1-1000
5/12 1-1000
Port Vlans active
------- ---------------------------------------------------------------------
1/1 1
1/2 1
2/1-2 1
5/1 1
5/2 1
5/3 1
5/4 1
5/5 1
5/6 1
5/7 1
5/8 1
5/9 1
5/10 1
5/11 1
5/12 1
注意: DISL在Cisco IOS软件中不支持.
--------------------------------------------------------------------------------
分配VLAN到端口
Cat5001> (enable) set vlan 2 3/2-20
VLAN 2 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
2 1/1
3/2-20
Cat5001> (enable) set vlan 20 5/1-6
VLAN 20 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
20 1/1
5/1-6
Configure additional information for VLAN 20.
On the other Catalyst 5000 :
Cat5002> (enable) set vlan 2 4/1-2,5/6-12
VLAN 2 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
2 1/2
4/1-3,4/5-23
5/6-12
Configure additional information for VLAN 20.
Cat5002> (enable) set vlan 20 5/1-5
VLAN 20 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
20 1/2
5/1-5
Configure VLAN 20 on a VTP server.
--------------------------------------------------------------------------------
显示端口配置
Cat5001> (enable) show port
Port Name Status Vlan Level Duplex Speed Type
---- -------------------- ---------- ---------- ------ ------ ----- -----------
1/1 connected 1 normal half 100 100BaseTX
1/2 connected trunk normal half 100 100BaseTX
2/1 connecting 1 normal half 100 FDDI
2/2 connected 1 normal half 100 FDDI
4/1 inactive 2 normal half 10 10BaseT
4/2 inactive 2 normal half 10 10BaseT
4/3 inactive 2 normal half 10 10BaseT
4/4 notconnect 1 normal half 10 10BaseT
4/5 inactive 2 normal half 10 10BaseT
4/6
此时, VLAN 2 和VLAN 20 还未激活.所以在VLAN 2和VLAN 20的端口是inactive状态.
--------------------------------------------------------------------------------
设置VLAN 20
如果在网络里有VTP server和VTP clent,请在VTP server上设置VLAN 20
Cat5001> (enable) set vlan 20
VLAN 20 modified
这将激活在所有管理域cisco内的VLAN 20
Cat5001> (enable) sho vlan 20
VLAN Name Status Mod/Ports
---- -------------------------------- --------- ----------------------------
20 VLAN0020 active 1/1
5/1-6
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- ------ ------
20 enet 100020 1500 - - - - 0 0
--------------------------------------------------------------------------------
配置Router
conf t
interface FastEthernet0/0.1 <-- you need to create a sub-interface by vlan.
encapsulation isl 20 <-- 20 is the vlan number.
ip address 1.1.1.1 255.255.255.0
interface FastEthernet0/0.2
encapsulation isl 2
ip address 2.2.2.1 255.255.255.0
interface FastEthernet0/0.3
encapsulation isl 1
ip address 172.16.80.1 255.255.255.0
Router eigrp 666
network 1.0.0.0
network 2.0.0.0
network 172.16.80.0
end
writ mem
|
|||
| · OSPF路由协议专栏 · 思科路由器产品 · 华为路由器产品 · 路由器模拟器 · AIX操作系统管理应用(.. · 思科路由器配置 · 路由器组网解决方案 · 路由器密码恢复 |
· 无线路由器故障处理 · 路由故障处理手册 · 路由器访问控制列表(AC.. · 路由器的安全配置与安.. · 无线路由器配置 · 路由器技巧 · 华为路由器配置 · 路由器配置基础 |
||
|
|||
| · Java基础教程 · VPN技术 · SQL Server 2005全解 · ARP攻击防范与解决方案 · SOA 面向服务架构 · SQL Server 2005全解 · Java编程开发手册 · 三层交换技术专题 |
· SQL Server入门到精通 · Windows Server 2003企.. · Windows远程桌面应用 · C#技术开发指南 · VPN技术 · Solaris 10 配置管理 · C#技术开发指南 · Windows操作系统安装 |
||
|
|||
| · VPN技术 · ARP攻击防范与解决方案 · SQL Server 2005全解 · Java基础教程 · SQL Server入门到精通 · SQL Server 2005全解 · SOA 面向服务架构 · Java编程开发手册 |
· C#技术开发指南 · 三层交换技术专题 · C#技术开发指南 · Windows远程桌面应用 · Windows Server 2003企.. · 邮件服务器专题 · wimax技术与趋势 · Windows操作系统安装 |
||
| ·DB2 Viper快速入门 ·DB2 9数据库的镜像分割与.. |
·将XML应用程序从DB2 8.x.. ·DB2 9中的pureXML:如何.. |
| ·服务器中的“傻瓜机”在.. ·盖茨也喜欢登录Youtube看.. |
· · |
| · 职场冲浪(之八):让感.. ·职场冲浪(之七):潜心.. |
·人生如鞋 ·职场冲浪(之六):从离梦最.. |
| ·将职业教育职业化 - 各IT.. ·思科交换机上实现MAC地址.. |
·关于51CTO合作出书中的职.. ·OSPF动态路由协议入门简介 |
| · NGN:下一代网络 · 网络访问中断大排查 · FTTx光纤接入 |
· 平凡黑客讲述精彩人生(.. · 平凡黑客讲述精彩人生(.. · 平凡黑客讲述精彩人生(.. |
| · C++是垃圾语言?! · 2007年IT界七大抄袭事件 · Java实用开发全集 |
· 解析Ajax开发框架 走进A.. · 基于Google Maps与Ajax.. · 基于Google Maps与Ajax.. |
| · Ubuntu 中文开源频道 · Solaris基础知识入门 · 微软正式发布英文版Wind.. |
· 服务器基础知识入门 · Rambus第二?看全缓冲内.. · 服务器节能对比测试:AM.. |
| · 甲骨文Oracle 11g正式发.. · Oracle数据库开发之PL/S.. · Oracle数据库开发基础教.. |
· 存储2006,一个并购的大.. · IDC宣布浪潮蝉联存储市.. · 双机热备技术 |