03-30-2022 10:03 PM
DHCP relay not working on WS-C3560-8PC-S switch. Attached configuration files. Please help and thanks in advanced.
DHCP Server
ip dhcp pool MYPOOL
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 208.67.222.222
!
interface GigabitEthernet0/0
ip address 192.168.255.3 255.255.255.248
!
ip route 0.0.0.0 0.0.0.0 192.168.255.1
Router
hostname Router
interface GigabitEthernet0/0
ip address 192.168.255.1 255.255.255.248
!
interface GigabitEthernet0/1
ip address 192.168.30.2 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.30.1
Switch
hostname Switch
!
interface FastEthernet0/1
Description For DHCP Endpoints
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/1
no switchport
ip address 192.168.30.1 255.255.255.0
ip helper-address 192.168.255.3
!
ip route 0.0.0.0 0.0.0.0 192.168.30.2
Solved! Go to Solution.
03-31-2022 03:22 AM - edited 03-31-2022 04:40 AM
Your are mix many misconfig lead to not work,
PC-SW broadcast
interface FastEthernet0/1
Description For DHCP Endpoints
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface vlan 10 <- L3
ip address 192.168.10.X 255.255.255.0
ip helper-address 192.168.255.3
!
SW-R unicast
interface GigabitEthernet0/1
no switchport
ip address 192.168.30.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.30.2
!
ip routing
Last thing
IN DHCP Router
You need ip route for LAN
ip route 192.168.10.0 255.255.255.0 192.168.225.1
May be need ip route in R
ip route 192.168.10.0 255.255.255.0 192.168.30.1
Do show ip route in each l3 device check reachability
DONE
03-30-2022 11:58 PM - edited 03-31-2022 12:21 AM
Lets do small change and test it :
Router
!
no ip route 0.0.0.0 0.0.0.0 192.168.30.1
ip route 192.168.10.0 255.255.255.0 192.168.30.1
Switch
- Hope VLAN 10 created and IP routing enabled
interface GigabitEthernet0/1
no switchport
ip address 192.168.30.1 255.255.255.0
no ip helper-address 192.168.255.3
interface vlan 10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.255.3
no shutdown
On the DHCP Server exclude the ip address 192.168.10.1
check from switch are you able t0o ping DHCP Server ?
from DHCP are you able to ping switch IP address
then test with PC land let us know
03-31-2022 12:36 AM
Hi Balaji,
PC could reached 192.168.255.3 when static ip address assigned. Still not able to get addresses via DHCP
C:\Users\kent>tracert -d 192.168.255.3
Tracing route to 192.168.255.3 over a maximum of 30 hops
1 1 ms 1 ms 1 ms 192.168.10.1
2 1 ms <1 ms <1 ms 192.168.30.2
3 11 ms 9 ms 9 ms 192.168.255.3
The default route on the router also works, anyway I have removed it and replaced it with:
ip route 192.168.10.0 255.255.255.0 192.168.30.1
There's no issue when ping from the switch to the DHCP Server 192.168.255.3 as shown:
Switch#sh run | in routing
system mtu routing 1500
ip routing
Switch#ping 192.168.255.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.255.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/17 ms
Switch#ping 192.168.255.3 so 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.255.3, timeout is 2 seconds:
Packet sent with a source address of 192.168.10.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/17 ms
03-31-2022 08:29 AM
the one suggested by myself should work as expected, i do not see any issue at all.
ip route 192.168.10.0 255.255.255.0 192.168.225.1
not sure you have this network in the config ? (or am i missing thing here ?)
ip route 0.0.0.0 0.0.0.0 192.168.255.1 (this on DHCP Server so there is no other path to miss here)
03-31-2022 12:26 AM
Hello
On the switch
no ip routing
ip default-gateway 192.168.30.2
interface GigabitEthernet0/1
no switchportip helper-address 192.168.255.3
ip helper-address 192.168.30.2
03-31-2022 12:39 AM
Changes done and not working, can still ping from the switch to DHCP router 192.168.255.3. I think ip helper should point to DHCP server 192.168.255.3.
03-31-2022 01:34 AM
Hello,
I lab tested this and could not get it to work either. Odd. Is this a simulator, or are you using 'real' devices ?
03-31-2022 03:01 AM
Hello,
DHCP server at first was via GNS3 simulator (Router connect via GNS3 cloud) to physical router and switch (another C3650) not working.
I replaced DHCP Server it with real switch Cisco 3650 (layer 3) and also didn't work. Again no routing issue from DHCP server to 192.168.10.1. Below configure from real Cisco 3650 switch (DHCP server)
DHCP#sh run
hostname DHCP
ip routing
!
ip dhcp pool MYPOOL
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 208.67.222.222
!
interface GigabitEthernet0/1
no switchport
ip address 192.168.255.3 255.255.255.248
!
ip route 0.0.0.0 0.0.0.0 192.168.255.1
03-31-2022 03:22 AM - edited 03-31-2022 04:40 AM
Your are mix many misconfig lead to not work,
PC-SW broadcast
interface FastEthernet0/1
Description For DHCP Endpoints
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface vlan 10 <- L3
ip address 192.168.10.X 255.255.255.0
ip helper-address 192.168.255.3
!
SW-R unicast
interface GigabitEthernet0/1
no switchport
ip address 192.168.30.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.30.2
!
ip routing
Last thing
IN DHCP Router
You need ip route for LAN
ip route 192.168.10.0 255.255.255.0 192.168.225.1
May be need ip route in R
ip route 192.168.10.0 255.255.255.0 192.168.30.1
Do show ip route in each l3 device check reachability
DONE
03-31-2022 06:18 AM
Hello
@Kenneth Goh wrote:
Changes done and not working, can still ping from the switch to DHCP router 192.168.255.3. I think ip helper should point to DHCP server 192.168.255.3.
Correct thst was typo on my part, infact your shouldnt really need the helper as the router has a direct connection the dhcp server.
however I notice on the switch you are tagging the hosts to vlan 10
try the following :
interface FastEthernet0/1
Description For DHCP Endpoints
no switchport access vlan 10
shut
no shut
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide