路由器配置——DHCP+DHCP中继服务配置
一、实验目的:掌握DHCP服务基本配置及DHCP中继服务配置,实现全网互通
二、拓扑图:

三、具体步骤配置:
(1)R1路由器配置:
Router>enable --进入特权模式
Router#configure terminal --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1 --修改路由器名为R1
R1(config)#interface f0/0 --进入端口
R1(config-if)#ip address 192.168.11.1 255.255.255.0 --为端口配置ip地址
R1(config-if)#no shutdown --激活端口
R1(config-if)#interface s0/0/0 --进入端口
R1(config-if)#ip address 192.168.12.1 255.255.255.0 --为端口配置ip地址
R1(config-if)#clock rate 64000 --设置时钟同步速率
R1(config-if)#no shutdown --激活端口
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R1(config-if)#exit --返回上一级
R1(config)#service dhcp --开启dhcp服务
R1(config)#ip dhcp pool 1 --定义地址池
R1(dhcp-config)#network 192.168.11.0 255.255.255.0 --DHCP服务器要分配的网络和掩码
R1(dhcp-config)#default-router 192.168.11.1 --默认网关,这个地址要和相应网络所连接的路由器的以太口地址相同
R1(dhcp-config)#exit --返回上一级
R1(config)#ip dhcp pool 2 --定义地址池
R1(dhcp-config)#network 192.168.22.0 255.255.255.0 --DHCP服务器要分配的网络和掩码
R1(dhcp-config)#default-router 192.168.22.1 --默认网关
R1(dhcp-config)#exit --返回上一级
R1(config)#ip dhcp pool 3 --定义地址池
R1(dhcp-config)#network 192.168.33.0 255.255.255.0 --DHCP服务器要分配的网络和掩码
R1(dhcp-config)#default-router 192.168.33.1 --默认网关
R1(dhcp-config)#exit --返回上一级
R1(config)#ip dhcp excluded-address 192.168.11.1 --排除的地址段
R1(config)#ip dhcp excluded-address 192.168.22.1 --排除的地址段
R1(config)#ip dhcp excluded-address 192.168.33.1 --排除的地址段
R1(config)#route rip --开启rip协议
R1(config-router)#version 2 --版本2
R1(config-router)#no auto-summary --关闭路由自动汇总
R1(config-router)#network 192.168.12.0 --添加直连网段到rip
R1(config-router)#network 192.168.11.0
R1(config-router)#network 192.168.22.0
R1(config-router)#network 192.168.33.0
R1(config-router)#end --返回特权模式
R1#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
%SYS-5-CONFIG_I: Configured from console by console
R1#
R1#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
(2)R2路由器配置:
Router>enable --进入特权模式
Router#configure terminal --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2 --修改路由器名为R2
R2(config)#interface f0/0 --进入端口
R2(config-if)#ip address 192.168.22.1 255.255.255.0 --为端口配置ip地址
R2(config-if)#ip helper-address 192.168.12.1 --配置帮助地址
R2(config-if)#no shutdown --激活端口
R2(config-if)#interface s0/0/0 --进入端口
R2(config-if)#ip address 192.168.12.2 255.255.255.0 --为端口配置ip地址
R2(config-if)#no shutdown --激活端口
R2(config-if)#interface s0/0/1 --进入端口
R2(config-if)#ip address 192.168.24.2 255.255.255.0 --为端口配置ip地址
R2(config-if)#clock rate 64000 --设置时钟同步速率
R2(config-if)#no shutdown --激活端口
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R2(config-if)#exit --返回上一级
R2(config)#route rip --开启rip协议
R2(config-router)#version 2 --版本2
R2(config-router)#no auto-summary --关闭路由自动汇总
R2(config-router)#network 192.168.12.0 --添加直连网段到rip
R2(config-router)#network 192.168.24.0
R2(config-router)#network 192.168.22.0
R2(config-router)#network
% Incomplete command.
R2(config-router)#end --返回特权模式
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up
(3)R3路由器配置:
Router>enable --进入特权模式
Router#configure terminal --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3 --修改路由器名为R3
R3(config)#interface f0/0 --进入端口
R3(config-if)#ip address 192.168.33.1 255.255.255.0 --为端口配置ip地址
R3(config-if)#ip helper-address 192.168.12.1 --配置帮助地址
R3(config-if)#no shutdown --激活端口
R3(config-if)#interface S0/0/0 --进入端口
R3(config-if)#ip address 192.168.24.1 255.255.255.0 --为端口配置ip地址
R3(config-if)#no shutdown --激活端口
R3(config-if)#exit --返回上一级
R3(config)#route rip --开启rip协议
R3(config-router)#version 2 --版本2
R3(config-router)#no auto-summary --关闭自动路由汇总
R3(config-router)#network 192.168.24.0 --添加直连网段到rip
R3(config-router)#network 192.168.33.0
R3(config-router)#network 192.168.12.0
R3(config-router)#end
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
R3#
%SYS-5-CONFIG_I: Configured from console by console
R3#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
四、验证测试:
1、打开各台虚拟机的DHCP功能查看是否接收到DHCP服务所分配的地址:
(1)PC1

