0

I am currently building a network and would like my two switches connected to my router to automatically assign ip addresses through DHCP pools to my PC's and devices. I have 4 separate VLans being VLan 10 20 30 and 99. I believe I have set up pools correctly on my router but when I implement it, no device receives the pool'd ip and I get an "DHCP Failed APIPA is being used" My switches have the same configs because I'm just using them for redundancy purposes, I have no other protocols running currently as this is one of the earlier steps I am stuck on, all I have done is create and named the VLANS and created the pools.

This is my routers dhcp config

ip dhcp pool VOIP
 network 192.168.100.0 255.255.255.0
 default-router 192.168.10.254
ip dhcp pool Instructor
 network 192.168.20.0 255.255.255.0
 default-router 192.168.20.254
ip dhcp pool Student
 network 192.168.30.0 255.255.255.0
 default-router 192.168.30.254
ip dhcp pool Management
 network 192.168.99.0 255.255.255.0
 default-router 192.168.99.254


interface GigabitEthernet0/0


description Link to S1
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.254 255.255.255.0
!
interface GigabitEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.20.254 255.255.255.0
!
interface GigabitEthernet0/0.30
 encapsulation dot1Q 30
 ip address 192.168.30.254 255.255.255.0
!
interface GigabitEthernet0/0.99
 encapsulation dot1Q 99
 ip address 192.168.99.254 255.255.255.0

I had the second switch configured originally in this too, but after the error I deleted the configs for g0/1 and decided to fix g0/0 first

This is my Switch 1

1    default                          active    
10   VOIP                             active    Fa0/21
20   Instructor                       active    Gig0/2
30   Student                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
99   Management                       active    Fa0/22, Gig0/1
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active 

This is my Switch 2

1    default                          active    
10   VOIP                             active    Fa0/21
20   Instructor                       active    Gig0/2
30   Student                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
99   Management                       active    Fa0/22, Gig0/1
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active 

This is the topology of the router and two switches

enter image description here

2
  • Please, never use images for text. Simply copy the text and paste it into the question using the Preformatted-text option ({}).
    – Ron Maupin
    Mar 27, 2020 at 0:41
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Dec 17, 2020 at 16:30

2 Answers 2

1

I cannot copy and paste your mistake because you used an image instead of text.

Your VoIP DHCP pool has the network as 192.168.100.0/24, but the gateway is on a different network, 192.168.10.0/24. That will not work. The gateway must be on the same network as the hosts, otherwise the hosts need a gateway to reach the gateway, and it simply does not work that way. Also, you do not seem to have an interface configured for the DHCP network.

Another problem you have is that the switch does not seem to have a trunk interface connected to the router. You did not include the switch configuration, so I do not know if you tried to do that. There is a description command that you should use on the interfaces that you can use to put in something like description Connection to switch 1 interface G0/1, and that helps a lot in trouble shooting because you can use CDP to make sure you have correctly connected everything. In any case, the switch will not get traffic from the router for anything but the default VLAN unless you configured a trunk between the switch and router.

By the way, the router cannot have two interfaces with the same network. You will get an error about overlapping networks if you try to configure that, so your drawing will have a problem.


If you want help to solve your problems, you really need to include all the configurations from all the devices.

0

Your configuration seems to be correct but make few changes accordinglly

In router

interface ethernet g0/0

#no ip address

# no shutdown

And ensure switch interfàce connectiing connecting router and L2 switch should be trunk to ensure passing all vlan traffic from router to switches.

1
  • 1
    #Sagar Look again at his voip pool his network Id as pointed out by #Ron is not in line with his Default-router setting. They are not in the same vlan
    – Angel Gd
    Sep 24, 2020 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.