Native IOS 65xx系列交换机配置( 五 )


CONFIG_FILE variable does not exist
BOOTLDR variable = bootflash:c6msfc2-boot-mz.121-3a.E4
Configuration register is 0x2
Router#
改变BOOT,、BOOTLDR、CONFIG_FILE 这三个环境变量使用命令:
BOOT #boot system
BOOTLDR #boot bootldr
CONFIG_FILE #boot config
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 [10100auto](速度)
Router(config-if)# duplex [autofullhalf](双工)
或添加注释,如:
Router(config-if)# description Channel-group to "Marketing"QQRead.com 推出数据恢复指南教程 数据恢复指南教程数据恢复故障解析常用数据恢复方案硬盘数据恢复教程数据保护方法数据恢复软件专业数据恢复服务指南
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 {ethernetfastethernetgigabitethernet} 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