Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

DHCP configuration supplement

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In order to manage IP uniformly, sometimes we use a Server server between different network segments, so here we will refer to the concept of a DHCP relay.

DHCP Relay configuration:

Configure the router as DHCP relay and configure the gateway port other than the network segment where the server is located.

1. Configure two Router addresses:

Router one:

Route > enable

Router# configure terminal

Router (config) # no ip domain lookup / / disable the domain name query function

Router (config) # hostname R1 / / Router named R1

R1 (config) # interface gi0/0 / / enter the gi0/0 port

R1 (config-if) # no shutdown / / Open the port

R1 (config-if) # ip address 192.168.1.254 255.255.255.0 / Port configuration IP address

R1 (config) # interface gi0/1 / / enter the gi0/1 port

R1 (config-if) # no shutdown / / Open the port

R1 (config-if) # ip address 192.168.12.1 255.255.255.0 / / Port configuration IP address

Router two:

Route > enable

Router# configure terminal

Router (config) # no ip domain lookup / / disable the domain name query function

Router (config) # hostname R2 / / Router named R2

R2 (config) # interface gi0/0 / / enter the gi0/0 port

R2 (config-if) # no shutdown / / Open the port

R2 (config-if) # ip address 192.168.2.254 255.255.255.0 / Port configuration IP address

R2 (config) # interface gi0/1 / / enter the gi0/1 port

R2 (config-if) # no shutdown / / Open the port

R2 (config-if) # ip address 192.168.12.2 255.255.255.0 / / Port configuration IP address

2. Configure the two routers with static routes to ensure that the two routers can be connected before:

R1 (config) # ip route 192.168.2.0 255.255.255.0 192.168.12.2

(network segment) (subnet mask) (next hop port IP)

R2 (config) # ip route 192.168.1.0 255.255.255.0 192.168.12.1

3. Configure the DHCP address pool on the Server server:

4. Configure the router as DHCP relay:

R2 (config) # interface gi0/1 / / enter the gi0/1 port

R2 (config-if) # ip helper-address 192.168.1.1

/ / after the gateway port gi0/1 receives the DHCP discover message, it will unicast the broadcast message to the DHCP server 192.168.1.1, and the source address is 192.168.2.254 and the destination address is 192.168.1.1

R2 (config) # service dhcp / / as a DHCP relay, DHCP must be enabled.

5. Click PC1, PC2, PC3, PC4 and PC5 to activate the DHCP service.

Note:

When there are multiple DHCP address pools on the DHCP server, the server distinguishes the address pool by the source IP address in the DHCP message

In a DHCP relay environment, it is essentially based on the gateway IP address of each department.

On the DHCP server, configure the DHCP address pool for the three gateways

At the same time, configure the Gateway IP address on the DHCP server:

Ensure that the DHCP server can respond to DHCP messages sent by DHCP clients of other departments / network segments

Note:

Server-R1-R2

1. Configure DHCP trunk on the port of the direct router (on the port of R2)

2. Add information such as the gateway of the terminal on R2 on the server

3. Open the DHCP service agreement on R2

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report