(2)PC2

(3)PC3

分配地址成功
2、测试各台主机之间是否互通
(1)PC1与PC2

(2)PC2与PC3

(3)PC3与PC1

结果:全网互通成功
路由器配置——DHCP+DHCP中继服务配置的更多相关文章
- CentOS6 配置阿里云 NTP 服务
本文以Centos 6.5为例介绍如何修改Linux实例时区,以及开启和配置Linux NTP服务,保证实例本地时间精确同步. 前提条件 NTP服务的通信端口为UDP 123,设置NTP服务之前请确保 ...
- Cisco基础(一):Vlan的划分、配置trunk中继链路、以太通道配置、DHCP服务配置
一.Vlan的划分 目标: VLAN(虚拟局域网)是对连接到的第二层交换机端口的网络用户的逻辑分段,不受网络用户的物理位置限制而根据用户需求进行网络分段.一个VLAN可以在 一个交换机或者跨交换机实现 ...
- (四)跟我一起玩Linux网络服务:DHCP服务配置之中继代理
继第三部分的DHCP服务器的设置成功,我们来做一个中继代理服务器的配置吧. 我们的虚拟机结构如图: 具体参考: (一)跟我一起玩Linux网络服务:DNS服务——BIND(/etc/named.con ...
- Kali Linux常用服务配置教程DHCP服务原理
Kali Linux常用服务配置教程DHCP服务原理 动态主机配置协议(Dynamic Host Configuration Protocol,简称DHCP)是一个局域网的网络协议,基于UDP协议工作 ...
- DHCP服务配置
DHCP(Dynamic Host Configuration Protocol)动态主机配置协议 -->是由Internet工作任务小组设计开发的,专用于对TCP/IP网络中的计算机自定分配T ...
- Cisco配置VLAN+DHCP中继代理+NAT转发上网
实验环境: 路由器 使得TP-link 设置NAT转发使用,tp-link路由器网关设置成 192.168.30.254 (核心层)Cisco 3550三层交换机(型号C3550-I5Q3L2-M)配 ...
- 路由器基础配置之dhcp配置
我们将以上面的拓扑图为例,router9为dhcp的服务器,为pc4,5,6分配三个不同网段的地址,pool为要分配的三个地址池,我们要把pc4设置为12网段,pc5设置成34网段,pc6设置成56网 ...
- (三)跟我一起玩Linux网络服务:DHCP服务配置之主服务器配置
我们今天来做DHCP服务器的配置,我们的前提示要实现用一台虚拟机做DHCP服务器 1.首先,我们要有DHCP软件,我们用到下面两个软件(可以使用其他方法从网上直接安装,具体方法网络搜索) dhcp-3 ...
- Kali Linux常用服务配置教程启动DHCP服务
Kali Linux常用服务配置教程启动DHCP服务 通过前面的介绍,DHCP服务就配置好了.接下来,用户就可以使用该服务器来获取IP地址了.下面将对前面配置的服务进行测试. 1.启动DHCP服务 如 ...
随机推荐
- VS2013+WDK8.1 驱动开发环境配置
Windows Driver Kit 是一种完全集成的驱动程序开发工具包,它包含 WinDDK 用于测试 Windows 驱动器的可靠性和稳定性,本次实验使用的是 WDK8.1 驱动开发工具包,该工具 ...
- THUPC2019/CTS2019/APIO2019游记
Day -? 居然还能报上thupc,我在队里唯一的作用大约是cfrating稍微高点方便过审.另外两位是lz和xyy. Day -2 我夫人生日! Day -1 lz和xyy的家长都来了带我飞.住在 ...
- java 获取json字符串中key对应的值
用到了Gson的JsonParser maven项目引入 <dependency> <groupId>com.google.code.gson</groupId> ...
- Android 自定义控件之 日期选择控件
效果如下: 调用的代码: @OnClick(R.id.btn0) public void btn0() { final AlertDialog dialog = new AlertDialog.Bui ...
- Project Oberon
Project Oberon Project Oberon http://www.projectoberon.com/ Project Oberon 28.11.2018 / 11.12.2018 ...
- 踩坑记录-nuxt引入vuex报错store/index.js should export a method that returns a Vuex instance.
错误 store/index.js代码如下: import Vue from 'vue'; import Vuex from 'vuex'; import city from './moudle/ci ...
- MYSQL日期相关操作
*******MYSQL中取当前周/月/季/年的第一天与最后一天******* 当年第一天: SELECT DATE_SUB(CURDATE(),INTERVAL dayofyear(now())-1 ...
- MySQL操作规范总结
来源:静以致远√团团 用户权限管理创建用户命令:CREATE USER 'username'@'host' IDENTIFIED BY 'password';说明:Username所创建的用户名hos ...
- 编译和执行 C# 应用程序
- Scrapy 中常用的中间件和管道组件
Pipeline用法 储存到MongoDB pipline.py中的代码 import pymongo class MongoPipeline(object): def __init__(self, ...