cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1527
Views
0
Helpful
3
Replies

DHCP Server over IP

reylite
Level 1
Level 1

Hello

i need your advice, im practicing LAB environment where Router act as DHCP server and using sub interface to Switch 1 and then from Switch 1 To Switch 2 using Dynamic Routing IS-IS where DHCP client under Switch 2. which ip do i need for ip helper-address

here i attached my configuration 

 

 

image.png

 

thank you

3 Replies 3

Hello,

in theory, the ip helper-address always needs to be on the first layer 3 interface:

=======Switch 2===========
vlan 10
!
int g0/0/0
no sw
description P2P to Switch 2
ip add 192.168.12.2 255.255.255.252
--> ip helper-address 192.168.11.1
ip router isis

ip route 192.168.10.0 255.255.255.252 192.168.11.2

ALSO you need this static route for the DHCP pool subnet  

siskum
Spotlight
Spotlight

 

Hi,

Written here two solutions for your "ip helper-address" problem. (Solution 1 and Solution 2)

as a example: if I am you I will not use static routing within a same broadcast domain. I will delete some of unneccessary static routing and use only "Switchport trunking encapsulation dot1q" in CoreSwitch1 interfaces to communicate with both Router1 and  Swtch2 (CoreSwitch1-Router1 & CoreSwitch1-Switch2). Here I will describe you how to do it.

Solution 1

IP Helper-address configurationIP Helper-address configuration

Router 1 - Configuration

!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0.10
description Users
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface GigabitEthernet0/0.11
description P2P_Switch1
encapsulation dot1Q 11
ip address 192.168.11.1 255.255.255.0
!
interface Vlan1
no ip address
shutdown
!
ip classless
!

 

CoreSwitch1 - Configuration

!
!
interface FastEthernet0/1
description Switch1-DHCP Sever connection
switchport trunk encapsulation dot1q
switchport mode trunk
!
!
!
interface FastEthernet0/10
switchport access vlan 11
switchport mode access
switchport nonegotiate
!
!
interface GigabitEthernet0/1
description Swith1-Switch2 connection
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/2
description Switch1-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
ip address 192.168.10.2 255.255.255.0

ip helper-address 192.168.1.2
ip helper-address 192.168.1.1
!
interface Vlan11
ip address 192.168.11.2 255.255.255.0

ip helper-address 192.168.1.2
ip helper-address 192.168.1.1
!

Show trunk
---------------------------------------------------------------------
CoreSwitch1#sh int trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1
Gig0/1 on 802.1q trunking 1
Gig0/2 on 802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-1005
Gig0/1 1-1005
Gig0/2 1-1005

Port Vlans allowed and active in management domain
Fa0/1 1,10,11
Gig0/1 1,10,11
Gig0/2 1,10,11

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,10,11
Gig0/1 1,10,11
Gig0/2 1,10,11

CoreSwitch1#

 

Switch2 - Configuration

!
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/3
switchport access vlan 10
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/4
switchport access vlan 10
switchport mode access
switchport nonegotiate
!
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!

-------------------------------------------------------------------------------

Switch2#sh int trunk
Port Mode Encapsulation Status Native vlan
Gig0/1 auto n-802.1q trunking 1

Port Vlans allowed on trunk
Gig0/1 1-1005

Port Vlans allowed and active in management domain
Gig0/1 1,10

Port Vlans in spanning tree forwarding state and not pruned
Gig0/1 1,10

Switch2#

 

DHCP-Server - configurations

issuing-Static Ip address for DHCP Serverissuing-Static Ip address for DHCP Server

issuing-DNS ip address for DHCP Serverissuing-DNS ip address for DHCP Server

Configuring - DHCP service in DHCP ServerConfiguring - DHCP service in DHCP Server

 

Solution 2

Without ip helper-address, client get ip address from DHCP poolWithout ip helper-address, client get ip address from DHCP pool

In this solution  DHCP  pool exist in the Router1

You dont need to have addtional DHCP Server but Switches configuration exist same as above. You can remove "ip helper-address 192.168.1.1" from CoreSwitch1. 

!
no ip helper-address 192.168.1.1
!

You have to add additional comands as below to Router1 as below, previous configurations remain as same.

!
!
ip dhcp excluded-address 192.168.10.1 192.168.10.3
ip dhcp excluded-address 192.168.11.1 192.168.11.3
!
!
ip dhcp pool user
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
!
ip dhcp pool CoreSwitch1
network 192.168.11.0 255.255.255.0
default-router 192.168.11.1
!
!

 

 

 

Sisira