- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 08:20 AM
I have a Cisco Catalyst 2960S. I am trying to lab with it. There is nothing but the switch and a laptop. I set up a bare bones config and enabled routing and set up a DHCP server on the switch. I can see that there are DHCPDISCOVER incoming but not requests or offers.
Please let me know if there is an error in my config?
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
service unsupported-transceiver
!
hostname switch-FOC1832W13K
!
boot-start-marker
boot-end-marker
!
!
aaa new-model
!
!
aaa authentication login default local
aaa authentication enable default enable
aaa authorization exec default if-authenticated
!
!
!
aaa session-id common
switch 1 provision ws-c2960s-24ps-l
!
ip dhcp pool fiber
utilization mark high 90 log
network 192.168.120.24 255.255.255.248
default-router 192.168.120.254
dns-server 8.8.8.8
!
!
ip domain-name testdomain.local
vtp domain testing
vtp mode transparent
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
no errdisable detect cause gbic-invalid
!
vlan internal allocation policy ascending
!
vlan 12
!
interface FastEthernet0
ip address dhcp
!
interface GigabitEthernet1/0/1
!
interface GigabitEthernet1/0/2
!
interface GigabitEthernet1/0/3
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
!
interface GigabitEthernet1/0/25
switchport mode trunk
!
interface GigabitEthernet1/0/26
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface Vlan1
ip address 192.168.120.254 255.255.255.0
!
ip http server
ip http secure-server
!
line con 0
line vty 0 4
privilege level 15
transport input ssh
line vty 5 8
privilege level 15
transport input ssh
line vty 9 15
!
end
Solved! Go to Solution.
- Labels:
-
Catalyst 2000
-
LAN Switching
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 08:22 AM
The vlan 1 that must recieve dhcp request have different mask than dhcp pool.
Correct the mask and check
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 08:22 AM
The vlan 1 that must recieve dhcp request have different mask than dhcp pool.
Correct the mask and check
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 08:38 AM
Anyway. I started off without any IP address on the VLAN1 interface, shouldn't that have worked. DHCP broadcast is a layer 2 activity isn't it?
The configuration guide does not state that any IP address is needed on vlan interface(s).
What if I put a 'ip helper-address 192.168.120.254' into the config?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 09:34 AM
The IP need in vlan1 why?
The sw receive broadcast in vlan1 with IP x.x.x.x then it search dhcp pool network that match vlan1 IP subnet.
Without vlan1 ip how sw know which pool will use?
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 11:53 AM
if a dhcp server and a client are on the same L2 segment then dhcp should hear the broadcast and respond. vlan being default and the laptop (client) is in vlan1 then it should be able to negotiate. In my production environment I have a Windows DHCP server 10.1.1.20/16 vlan1 with a pool of 10.1.1.100/24 and clients on vlan 1 get addresses without issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 11:56 AM
I did reconfigure the switch as suggested and it is working. I added an exclusion for the vlan1 address.
I think the documentation for DHCP configuration needs to be changed. It does not include any reference to requiring a vlan interface IP address. Not even on samples with multiple pools and vlans.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 11:57 AM
Here is how my working configuration turned out:
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
service unsupported-transceiver
!
hostname switch-FOC1832W13K
!
boot-start-marker
boot-end-marker
!
!
!
aaa new-model
!
!
aaa authentication login default local
aaa authentication enable default enable
aaa authorization exec default if-authenticated
!
!
!
aaa session-id common
!
switch 1 provision ws-c2960s-24ps-l
!
ip dhcp excluded-address 192.168.120.254
!
ip dhcp pool fiber
utilization mark high 90 log
network 192.168.120.0 255.255.255.0
default-router 192.168.120.254
dns-server 8.8.8.8
!
!
ip domain-name test.local
vtp domain test
vtp mode transparent
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
no errdisable detect cause gbic-invalid
!
vlan internal allocation policy ascending
!
vlan 12
!
!
!
!
interface FastEthernet0
ip address dhcp
!
interface GigabitEthernet1/0/1
!
interface GigabitEthernet1/0/2
!
interface GigabitEthernet1/0/3
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
!
interface GigabitEthernet1/0/25
switchport mode trunk
!
interface GigabitEthernet1/0/26
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface Vlan1
ip address 192.168.120.254 255.255.255.0
!
ip http server
ip http secure-server
!
line con 0
line vty 0 4
privilege level 15
transport input ssh
line vty 5 8
privilege level 15
transport input ssh
line vty 9 15
!
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 03:05 PM
The root of the problem was in your pool definition. You defined the network in your pool as 192.168.120.24 255.255.255.248, but you set the default-router as 192.168.120.254 - which is not on the same network.
If it had worked, your devices would have been stuck on the IP network with no valid gateway to get off of it. In essence, the switch did you a bit of a favor by not handing out an address.
MHM is correct - because the switch can have multiple IP networks on a single L2 (VLAN) interface, and multiple DHCP pools, it's only going to respond to a DHCP Discover request on an L3 interface on the same network as defined in the pool. Your pool had a 29-bit mask, but the interface was a /24. So even though the request is an L2 broadcast and therefore received on the interface, the switch basically ignored it after evaluating things.
At least I think that's what happened
