Configuring the DHCP relay agent as configuration commands

Topology is as follows:

 

 

Configuring the DHCP Relay Agent configuration
conditions were as follows:
Two routers AR1220
two switches S5700
two pc (computer) Machine
pc1IP address: 192.168.1.2
pc2IP address: 192.168.3.2
============== ==========================
two routing configuration commands are as follows:
the AR-configuration. 1:
<the Huawei> // system view-view into the system
[ Huawei] sysname AR-1 // modify the host name: the AR-. 1
[-the AR. 1] int g0 / 0/0 // into g0 / 0/0 Interface
[AR-1-GigabitEthernet0 / 0 /0] ip address 192.168 .1.1 24 // IP address and subnet mask
[AR-1-GigabitEthernet0 / 0 /0] int g0 / 0/1 // handover Interface
[AR-1-GigabitEthernet0 / 0 /1] ip address 192.168.2.1 24 // configure the IP address and subnet mask
[AR-1] ip pool p1 // create an address pool p1
[AR-1-ip-the pool-p1] Network 192.168.1.0 subnet mask and mask specified 24-//
[AR-1-ip-pool-p1]gateway-list 192.168.1.1            //指定网关
[AR-1-ip-pool-p1]ip pool p2    //创建地址池2并切换
[AR-1-ip-pool-p2]network 192.168.3.0 mask 24            //指定网段和掩码
[AR-1-ip-pool-p2]gateway-list 192.168.3.1            //指定网关
[AR-1-ip-pool-p2]q            //退到上一层,系统视图
[AR-1]int g0/0/0            //进g0/0/0接口
[AR-1-GigabitEthernet0/0/0]dhcp select global            //指定g0/0/0接口为全局模式
[AR-1-GigabitEthernet0/0/0]int g0/0/1                //切换接口
[AR-1-GigabitEthernet0/0/1]dhcp select global             //指定g0/0/1接口为全局模式
[AR-1]ip route-static 192.168.3.0 24 192.168.2.2        //指定3网段去往下一条2.2的路由上

====================================================================

检查出的错误:
[AR-1]dhcp enable        //开启dhcp服务
[AR-1]int g0/0/1        //进g0/0/1接口
[AR-1-GigabitEthernet0/0/1]dhcp select global            //指定g0/0/1接口为全局模式
=======================================================================
AR-2配置:
<Huawei>system-view        //进系统视图
[Huawei]sysname AR-2        //修改主机名为:AR-2
[AR-2]int g0/0/1        //进g0/0/1接口
[AR-2-GigabitEthernet0/0/1]ip address 192.168.2.2 24        //配置IP地址和子网掩码
[AR-2-GigabitEthernet0/0/1]int g0/0/0                //切换接口
[AR-2-GigabitEthernet0/0/0]ip address 192.168.3.1 24        //配置IP地址和子网掩码
[AR-2]dhcp enable        //开启dhcp服务
[AR-2]int g0/0/1        //进g0/0/1接口
[AR-2]ip route-static 192.168.1.0 24 192.168.2.1        //指定1网段去往下一条的路由上

检查出的错误:
[AR-2]int g0/0/0        //进g0/0/0接口
[AR-2-GigabitEthernet0/0/0]dhcp select relay             //指定g0/0/9接口为全局模式
[AR-2-GigabitEthernet0/0/0]dhcp relay server-ip 192.168.2.1    //指定DHCP服务器
===========================================================================
 

发布了20 篇原创文章 · 获赞 9 · 访问量 2193

Guess you like

Origin blog.csdn.net/qq_38936227/article/details/104367620