1. 两台多层交换机的配置如下,解析配置文件中部分语句的意义。
***Switch1的交换引擎的配置***
Switch1>(enable
)set vtp mode server ______
Switch1>(eRable) set vtp domain Core Net //设置VTP域名
Switch1> (enable) set vlan 10 name CaiWuBu //创建VLAN 10
Switch1> (enable) set vlan 20 name XingZheng //创建VLAN 20
Switch1> (enable)
set trunk 1/1 on dot1q 1-1005 ______
Switch1> (enable
) set spantree root 1-40 dia 4 ______
Switch1> (enable)
set spantree portfast 1/1-2 enable ______
Switch1> (enable)
set spantree uplinkfast enable ______
……(略)
***Switch1的路由引擎的配置***
Switch1 (config) # enable secret test //设定登录口令
Switch1 (config) # line vty 0 4 //进入VTY模式
Switch1 (config-line) # login
Switch1 (config-line) # password test //设用户级口令
……(略)
Switch1 (config-if) # interface vlan 10 //进入虚接DVLAN 10
Switch1 (config-if) # ip address 192.168.180.60 255.255.255.192
//设定IP地址
Switch1 (config+if) # no shutdown //开启端口
Switch1 (config-if) #
standby 10 ip 192.168.180.62 ______
Switch1 (config-if) #
standby 10 priority 110 ______
Switch1 (config-if) #
standby 10 preempt ______
Switch1 (config-if) # interfacevlan 20 //进入虚接DVLAN 20
Switch1 (config-if) # ip address 192.168.180.124 255.255.255.192
//设定IP地址
Switch1 (config-if) # no shutdown //开启端口
Switch1 (config-if) # standby 20 ip 192.168.180.126
Switch1 (config-if) # standby 20 priority 110
Switch1 (config-if) # standby 20 preempt
……(略)
***Switch2的交换引擎的配置***
Switch2> (enable) set vtp mode server
Switch2> (enable) set vtp domain Core_Net //设置VTP域名
Switch2> (enable) set vlan 10 name CaiWuBu //创建VLAN 10
Switch2> (enable) set vlan 20 name XingZheng //创建VLAN 20
Switch2> (enable) set trunk 1/1 on dot1q 1-1005
Switch2> (enable) set spantree secondary root 1-40 dia 4
……(略)
***Switch2的路由引擎的配置***
Switch2 (config) # enable secret test //设定登录口令
……(略)
Switch2 (config-if) # interface vlan 10 //进入虚接DVLAN 10
Switch2 (config-if) # ip address 192.168.180.61 255.255.255.192
//设定IP地址
Switch2 (config-if) # no shutdown //开启端口
Switch2 (config-if) # standby 10 ip 192.168.180.62
Switch2 (config-if) # standby 10 priority 100
Switch2 (config-if) # standby 10 preempt
Switch2 (config-if) # interface vlan 20 //进入虚接DVLAN 20
Switch2 (config-if) # ip address 192.168.180.125 255.255.255.192
Switch2 (config-if) # no shutdown
Switch2 (config-if) # standby 20 ip 192.168.180.126
Switch2 (config-if) # standby 20 priority 100
Switch2 (config-if) # standby 20 preempt
……(略)
设置VTP模式为服务器模式
设置端口1/1为干道(trunk),封装协议采用dot1q(802.1q),并允许VAN1~VLAN1005数据通过
将此交换机设为spantree的根
设spantree端口快速启用
设spantree端口快速切换
建HSRP组并设虚IP地址
设HSRP的优先级
设HSRP的切换许可,也叫备份占先权
[解析] Cisco交换机有两种操作系统,一种是基于Cisco IOS,如Catalyst 1900、2900XL、3500XL,系列交换机,另一类是基于CatOS,如Catalyst 2926、5000系列、6000系列。本题的交换机就是基于CatOS的交换机,所有配置只有一个模式,都是通过set命令来完成。