45IT.COM- 电脑学习从此开始!
DIY硬件教程攒机经验装机配置
设计Photoshop网页设计特效
系统注册表DOS系统命令其它
存储主板显卡外设键鼠内存
维修显卡CPU内存打印机
WinXPVistaWin7unix/linux
CPU光驱电源/散热显示器其它
修技主板硬盘键鼠显示器光驱
办公ExcelWordPowerPointWPS
编程数据库CSS脚本PHP
网络局域网QQ服务器
软件网络系统图像安全
页面导航: 首页 > 电脑学院 > 局域网技术 >

cisco交换机配置vlan的资料(2)

电脑软硬件应用网 45IT.COM 时间:2011-09-23 09:53 作者:佚名

  (6)配置一组端口

  4006# configure terminal

  4006(config)# interface range fastethernet2/1 – 5

  4006(config-if-range)# no shutdown

  // 注意:端口号之间需要加入空格,如:interface range fastethernet 2/1 – 5 是有效的,而interface range fastethernet 2/1-5 是无效的.

  以下的例子显示使用逗号来配置不同类型端口的组:

  4006# configure terminal

  4006(config)# interface range fastethernet2/1 – 3, gigabitethernet3/1 - 2

  4006(config-if-range)# no shutdown

  (7)其它常用命令

  duplex {auto   full   half} // 设置全双工或半双工.

  speed {10   100   1000   auto   nonegotiate} 设置端口速率 // 注:1000 只工作在千兆口. GBIC模块只工作在1000 Mbps下. nonegotiate 只能在这些GBIC上用 1000BASE-SX, -LX, and -ZX GBIC.

  copy running-config startup-config // 保存设置

  (8)配置EtherChannel

  以太通道捆绑几个以太端口为一个独立的逻辑链路。如4006交换机,你可以捆绑在4006任何模块上最多8个兼容的具有相同速率的端口。每个以太通道具有一个port-channel端口号。要捆绑一个以太通道时,会产生一个逻辑port-channel端口,逻辑端口下的配置可影响与之捆绑的物理端口,但物理端口下的配置不能影响逻辑端口的配置。

  1) 三层以太通道(逻辑port-channe)的配置

  Switch# configure terminal

  Switch(config)# interface port-channel 1 // 创建一个逻辑端口

  Switch(config-if)# ip address 172.32.52.10 255.255.255.0

  Switch(config-if)# end

  2) 三层物理端口配置

  Switch# configure terminal

  Switch(config)# interface range fastethernet 5/4 – 5 (注意: 空格是必需的)

  Switch(config-if)# no switchport // 改变该端口为三层接口

  Switch(config-if)# no ip address // 确认接口没有配置IP地址

  Switch(config-if)# channel-group 1 mode desirable

  Switch(config-if)# end

  附: Switch(config-if)# channel-group port_channel_number mode {auto   desirable   on} // 将该物理端口加入一个以太通道中,并确定PagP模式。

  3) 二层以太通道配置

  Switch# configure terminal

  Switch(config)# interface range fastethernet 5/6 - 7 (注意: 空格是必需的)

  Switch(config-if-range)# channel-group 2 mode desirable

  Switch(config-if-range)# end

  Switch# show running-config interface port-channel 2

  Building configuration...

  Current configuration:

  !

  interface Port-channel2

  switchport access vlan 10

  switchport mode access

  end

  Switch#

  * 如何作端口聚合

  如果要配置二台6509之间的Trunk联接,首先将二6509用千兆光纤相联好,然后分别配置二相联端口的trunk,可以是只用一双光纤,或用二对光纤做port channel,配置如下:

  一双光纤相联时,分别在二台65上进行以下的配置:

  interface GigabitEthernet1/1

  no ip address

  switchport

  switchport trunk encapsulation dot1q

  switchport trunk native vlan 1

  二对光纤相联时,必须要做port channel,分别在二台65上进行以下的配置:

  interface port-channe1

  no ip address

  switchport

  switchport trunk encapsulation dot1q

  switchport trunk native vlan 1

  !

  interface GigabitEthernet1/1

  no ip address

  duplex full

  speed 1000

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk native vlan 1

  channel-group 1 mode on

  !

  interface GigabitEthernet1/2

  no ip address

  duplex full

  speed 1000

  switchport mode trunk

  switchport trunk encapsulation dot1q

  switchport trunk native vlan 1

  channel-group 1 mode on

  * VTP裁剪

  (1)在基于IOS的交换机上配置VTP 模式:

  switch# vlan database

  switch(vlan)# vtp domain domain-name

  switch(vlan)# vtp {sever cilent transparent}

  switch(vlan)# vtp password password

  在基于CLI的交换机上配置VTP 模式:

  switch(enable) set vtp [domain domain-name] [mode{ sever cilent transparent }][password password]

  (2)在基于IOS的交换机上配置VTP版本:

  switch# vlan database

  switch(vlan)# vtp v2-mode

  在基于CLI的交换机上配置VTP版本:

  switch(enable) set vtp v2 enable

  (3)在基于IOS的交换机上启动VTP剪裁:

  switch# vlan database

  switch(vlan)# vtp pruning

  在基于CLI 的交换机上启动VTP剪裁:

  switch(enable) set vtp pruning enable

顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
无法在这个位置找到: baidushare.htm
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
验证码:点击我更换图片
推荐知识