某公司有1个总部和2个分部,各个部门都有自己的局域网。该公司申请了4个C类IP地址块202.112.10.0/24~202.114.13.0/24。公司各部门通过帧中继网络进行互联,网络拓扑结构如图3所示。
Switch0、Switch1、Switch2和Switch3均为二层交换机。总部拥有的IP地址块为202.114.12.0/24。Switch0的端口e0/24与路由器R2的端口e0/0相连,请根据图3补充[46]~[50]空白处的配置命令或参数,完成路由器R0、R2及Switch0的配置。
R0(config) # interface S0/0 (进入串口配置模式)
R0(config-if) # ip address 202.114.13.1 (46) (设置Ip地址和掩码)
R0(config) # encapsulation (47) (设置串口工作模式)
R2(config) # interface fastethernet 0/0.1
R2(config-subif) # encapsulation dotlq (48)
R2(config-subif) # ip address 202.114.12.1 255.255.255.192
R2(config-subif) # no shutdown
R2(config-subif) # exit
R2(config) # interface fastethernet 0/0.2
R2(config-subif) # encapsulation dotlq 200
R2(config-subif) # ip address 202.114.12.65 255.255.255.192
R2(config-subif) # no shutdown
R2(config-subif) # exit
R2(config) # interface fastethernet 0/0.3
R2(config-subif) # encapsulation dotlq 300
R2(config-subif) # ip address 202.114.12.129 255.255.255.192
R2(config-subif) # no shutdown
R2(config-subif) # exit
R2(config) # interface fastether 0/0
R2(config-if) # no shutdown
Switch0(config) # interface f0/24
Switch0(config-subif) # switchport mode (49)
Switch0(config-subif) # switchport trunk encapsulation (50)
Switch0(config-subif) # switchport trunk allowed all
Switch0(config-subif) # exit
50()
参考答案:dotlq
解析:
配置路由器端口IP地址的命令格式为“ip address<IP地址><子网掩码>”。该题路由器R0的s0/0端口的IP地址为202.114.13.1/24,可知该IP地址对应的子网掩码前24位为1,则子网掩码为255.255.255.0。因此空[6]填“255.255.255.0”。
题目中讲到公司各部门通过帧中继网络进行互联,可知串口s0/0工作在帧中继模式下,则封装帧中继协议的命令为“encapsulation flame-relay”。因此空[7]填“frame-relay”。
配置子端口必须使用dotlq进行封装,dotlq是一种标准的封装模式,命令为“encapsulation dotlq<2-4094>”,在子接口上封装802.1Q tag值。因此空[8]填“100”。
交换机Switch0的端口e0/24工作在帧中继模式下,空[9]处为配置Trunk模式,命令为“switchport mode trunk”;而端口封装的协议为IEEE 802.1Q,空[10]处对应于封装IEEE 802.1Q的命令,为“switchpog trunk encapsulationdotlq”。