09-04-2022 11:37 AM - edited 09-08-2022 04:20 PM
IP Helper-addres for VLANs
This is simple solution to reduce a bottle neck of router which is issuing ip address to clients using IP DHCP pool "Vlanxx". IP Helper-Address command can point to enterprize DHCP Server instead to issues ip address to their all VLANs clients. Then this separate DHCP Server will take fully control issuing IP address to all VLAN clients. Step-by-step configuration follows. This documentation is created by for beginers who wants improve their network with reliability. Please thumbs up if this is helpful to you then it will be helpful to others.
Router1 Configurations
Router1#
Router1#config t
Router1(config)#interface GigabitEthernet0/0
Router1(config-if)# no ip address
Router1(config-if)# no shutdown
Router1(config-if)#
Router1(config-if)#interface GigabitEthernet0/0.10
Router1(config-subif)# encapsulation dot1Q 10
Router1(config-subif)# ip address 192.168.10.1 255.255.255.0
Router1(config-subif)# no shutdown
Router1(config-subif)#
Router1(config-subif)#interface GigabitEthernet0/0.11
Router1(config-subif)# encapsulation dot1Q 11
Router1(config-subif)# ip address 192.168.11.1 255.255.255.0
Router1(config-subif)# no shutdown
Router1(config-subif)#
Router1(config-subif)#interface GigabitEthernet0/1
Router1(config-if)# no ip address
Router1(config-if)# duplex auto
Router1(config-if)# speed auto
Router1(config-if)# no shutdown
Router1(config-if)#
Router1(config-if)#interface GigabitEthernet0/1.50
Router1(config-subif)# encapsulation dot1Q 50
Router1(config-subif)# ip address 192.168.50.1 255.255.255.0
Router1(config-subif)# no shutdown
Router1(config-subif)#
Router1(config-subif)#interface GigabitEthernet0/1.100
Router1(config-subif)# encapsulation dot1Q 100
Router1(config-subif)# ip address 192.168.100.1 255.255.255.0
Router1(config-subif)# no shutdown
Router1(config-subif)#
Router1(config-subif)#interface GigabitEthernet0/1.120
Router1(config-subif)# encapsulation dot1Q 120
Router1(config-subif)# ip address 192.168.120.1 255.255.255.0
Router1(config-subif)# no shutdown
Router1(config-subif)#
Router1(config-subif)#interface GigabitEthernet0/1.130
Router1(config-subif)# encapsulation dot1Q 130
Router1(config-subif)# ip address 192.168.130.1 255.255.255.0
Router1(config-subif)# no shutdown
Router1(config-subif)#
Router1(config-subif)#interface GigabitEthernet0/2 //you can spare one port to connect to an internet router or a switch
Router1(config-if)# no ip address
Router1(config-if)# duplex auto
Router1(config-if)# speed auto
Router1(config-if)# shutdown
Router1(config-if)#
Router1 - Show Run Command
--------------------------
Router1#sh run
Building configuration...
!
hostname Router1
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface GigabitEthernet0/0.11
encapsulation dot1Q 11
ip address 192.168.11.1 255.255.255.0
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1.50
encapsulation dot1Q 50
ip address 192.168.50.1 255.255.255.0
!
interface GigabitEthernet0/1.100
encapsulation dot1Q 100
ip address 192.168.100.1 255.255.255.0
!
interface GigabitEthernet0/1.120
encapsulation dot1Q 120
ip address 192.168.120.1 255.255.255.0
!
interface GigabitEthernet0/1.130
encapsulation dot1Q 130
ip address 192.168.130.1 255.255.255.0
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
CORE Switch1 Configuration
CoreSwitch1#
CoreSwitch1#config t
CoreSwitch1(config)#int rang F0/1-3
CoreSwitch1(config-if)# switchport trunk encapsulation dot1q
CoreSwitch1(config-if)# switchport mode trunk
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#int rang G0/1-2
CoreSwitch1(config-if)# switchport trunk encapsulation dot1q
CoreSwitch1(config-if)# switchport mode trunk
CoreSwitch1(config-if)# exit
CoreSwitch1(config)#interface FastEthernet0/1
CoreSwitch1(config-if)# description CoreSwitch1-DHCPSever 192.168.1.1 connection
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface FastEthernet0/2
CoreSwitch1(config-if)# description CoreSwitch1-Switch3 connection
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface FastEthernet0/3
CoreSwitch1(config-if)# description CoreSwitch1-Router1 G0/1 sub-interface connection
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface GigabitEthernet0/1
CoreSwitch1(config-if)# description CoreSwith1-Switch2 connection
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface GigabitEthernet0/2
CoreSwitch1(config-if)# description CoreSwitch1-Router1 G0/0 sub-interface connection
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#int rang F0/10-19
CoreSwitch1(config-if)# switchport access vlan 11
CoreSwitch1(config-if)# switchport mode access
CoreSwitch1(config-if)# switchport nonegotiate
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface Vlan1
CoreSwitch1(config-if)# ip address 192.168.1.2 255.255.255.0
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface Vlan10
CoreSwitch1(config-if)# ip address 192.168.10.2 255.255.255.0
CoreSwitch1(config-if)# ip helper-address 192.168.1.1
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface Vlan11
CoreSwitch1(config-if)# ip address 192.168.11.2 255.255.255.0
CoreSwitch1(config-if)# ip helper-address 192.168.1.1
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface Vlan50
CoreSwitch1(config-if)# ip address 192.168.50.2 255.255.255.0
CoreSwitch1(config-if)# ip helper-address 192.168.1.1
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface Vlan100
CoreSwitch1(config-if)# ip address 192.168.100.2 255.255.255.0
CoreSwitch1(config-if)# ip helper-address 192.168.1.1
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface Vlan120
CoreSwitch1(config-if)# ip address 192.168.120.2 255.255.255.0
CoreSwitch1(config-if)# ip helper-address 192.168.1.1
CoreSwitch1(config-if)#
CoreSwitch1(config-if)#interface Vlan130
CoreSwitch1(config-if)# ip address 192.168.130.2 255.255.255.0
CoreSwitch1(config-if)# ip helper-address 192.168.1.1
CoreSwitch1(config-if)#
CORE Switch1-Show Run Command
----------------------------
CoreSwitch1#
CoreSwitch1#sh run
!
interface FastEthernet0/1
description CoreSwitch1-DHCPSever 192.168.1.1 connection
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
description CoreSwitch1-Switch3 connection
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
description CoreSwitch1-Router1 G0/1 sub-interface connection
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
!
!
interface FastEthernet0/10
switchport access vlan 11
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/11
switchport access vlan 11
switchport mode access
switchport nonegotiate
!
!
interface FastEthernet0/18
switchport access vlan 11
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/19
switchport access vlan 11
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/20
!
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
description CoreSwith1-Switch2 connection
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/2
description CoreSwitch1-Router1 G0/0 sub-interface connection
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Vlan1
ip address 192.168.1.2 255.255.255.0
!
interface Vlan10
mac-address 0040.0b45.ab01
ip address 192.168.10.2 255.255.255.0
ip helper-address 192.168.1.1
!
interface Vlan11
mac-address 0040.0b45.ab02
ip address 192.168.11.2 255.255.255.0
ip helper-address 192.168.1.1
!
interface Vlan50
mac-address 0040.0b45.ab03
ip address 192.168.50.2 255.255.255.0
ip helper-address 192.168.1.1
!
interface Vlan100
mac-address 0040.0b45.ab04
ip address 192.168.100.2 255.255.255.0
ip helper-address 192.168.1.1
!
interface Vlan120
mac-address 0040.0b45.ab05
ip address 192.168.120.2 255.255.255.0
ip helper-address 192.168.1.1
!
interface Vlan130
mac-address 0040.0b45.ab06
ip address 192.168.130.2 255.255.255.0
ip helper-address 192.168.1.1
!
Switch2 - Configurations
=========================
Switch2#conf t
Switch2(config)#int rang f0/1-12
Switch2(config-if-range)# switchport mode access
Switch2(config-if-range)# switchport access vlan 10
Switch2(config-if-range)#
Switch2(config-if-range)#int rang f0/13-24
Switch2(config-if-range)# switchport mode access
Switch2(config-if-range)# switchport access vlan 50
Switch2(config-if-range)#
Switch2(config-if-range)#interface GigabitEthernet0/1
Switch2(config-if)# description Switch2-CoreSwitch1 connection (trunking auto)
Switch2(config-if)#
Switch2#
Switch2 - Show Run Command
--------------------------
Switch2#
Switch2#sh run
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
switchport nonegotiate
!
!
!
interface FastEthernet0/11
switchport access vlan 10
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/12
switchport access vlan 10
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/13
switchport access vlan 50
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/14
switchport access vlan 50
switchport mode access
switchport nonegotiate
!
!
!
interface FastEthernet0/23
switchport access vlan 50
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/24
switchport access vlan 50
switchport mode access
switchport nonegotiate
!
interface GigabitEthernet0/1
description Switch2-CoreSwitch1 connection (trunking auto)
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
Switch3 - Configurations
========================
Switch#
Switch#conf t
Switch(config)#
Switch(config)#vlan 100
Switch(config-vlan)# name Production
Switch(config-vlan)#
Switch(config-vlan)#vlan 120
Switch(config-vlan)# name Finance
Switch(config-vlan)#
Switch(config-vlan)#vlan 130
Switch(config-vlan)# name Admin
Switch(config-vlan)# exit
Switch(config)#
Switch(config)#int rang g1/0/1-8
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 100
Switch(config-if-range)#
Switch(config-if-range)#int rang g1/0/9-16
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 120
Switch(config-if-range)#
Switch(config-if-range)#int rang g1/0/17-24
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 130
Switch(config-if-range)# exit
Switch(config)#
Switch(config)#int g1/1/1
Switch(config-if)# description Switch3-CoreSwitch F0/2 connection (trunking auto)
Switch(config-if)# exit
Switch(config)#
Switch3 - Show Run Command
--------------------------
Switch#
Switch#sh run
!
interface GigabitEthernet1/0/1
switchport access vlan 100
switchport mode access
switchport nonegotiate
!
!
!
interface GigabitEthernet1/0/8
switchport access vlan 100
switchport mode access
switchport nonegotiate
!
interface GigabitEthernet1/0/9
switchport access vlan 120
switchport mode access
switchport nonegotiate
!
!
!
interface GigabitEthernet1/0/16
switchport access vlan 120
switchport mode access
switchport nonegotiate
!
interface GigabitEthernet1/0/17
switchport access vlan 130
switchport mode access
!
!
!
interface GigabitEthernet1/0/24
switchport access vlan 130
switchport mode access
!
interface GigabitEthernet1/1/1
description Switch3-CoreSwitch F0/2 connection (trunking auto)
!
interface GigabitEthernet1/1/2
!
interface GigabitEthernet1/1/3
!
interface GigabitEthernet1/1/4
!
interface Vlan1
no ip address
shutdown
!
interface Vlan100
mac-address 0030.a394.6801
no ip address
!
interface Vlan120
mac-address 0030.a394.6802
no ip address
!
interface Vlan130
mac-address 0030.a394.6803
no ip address
DHCP Server - Configuration
1. First, Configure the DHCP Server with static ip address manually as below;
Configure Static IP Address to DHCP Server
2. Secondly, select from top menu "Services" and select "DHCP" from left menu and configure DHCP pool IP address as below:
IP Helper-Address DHCP pool IP addresses for VLANs
3. Finally, select the clients on each VLAN and select IP configuration and select DHCP radio button instead of Static.
Client PC select DHCP
@ahmad828 you need to understand what "ip helper address" (which can be used for multiple protocols, not just DHCP) actually does with DHCP. It receives broadcast DHCP discovery packets on the local LAN interface and then unicasts them to the DHCP server using DHCP relay Nice summary of DHCP relay here: https://blog.ipspace.net/2023/03/dhcp-relay-process.html
That means the router relaying the DHCP packet needs a route to get to the server and the server needs a route to reply back to the router. The server also needs to contain the DHCP server configuration for that subnet on the router.
> Please noote that no routing protocls such as rip,eigrp,opsf have been implenented in this network
Regardless of whether you have setup dynamic routing protocols or not you must have routes to enable the traffic from Fa0/0 to server and server back to Fa0/0. If you don't use dynamic routing protocols then you need static routes. So step number 1 - make sure you can ping from Fa0/0 IP to server and server to Fa0/0 IP. If you don't have that connectivity to start with then the DHCP relay will never work.
Hi @ahmad828
Yes, yes..it might be easier to communicate between routers implementing eigrp dynamic routing protocol such as router eigrp 10 in both routers Router20 and Router19, if one router when down or up then other will responce and broadcast neighbour adjecency subnets down or up. I would recommend you implement static routes too. It will communicate faster with different broadcasting domain such as Router19 and Roter20.
Yes too. ip helper-address have to implement in Router20 in Black side (Switch10 side local area interface of Router20) not in a serial interface (Red side).
Note: You did not mention how many VLANs are in your network. This sample network uses Default VLAN 1 for your easiness in this network topology.
Here below you will find IOS codes for each interfaces in router it will solve your problem and give me thumbs up and give me a helpful vote:
Router 20 - Configuration
You have to note that both broadcasting domain should have two different networks
If you try to use same network at Router19 and Router20, IP lease doesnot work.
interface FastEthernet0/0
description Connection to Local Office VLAN 1
ip address 10.68.20.1 255.255.255.0
ip helper-address 10.68.1.1
duplex auto
speed auto
Better connect UTP cable to G0/1 interface instead of F0/1 in L2SW- Switch10
Dyanmic Routing
router eigrp 10
network 10.68.20.0 0.0.255.255
network 172.168.0.0 0.0.255.255
Static Routing
ip route 10.68.1.0 255.255.255.0 172.16.80.1
Router 19- Configuration
interface FastEthernet0/0
description LAN DHCP Server Connection
ip address 10.68.1.2 255.255.255.0
ip helper-address 10.68.10.1
duplex auto
speed auto
Dynamic Routing
router eigrp 10
network 10.0.0.0 0.255.255.255
network 172.16.0.0 0.0.255.255
Static Routing
ip route 10.68.20.0 255.255.255.0 172.16.80.2
ip route 0.0.0.0 0.0.0.0 Serial0/3/0
IP Helper-Address communication
I knew that you have just created CISCO account anonymously on 2024-05-11 for some reasons. Even though it would appreciate that if you are realy generous person, to response to my sloution positively for your problem solving or not. Looking forward to hear from you.
Best regards,
Sisira/Siskum
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: