美文网首页
跨网段DHCP的配置

跨网段DHCP的配置

作者: xuanxi | 来源:发表于2017-11-04 21:55 被阅读0次

一、给路由器安装上模块

路由器0、1、2都接上模块TX

二、端口IP配置

路由器2:

Router>enable

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#interface fa0/1

Router(config-if)#ip address 172.16.10.254 255.255.255.0

Router(config-if)#no shut

路由器1:

Router>enable

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#interface fa0/0

Router(config-if)#ip addr 192.168.10.254 255.255.255.0

Router(config-if)#no shut

Router(config-if)#exit

Router(config)#interface fa0/1

Router(config-if)#ip addr 172.16.10.253 255.255.255.0

Router(config-if)#no shut

路由器0:

Router>enable

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#interface fa0/0

Router(config-if)#ip address dhcp(打开dhcp端口)

Router(config-if)#no shut

此时端口绿了

三、配置dhcp服务器

Router(config)#ip dhcp pool pool1(地址池取名为pool1)

Router(dhcp-config)#network 192.168.10.0 255.255.255.0(给192.168.10.1地址段分配IP)

Router(dhcp-config)#default-router 192.168.10.254(网关)

Router(dhcp-config)#dns-server 10.10.10.1(dns服务器随便设一个)

Router(config)#ip dhcp excluded-address 192.168.10.250 192.168.10.254(10.250-254网段不分配IP)

四、配置dhcp助手

路由器1:

Router>enable

Router#configure terminal

Router(config)#interface fa0/0

Router(config-if)#ip helper-address 172.16.10.254(路由器1的0/0对应dhcp服务器的IP地址)

Router(config-if)#exit

Router(config)#ip forward-protocol udp(用udp协议转发)

五、给路由器设置下一跳

路由器2:

Router(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.253

路由器0:

Router(config)#ip route 172.16.10.0 255.255.255.0 192.168.10.254

六、查看是否可以自动获取到IP地址

路由器0:

Router#show ip interface brief

查看获取到了IP地址为192.168.10.4

相关文章

  • 跨网段DHCP的配置

    一、给路由器安装上模块 路由器0、1、2都接上模块TX 二、端口IP配置 路由器2: Router>enable ...

  • DHCP服务器配置

    一个标准的DHCP配置文件应该包括全局配置参数、子网网段声明、地址配置选项以及地址配置参数

  • DHCP+WDS安装部署问题

    部署环境无域环境DHCP和WDS分开部署,客户机在其他网段 DHCP在同一网段 ,WDS服务器防火墙开启阻止UDP...

  • 交换机上配置DHCP(基于接口和全局配置)

    交换机上配置DHCP(基于接口和全局配置) 基于接口配置DHCP的配置过程 基于全局DHCP配置过程

  • 记Consul 跨网段迁移-advertise配置项

    欢迎关注个人公众号 DailyJobOps 原文地址记Consul 跨网段迁移-advertise配置项[http...

  • 第十六周作业

    1、搭建DHCP服务,为局域网内用户提供10.1.1.0/24网段的IP,且租约期默认为48小时 dhcp的介绍 ...

  • 第十七周

    1、搭建DHCP服务,为局域网内用户提供10.1.1.0/24网段的IP,且租约期默认为48小时 dhcp的介绍 ...

  • Cisco DHCP 分配固定IP地址

    配置如下: ip dhcp pool YuanYiWuShi-print //配置DHCP POOLho...

  • centos 6 dhcp 安装

    dhcp 安装 dhcp配置 拷贝实例文件到配置目录 添加配置 重启动dhcp服务 正常的话,进行测试,windo...

  • openwrt 配置文件功能简介

    配置文件 文件位置 描述 基本配置 /etc/config/dhcp dnsmasq和DHCP的配置 /etc/...

网友评论

      本文标题:跨网段DHCP的配置

      本文链接:https://www.haomeiwen.com/subject/mwetmxtx.html