如何解决华为路由器的DHCP配置问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何解决华为路由器的DHCP配置问题相关的知识,希望对你有一定的参考价值。
参考技术A华为路由器AR1220的DHCP配置问题我相信很多人都有遇到过,那么要如何解决呢?下面我就利用ENSP模拟器给大家示范一遍如何解决的。
解决华为路由器的DHCP配置问题的 方法在模拟器eNSP上配置AR1220路由器DHCP配置,一台AR1220路由器,一台S3700交换机,二台PC终端。
用模拟器eNSP设计好拓朴图,标注好端口好,选中所有设备再按启动设备键。
在路由器R1上配置路由器名称,设置路由器IP地址,查看路由器接口信息简要,查看路由器IP地址接口简要
在路由器R1上启用DHCP服务,创建全局地址池,设置地址范围,网关地址和地址租期,然后查看地址池信息。
在交换机S1上,设置名称,查看接口状态信息,启用DHCP服务,设置vlanif 1自动获取IP地址。
在PC终端上,设置自动获取IP地址并查看IP地址。
通过敲打这些命令你就能解决你华为路由器的DHCP配置问题了,快去动手敲敲吧!
华为路由器的相关 文章 :
1. 华为路由器怎么隐藏你的WIFI信号
2. 如何解决华为路由器设置好了不能用
3. 华为路由器设置wifi的详细方法
4. 华为路由器如何配置静态路由
5. 华为路由器详细介绍
华为路由器上的 DHCP 配置步骤:
华为路由器上的 DHCP 配置步骤:
1、确保客户端与服务器之间的链路是互通的;
#SW1
创建 VLAN 10
将端口放入VLAN 10 ;
#Gateway
在 Router 上为 VLAN 10 配置一个 网关IP 地址;
2、配置 DHCP 客户端;
# 进入 PC ,选择“自动获取”,点“应用”;
3、配置 DHCP 服务器;
# 创建 IP 地址池;
ip pool VLAN-10
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.254
dns-list 8.8.8.8
lease day 3
# 开启 DHCP 服务 ;
dhcp enable
# 在 接收 DHCP 报文的端口上,配置 DHCP 的选择方式 - global ;
interface gi0/0/0
dhcp select global // 表示的是当端口上收到 DHCP 报文以后
直接去 DHCP 服务器在全局配置的IP
地址池中选择一个可用的IP地址;
一:sw1配置
[sw1]vlan batch 10 20 //创建vlan
[sw1]int g0/0/1
[sw1-GigabitEthernet0/0/1]port link-type access //端口加vlan
[sw1-GigabitEthernet0/0/1]port default vlan 10
[sw1-GigabitEthernet0/0/1]q
[sw1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type access
[sw1-GigabitEthernet0/0/2]port default vlan 20
[sw1-GigabitEthernet0/0/2]q
[sw1]int vlan 10
[sw1-Vlanif10]ip add 192.168.10.254 24
[sw1-Vlanif10]int vlan 20
[sw1-Vlanif20]ip add 192.168.20.1 24
[sw1-Vlanif20]int g0/0/3
[sw1-GigabitEthernet0/0/3]port link-type access
[sw1-GigabitEthernet0/0/3]port default vlan 20
[sw1-GigabitEthernet0/0/3]q
[sw1]rip //RIP应用
[sw1-rip-1]version 2
[sw1-rip-1]network 192.168.10.0
[sw1-rip-1]network 192.168.20.0
[sw2]dhcp enable //启用dhcp
[sw1]int vlan 10
[sw1-Vlanif10]dhcp select relay //dhcp中继
[sw1-Vlanif10]dhcp relay server-ip 192.168.100.2
Sw2配置:
[sw2]vlan batch 30 40 50 60
[sw2]int g0/0/2
[sw2-GigabitEthernet0/0/2]port link-type a
[sw2-GigabitEthernet0/0/2]port link-type access
[sw2-GigabitEthernet0/0/2]port d
[sw2-GigabitEthernet0/0/2]port def
[sw2-GigabitEthernet0/0/2]port default vlan 30
[sw2-GigabitEthernet0/0/2]q
[sw2]int eth0/0/3
[sw2-Ethernet0/0/3]port link-type access
[sw2-Ethernet0/0/3]port default vlan 40
[sw2-Ethernet0/0/3]q
[sw2-Ethernet0/0/4]port link-type access
[sw2-Ethernet0/0/4]port default vlan 50
[sw2-Ethernet0/0/4]q
[sw2]int eth0/0/5
[sw2-Ethernet0/0/5]port link-type access
[sw2-Ethernet0/0/5]port default vlan 60
[sw2-Ethernet0/0/5]q
[sw2-Ethernet0/0/1]port link-type access
[sw2-Ethernet0/0/1]port default vlan 50
[sw2-Ethernet0/0/1]int g0/0/6
[sw2-Ethernet0/0/1]q
[sw2]int eth0/0/6
[sw2-Ethernet0/0/6]port link-type access
[sw2-Ethernet0/0/6]port default vlan 60
[sw2-Ethernet0/0/6]q
[sw2]int vlan 30
[sw2-Vlanif30]ip add 192.168.30.254
[sw2-Vlanif30]ip add 192.168.30.254 24
[sw2-Vlanif30]q
[sw2]int vlan 40
[sw2-Vlanif40]ip add 192.168.40.254 24
[sw2]int vlan 50
[sw2-Vlanif50]ip add 192.168.50.1 24
[sw2]int vlan 60
[sw2-Vlanif60]ip add 192.168.60.1 24
[sw2-Vlanif50]q
[sw2]rip
[sw2-rip-1]version 2
[sw2-rip-1]network 192.168.30.0
[sw2-rip-1]network 192.168.40.0
[sw2-rip-1]network 192.168.50.0
[sw2-rip-1]network 192.168.60.0
[sw2-rip-1]q
[sw2]dhcp enable
[sw2]int vlan 30
[sw2-Vlanif30]dhcp select relay
[sw2-Vlanif30]dhcp relay server-ip 192.168.100.2
[sw2-Vlanif30]q
[sw2]int vlan 40
[sw2-Vlanif40]dhcp select relay
[sw2-Vlanif40]dhcp relay server-ip 192.168.100.2
三:R1配置
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.20.254
[r1-GigabitEthernet0/0/0]ip add 192.168.20.254 24
[r1-GigabitEthernet0/0/0]int g0/0/2
[r1-GigabitEthernet0/0/2]ip add 192.168.100.1 24
[r1-GigabitEthernet0/0/2]q
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.70.1 24
[r1]rip
[r1-rip-1]version 2
[r1-rip-1]network 192.168.20.0
[r1-rip-1]network 192.168.100.0
[r1-rip-1]network 192.168.70.0
[r1-rip-1]q
[r1]dhcp enable
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select relay
[r1-GigabitEthernet0/0/0]dhcp relay server-ip 192.168.100.2
四.R2配置
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.70.2 24
[r2-GigabitEthernet0/0/1]q
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.50.254 24
[r2-GigabitEthernet0/0/0]ip add 192.168.60.254
[r2-GigabitEthernet0/0/0]ip add 192.168.60.254 24
[r2-GigabitEthernet0/0/0]rip
[r2-rip-1]version 2
[r2-rip-1]network 192.168.70.0
[r2-rip-1]network 192.168.50.0
[r2-rip-1]network 192.168.60.0
[r2]dhcp enable
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]dhcp select relay
[r2-GigabitEthernet0/0/0]dhcp relay server-ip 192.168.100.2
[r2-GigabitEthernet0/0/0]q
[r2]int g0/0/2
[r2-GigabitEthernet0/0/2]dhcp select relay
[r2-GigabitEthernet0/0/2]dhcp relay server-ip 192.168.100.2
五.Dhcp配置:
[dhcp]int vlan 100
[dhcp]interface g0/0/1
[dhcp-GigabitEthernet0/0/1]port link-type access
[dhcp-GigabitEthernet0/0/1]port default vlan 100
[dhcp-Vlanif100]ip add 192.168.100.2 24
[dhcp-Vlanif100]q
[dhcp]dhcp enable
[dhcp]ip pool vlan10 //建地址池
[dhcp-ip-pool-vlan10]network 192.168.10.0 mask 24
[dhcp-ip-pool-vlan10]gateway-list 192.168.10.254
[dhcp-ip-pool-vlan10]dns-list 8.8.8.8
[dhcp-ip-pool-vlan10]Q
[dhcp]ip pool vlan20
[dhcp-ip-pool-vlan20]network 192.168.20.0 mask 24
[dhcp-ip-pool-vlan20]gateway-list 192.168.20.254
[dhcp-ip-pool-vlan20]dns-list 8.8.8.8
[dhcp-ip-pool-vlan20]q
[dhcp]ip pool vlan30
[dhcp-ip-pool-vlan30]network 192.168.30.0 mask 24
[dhcp-ip-pool-vlan30]gateway-list 192.168.30.254 mask 24
[dhcp-ip-pool-vlan30]gateway-list 192.168.30.254 mask 24
[dhcp-ip-pool-vlan30]gateway-list 192.168.30.254 mask 30
[dhcp-ip-pool-vlan30]gateway-list 192.168.30.254 mask 24
[dhcp-ip-pool-vlan30]gateway-list 192.168.30.254
[dhcp-ip-pool-vlan30]dns-list 8.8.8.8
[dhcp-ip-pool-vlan30]q
[dhcp]ip pool vlan40
[dhcp-ip-pool-vlan40]network 192.168.40.0 mask 24
[dhcp-ip-pool-vlan40]gateway-list 192.168.40.254
[dhcp-ip-pool-vlan40]dns-list 8.8.8.8
[dhcp]ip pool vlan50
[dhcp-ip-pool-vlan50]network 192.168.50.0 mask 24
[dhcp-ip-pool-vlan50]gateway-list 192.168.50.254
[dhcp-ip-pool-vlan50]dns-list 8.8.8.8
[dhcp]ip pool vlan60
[dhcp-ip-pool-vlan60]network 192.168.60.0 mask 24
[dhcp-ip-pool-vlan60]gateway-list 192.168.60.254
[dhcp-ip-pool-vlan60]dns-list 8.8.8.8
[dhcp-ip-pool-vlan60]q
[dhcp]int vlan 100
[dhcp-Vlanif100]dhcp select global
[dhcp-Vlanif100]q
[dhcp]ip route-static 0.0.0.0 0.0.0.0 192.168.100.1
六.获得ip并相互ping通
以上是关于如何解决华为路由器的DHCP配置问题的主要内容,如果未能解决你的问题,请参考以下文章