阅读以下说明,回答问题。 [说明]某公司租用了一段C类地址203.1 2.11.0/24~203.12.14.0/24,如图2-12所示。其网间地址是172.11.5.14/24。要求网内所有PC都能上网。
问答题
接入层交换机Switchl的端口24为trunk口,其余各口属于Vlan11,请解释下列命令并完成交换机的配置。 Switchl#config terminal Switchl(config)#interface f0/24 (进入端口24配置模式) Switchl(config-if){}switchport mode trunk (1) Switchl(config-if)#switchport trunk encapsulation dotlq (2) Switchl(config-if)#switchport trunk allowed all(允许所有VLAN从该端N交换数据) Switchl(config-if)#exit Switchl(config)#exit Switchl#vlan database Switchl(vlan)#vlan11 name lab0l (3) Switchl(vlan)#exit Switchl#config terminal Switchl(config)#interface f0/9 (进入f0/9的配置模式) Switchl(config-if)# (4) (设置端口为援入链路模式) Switchl(config-if)# (5) (把f0/9分配给Vlan11) Switchl(config-if)#exit Switchl(config)#exit
【正确答案】正确答案:(1)设置端口为中继(或Trunk)模式 (2)设置Trunk采用802,1q格式(或dotlq) (3)创建Vlan11,并命名为lab01 (4)switchport mode acce,ss (5)switchport access Vlan11
【答案解析】
问答题
以下两个配置中错误的是(6) ,原因是(7) 。 A.Switch0(config)#interface gigabitEthernet 0/3 Switch0(config-if)#switchport mode trunk Switch0(config-if)# switchport trunk encapsulation dotlq Switch0(config)#exit Switch0#vlan databaSe Switch0(vlan)#vlan2100 name lab02 B.Switch0(config)#irterface gigabitEthernet 0/3 Switch0(config-if)#switchport mode trunk Switch0(config-if)# switchport trunk encapsulation ISL Switch0(config)#exit Switch0#vlan database Switch0(vlan)#vlan2100 name lab02
【正确答案】正确答案:(6)B (7)Trunk采用ISL格式时,VLAN ID最大为1023
【答案解析】
问答题
Switchl的f0/24口接在SwitchO的f0/2口上,请根据图2-12完成或解释以下SwitchO的配置命令。 Switch0(config){}interface (8) (进入虚拟接口) Switch0(config-if)#iP address 203.12.12.1 255.255.255.0 (加IP地址) Switch0(config-if)#no shutdown (9) Switch0(config-if)#standby 1 ip 203.12.12.253 (建HSRP组并设虚IP地址) Switch0(config-if)#standby 1 priority 110 (10) Switch0(config-if)#standby 1 preempt (11)
【正确答案】正确答案:(8)Vlan11 (9)开启端口 (10)设优先级 (11)设切换许可
【答案解析】