cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
235
Views
0
Helpful
4
Replies

DHCP not working

Amills
Level 1
Level 1

I have an ISR4321 router and a 2960x switch. I setup a super basic config, with DHCP. My laptop never gets an IP address. Static works fine to get to the internet.

ISR4321/K9 running 16.09.04

!
hostname Test-Router


ip name-server 8.8.8.8 1.1.1.1
ip dhcp excluded-address 10.0.1.65
ip dhcp excluded-address 10.0.1.225
ip dhcp excluded-address 10.0.1.2 10.10.1.11
!
ip dhcp pool USERS-1
network 10.0.1.0 255.255.255.0
default-router 10.0.1.1
domain-name test.com
dns-server 1.1.1.1 8.8.8.8
!

!

 

!
interface GigabitEthernet0/0/0.1
description Network
encapsulation dot1Q 1 native
ip address 10.0.1.1 255.255.255.0
ip nat inside
!
interface GigabitEthernet0/0/1
description ISP
ip address dhcp
ip nat outside
negotiation auto
!
ip nat inside source list 42 interface GigabitEthernet0/0/1 overload
ip route 0.0.0.0 0.0.0.0 dhcp
!
ip ssh authentication-retries 5
ip ssh version 2
!

access-list 12 permit 10.0.1.0 0.0.0.255
access-list 42 permit 10.0.1.0 0.0.0.255
access-list 55 permit 10.0.1.0 0.0.0.255

!

line con 0
transport input none
stopbits 1
line aux 0
stopbits 1
line vty 0 4
access-class 12 in
exec-timeout 5 0
logging synchronous
login local
transport input telnet ssh
!
!
!
!
!
!##############################################################

switch config

#################################


hostname Switch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
switch 1 provision ws-c2960xr-48fps-i
system mtu routing 1500
!

!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
!
!
interface GigabitEthernet1/0/1
switchport mode trunk
!
interface GigabitEthernet1/0/2
switchport mode access
!
...
!
interface GigabitEthernet1/0/48
switchport mode access
!

!
interface Vlan1
ip address 10.0.1.225 255.255.255.0
!
ip default-gateway 10.0.1.1

!
!
line con 0
line vty 5 15
!
end

 

1 Accepted Solution

Accepted Solutions

Glad that you got it to work. I looked at the posted config and see why your PC was not able to get an IP address using DHCP. The config had this

ip dhcp excluded-address 10.0.1.2 10.10.1.11

This excludes every address in 10.0.1.x other than the router address. So this issue is pretty much self inflicted.

HTH

Rick

View solution in original post

4 Replies 4

Amills
Level 1
Level 1

So, I blasted the router config away, reloaded, entered in each command manually instead loading it from a backup config file or copy and paste from a notepad.  Now it works. Man, these ISR4321 routers frustrating. Lots of little issues with these guys.

Glad that you got it to work. I looked at the posted config and see why your PC was not able to get an IP address using DHCP. The config had this

ip dhcp excluded-address 10.0.1.2 10.10.1.11

This excludes every address in 10.0.1.x other than the router address. So this issue is pretty much self inflicted.

HTH

Rick

Amills
Level 1
Level 1

That would explain when I entered the config manually line by line it worked. Too much tunnel vision to see the issue, the joys of working alone, thank you for that eagle eyed catch.

You are quite welcome. I have spent enough time working alone to appreciate what you say. It is one of the reasons why I find this community so valuable. Hope you will continue to be active in the community. 

HTH

Rick

Review Cisco Networking for a $25 gift card