0

I have the following network on Packet Tracer. The hosts are in different vlans each one. My goal is that the DHCP server can give IP to the hosts.

enter image description here

Here is what I made for each vlan (the example is for vlan 10) :

Switch(config)#int vlan 10

Switch(config-if)# ip add 192.168.11.1 255.255.255.0

Switch(config-if)# no shut

Switch(config-if)# ip helper-add 192.168.10.254

Then I created one pool for each vlan in the DHCP server, whereby the default gateway for each vlan is the IP that I just assigned to the vlan. The static IP for the DHCP server is 192.168.10.254 (ICDR \24). However it's not working. Can you give me a hint on how I can make it work? Thanks.

EDIT :

Here is the startup-configuration of the switch:

version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW
!
!
!
no ip domain-lookup
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!

    interface FastEthernet0/1

!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/6
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/7
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/8
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/9
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/10
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/11
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/12
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/13
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/14
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/15
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/16
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/17
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/18
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/19
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/20
 switchport access vlan 40
 switchport mode access
!
interface FastEthernet0/21
 switchport access vlan 40
 switchport mode access
!
interface FastEthernet0/22
 switchport access vlan 40
 switchport mode access
!
interface FastEthernet0/23
 switchport access vlan 40
 switchport mode access
!
interface FastEthernet0/24
 switchport access vlan 40
 switchport mode access
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan10
 ip address 192.168.11.1 255.255.255.0
 ip helper-address 192.168.10.254
!
interface Vlan20
 ip address 192.168.12.1 255.255.255.0
 ip helper-address 192.168.10.254
!
interface Vlan30
 ip address 192.168.13.1 255.255.255.0
 ip helper-address 192.168.10.254
!
interface Vlan40
 ip address 192.168.14.1 255.255.255.0
 ip helper-address 192.168.10.254
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
!
end
3
  • 2
    Please edit the quyestion to include the switch configuration. We cannot guess at it, and you may or may not be able to do this, depending on the switch configuration.
    – Ron Maupin
    Oct 25, 2021 at 20:18
  • 1
    That switch is only running layer-2, so you cannot do that. You either need a router or a switch configured for layer-3 routing.
    – Ron Maupin
    Oct 25, 2021 at 20:55
  • 1
    As the switch is allowing multiply SVIs to be admin-up, it's in layer-3 mode. A layer-2 switch will only ever allow a single SVI to be enabled for management. (and there isn't a no ip routing command)
    – Ricky
    Oct 26, 2021 at 4:35

1 Answer 1

4

There are at least two things wrong.

First, although your diagram shows the DHCP server, you don’t have any interface on 192.168.10.0/24 network. So how can your switch send traffic to the server?

Second, your switch is a layer 2 device, so it can’t route traffic between networks. You need a layer 3 switch or router to do that.

2
  • 2
    Bingo. Where's the DHCP server? And does it have a route back to those networks?
    – Ricky
    Oct 26, 2021 at 4:36
  • 1
    Not sure about Cisco switches, but there are L2 switches that are very well capable of DHCP relaying (e.g. Aruba 2530 series). Also, routing might be enabled as default for an L3 switch.
    – Zac67
    Oct 26, 2021 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy