免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1026 | 回复: 0
打印 上一主题 下一主题

65xx系列交换机配置(Native IOS)(3) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-04 20:11 |只看该作者 |倒序浏览

4. 端口设置  
4.1. 端口基本设置   
Cisco 65xx系列交换机的端口缺省都是路由模式,一般都会配置为交换端口使用,进入端口配置模式:  
对于单一端口,在配置模式下输入:interface Ethernet,Fast Ethernet,Gigabit
Ethernet x/y, x为槽位号,y为端口号。  
对于一组端口,可以使用以下的命令进入,例如:  
Router(config)# interface range fastethernet 5/1 - 5     或:  
Router(config-if)# interface range gigabitethernet 2/1 - 2, gigabitethernet
3/1 - 2  
进行端口配置模式后,可以shutdown,或no shutdown端口,并可以对端口进行配置,快速以太端口有全双工、半双工和自动协商模式,如果知道对端连接的设备是采用何种方式,最好采用手工设置方式固定端口的模式和速率。缺省是自动协商模式。  
快速以太端口的速率可以设置为100M,也可以设置为10M和自动协商。缺省是自动协商方式。如:
Router(config-if)#speed [10 | 100 | auto](速度)  
Router(config-if)# duplex [auto | full | half](双工)  
或添加注释,如:  
Router(config-if)# description Channel-group to "Marketing"  
4.2. 配置二层交换接口  (以fastethernet为例,gigabitethernet一样)
Router(config)# interface fastethernet x/y   
Router(config-if)# shutdown   
Router(config-if)# switchport  ;6500上缺省端口为路由端口,需要写switchport
将端口设置为交换端口  
Router(config-if)# switchport mode access   
Router(config-if)# switchport access vlan x   
Router(config-if)# no shutdown   
Router(config-if)# end  
清除二层接口配置  (以fastethernet为例,gigabitethernet一样)
Router(config)# interface fastethernet x/y   
Router(config-if)# no switchport   
Router(config-if)# end
注:使用default interface {ethernet | fastethernet | gigabitethernet}
slot/port,使端口回到原来的缺省配置。  
4.3. 配置三层路由端口  
6500的端口缺省就是具有三层交换的端口,用来跟其他设备的连接,当将一个端口配
置成三层端口之后,就可以在此端口上分配IP地址了。  
Router(config)# interface fastethernet x/y  
Router(config)# ip add x.x.x.x x.x.x.x  
Router(config)# no shutdown  
4.4. 配置端口Trunk   
将一个二层端口配置为Trunk模式:
Router(config)# interface fastethernet x/y (以fastethernet为例,
gigabitethernet一样)  
Router(config-if)# shutdown   
Router(config-if)# switchport   
Router(config-if)# switchport trunk encapsulation dot1q   
Router(config-if)# switchport mode trunk  
Router(config-if)# no shutdown   
Router(config-if)# end   
Router# exit  
4.5. Ethernaet Channel
Router(config)# interface range gigabitethernet1/1 - 2  
Router(config-if)#no ip address   
Router(config-if)#switchport  
Router(config-if)#switchport trunk encapsulation dot1q   
Router(config-if)#switchport mode trunk  
Router(config-if)#switchport trunk native vlan 1   
Router(config-if)#channel-group 1 mode on
产生配置结果如下:  
interface Port-channel1 ;自动产生,并且一定要如下所示,否则可能会有问题。
switchport  
switchport trunk encapsulation dot1q  
switchport mode trunk  
!  
interface GigabitEthernet1/1   
no ip address   
switchport   
switchport trunk encapsulation dot1q   
switchport trunk native vlan 1   
channel-group 1 mode on   
!   
interface GigabitEthernet1/2   
no ip address   
switchport   
switchport trunk encapsulation dot1q   
switchport trunk native vlan 1   
channel-group 1 mode on
如果有问题,使用命令#no int port-channel 1  ,#int g2/1 -2  ,#no switchport  
4.6. 查看端口配置
Router# show running-config interface fastethernet 5/8  
Router# show interfaces fastethernet 5/8 switchport  
Router# show running-config interface port-channel 1  
Router# show spanning-tree interface fastethernet 4/4  


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/70632/showart_726226.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP