某公司计划使用路由器作为DHCP Server,其网络拓扑结构如图4-1所示。根据业务需求,公司服务器IP地址使用192.168.2.1/24,部门1使用192.168.4.1/24网段,部门2使用192.168.3.1/24网段(其中192.168.3.1~192.168.3.10地址保留不分配),部门1和部门2通过路由器的DHCP服务自动获取IP地址。
【问题1】(10分)
根据网络拓扑和需求说明,完成(或解释)路由器R1的配置:
R1#config t
R1(config)#interface FastEthernet0/1
R1(config-if)#ip address(1)(2)
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#ip dhcp pool vlan 3
R1(dhcp-config)#network 192.168.3.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.3.254 255.255.255.0;(3)
R1(dhcp-config)#dns-server 192.168.2.1;(4)
R1(dhcp-config)#lease 0 8 0;(5)
R1(dhcp-config)#exit
R1(config)#ip dhcp pool vlan 4
R1(dhcp-config)#network(6)(7)
R1(dhcp-config)#default-router 192.168.4.254 255.255.255.0
R1(dhcp-config)#dns-server 192.168.2.1
R1(dhcp-config)#lease 0 8 0
R1(dhcp-config)#exit
R1(config)#ip dhcp excluded-address(8)(9)
R1(config)#ip dhcp excluded-address 192.168.3.254;排除掉不能分配的IP地址
R1(config)#ip dhcp excluded-address 192.168.4.254
R1(config)#(10)192.168.3.0 255.255.255.0 FastEthernet0/1;在以太网接口和VLAN3间建立一条静态路由
………
【问题2】(5分)
根据网络拓扑和需求说明,完成(或解释)交换机S1的部分配置。
S1#config t
S1(config)#interface vlan2
S1(config-if)#ip address 192.168.2.254 255.255.255.0
S1(config-if)#no shutdown
S1(config)#interface vlan3
S1(config-if)#ip address 192.168.3.254 255.255.255.0
S1(config-if)#ip helper-address(11)
S1(config-if)#no shutdown
S1(config)#interface vlan4
……
S1(config)#interface f1/1
S1(config-if)#switchport mode(12)
S1(config-if)#switchport trunk allowed vlan all
S1(config-if)#exit
S1(config)#interface f1/2
S1(config-if)#switchport mode access
S1(config-if)#switchport access(13)
S1(config-if)#exit
S1(config)#interface f1/5
S1(config-if)#switchport mode access
S1(config-if)#switchport access(14)
S1(config-if)#exit
S1(config)#interface f1/9
S1(config-if)#switchport mode access
S1(config-if)#switchport access(15)
S1(config-if)#exit
…….
正确答案及解析
正确答案
解析
【问题1】(10分,每空1分)
(1)192.168.1.1
(2)255.255.255.0
(3)指定地址池vlan 3中网关地址
(4)指定地址池vlan 3中DNS服务器地址
(5)指定地址池vlan 3地址租约时间为8小时
(6)192.168.4.0
(7)255.255.255.0
(8)192.168.3.1
(9)192.168.3.10
(10)ip route
【问题2】(5分,每空1分)
(11)192.168.1.1
(12)trunk
(13)vlan 2
(14)vlan 4
(15)vlan 3
从拓扑分析,很容易让学员想到单臂路由。仔细观察路由器和交换机相连的接口都有配置IP地址,且题干说明R1要作为一台DHCP Server使用,我们基本可以排除此拓扑是一个单臂路由拓扑。DHCP Server除了用Windows/Linux平台搭建,也可以用路由器搭建。使用Cisco ISO路由器,会用到命令“ip dhcp pool pool-name”引导出一个地址池,在地址池可以指定地址范围、网关、DNS服务器、地址租期等网卡参数信息给DHCP Client。
【问题1】
Cisco ISO路由器开启DHCP功能的命令如下:
R1#config t
R1(config)#interface FastEthernet0/1//进入接口模式
R1(config-if)#ip address 192.168.1.1 255.255.255.0//配置接口F0/1的IP地址
R1(config-if)#no shutdown//激活接口
R1(config-if)#exit
R1(config)#ip dhcp pool vlan 3//添加地址池vlan3
R1(dhcp-config)#network 192.168.3.0 255.255.255.0//指定地址池范围
R1(dhcp-config)#default-router 192.168.3.254 255.255.255.0//指定地址池vlan 3中网关地址
R1(dhcp-config)#dns-server 192.168.2.1//指定地址池vlan 3中DNS服务器地址
R1(dhcp-config)#lease 0 8 0//指定地址池vlan 3地址租约时间为8小时(格式:lease days hours minites)
R1(dhcp-config)#exit
R1(config)#ip dhcp pool vlan 4
R1(dhcp-config)#network 192.168.4.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.4.254 255.255.255.0
R1(dhcp-config)#dns-server 192.168.2.1
R1(dhcp-config)#lease 0 8 0
R1(dhcp-config)#exit//地址池vlan4相关命令的解析与vlan3的解析类似,此处不赘述
R1(config)#ip dhcp excluded-address 192.168.3.1 192.168.3.10
R1(config)#ip dhcp excluded-address 192.168.3.254//排除掉不能分配的IP地址
R1(config)#ip dhcp excluded-address 192.168.4.254
R1(config)#ip route 192.168.3.0 255.255.255.0 FastEthernet0/1//在以太网接口和VLAN3间建立一条静态路由
………
【问题2】
R1作为DHCP的角色,为vlan 3和vlan4指定了地址范围,同时也添加了相关的静态路由。作为三层交换机S1除了其保留的vlan1,还需要配置vlan3、vlan4和服务器vlan2。由于部门1(vlan 4)和部门2(vlan 3)内部的终端需要从不同网络(192.168.1.0/24)的DHCP服务器(R1)来获取IP地址租约信息,一旦涉及到不同网络DHCP服务器和客户端作地址分配时,必须要有DHCP中继代理服务器(DHCP-Relay),此角色负责DHCP客户端和服务器之间信息的传递。三层交换机可以承担DHCP中继代理服务器的能力,只需要在对应vlan接口下配置命令“ip helper-address dhcp-server”即可。
S1#config t
S1(config)#interface vlan2//接入vlan2接口
S1(config-if)#ip address 192.168.2.254 255.255.255.0//配置vlan2接口IP地址(此处配置可以得知,192.168.2.0/24隶属于vlan2,以及服务器vlan是vlan2)
S1(config-if)#no shutdown
S1(config)#interface vlan3
S1(config-if)#ip address 192.168.3.254 255.255.255.0
S1(config-if)#ip helper-address 192.168.1.1//指定DHCP服务器IP地址
S1(config-if)#no shutdown
S1(config)#interface vlan4
……
S1(config)#interface f1/1
S1(config-if)#switchport mode trunk//开启端口模式为trunk
S1(config-if)#switchport trunk allowed vlan all//trunk链路允许所有vlan流量通过
S1(config-if)#exit
S1(config)#interface f1/2
S1(config-if)#switchport mode access//指定接口为接入(access)模式
S1(config-if)#switchport access vlan 2//指定接口隶属于vlan2
S1(config-if)#exit
S1(config)#interface f1/5
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 4//指定接口隶属于vlan4
S1(config-if)#exit
S1(config)#interface f1/9
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 3//指定接口隶属于vlan3
S1(config-if)#exit
…….
包含此试题的试卷
你可能感兴趣的试题
Advancements in ( )have contributed to the growth of the automotive industry through the creation and evolution of self-driving vehicles.
-
- A.Artificial Intelligence
- B.Cloud Computing
- C.Internet of Things
- D.Big Data
- 查看答案
In project human resource management , ( )is not a source of power for the project manager.
-
- A.referent power
- B.expert power
- C.reward power
- D.audit power
- 查看答案
At the project establishment stage , the feasibility study mainly includes techinical feasibility analysis , ( ), operation environment feasibility analysis and other aspects of feasibility analysis.
-
- A.detail feasibility analysis
- B.opportunity analysis
- C.economic feasibility analysis
- D.risk analysis
- 查看答案
( )is a grid that shows the project resources assigned to each work package.
-
- A.Stakeholder engagement assessment matrix
- B.Requirements traceability matrix
- C.Probability and impact matrix
- D.Responsibility assignment matrix
- 查看答案
Xinhua News Agency reported in January 2022,Chian will further promote the developmet of a digital economy during the 14th Five-Year Plan eriod(2021-2025). The plan also emphasized industrial ( )transformation.
-
- A.digital
- B.networking
- C.intelligentize
- D.informatization
- 查看答案