Ruijie Community

Title: How to configure dhcp relay? [Print this page]

Author: dongling    Time: 2021-5-19 13:47
Title: How to configure dhcp relay?

I. Requirements

Distribution switch is the user gateway which have enabled DHCP relay. Core switch acts as DHCP Server.Connect core switch and distribution switch through Layer 3 link.

II. Network Topology

                                               

III. Configuration Tips

1. Enable DHCP relay on distribution switch

2. Enable DHCP Service on Core switch

IV. Configuration Steps

Core switch

1. Convert the port connected to distribtuion switch to L3 port and assign a IP address to it.

Ruijie(config)#interface gigabitEthernet 0/24

Ruijie(config-if-GigabitEthernet 0/24)#no switchport

Ruijie(config-if-GigabitEthernet 0/24)#ip address 172.16.1.1 255.255.255.252

Ruijie(config-if-GigabitEthernet 0/24)#exit

2. Configure a static route.

Ruijie(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.2

3. Enable DHCP service

Ruijie(config)#service dhcp        ------>DHCP service is disabled by default.

4. Create DHCP pool and configure DHCP parameters ---gateway , DNS , subnets

Ruijie(config)#ip dhcp pool vlan10

Ruijie(dhcp-config)#network 192.168.1.0 255.255.255.0      ------>Network subnet              

Ruijie(dhcp-config)#dns-server 218.85.157.99                     ------>DNS Server

Ruijie(dhcp-config)#default-router 192.168.1.254                ------>User Gateway

Ruijie(dhcp-config)#exit                                                                                                                          

5. Save configuration

Ruijie(config)#end

Ruijie#wr

Aggregation switch

1. Assign IP address to Vlan 10 and SVI 10 is user gateway

Ruijie(config)#interface vlan 10

Ruijie(config-if-VLAN 10)#ip address 192.168.1.254 255.255.255.0

Ruijie(config-if-VLAN 10)#exit

2. Convert port connected to Core switch to layer 3 port and assign IP address to it

Ruijie(config)#interface gigabitEthernet 0/24

Ruijie(config-if-GigabitEthernet 0/24)#no switchport

Ruijie(config-if-GigabitEthernet 0/24)#ip address 172.16.1.2 255.255.255.252

Ruijie(config-if-GigabitEthernet 0/24)#exit

3. Configure default route

Ruijie(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.1

4. Enable DHCP service

Ruijie(config)#service dhcp                                          ------>DHCP service is disabled by default

5. Enable DHCP relay

Ruijie(config)#ip helper-address 172.16.1.1                 ------>172.16.1.1 is the DHCP Server

6. Save configuration

Ruijie(config)#end

Ruijie#wr

V. Verification

1. How to display DHCP assignments


2. To display NIC information on a station,execute "run-------->cmd-------->ipconfig /all"


3. How to display status of DHCP relay







Welcome to Ruijie Community (https://community.ruijienetworks.com/) Powered by Discuz! X3.2