03-24-2019 03:22 PM - edited 03-25-2019 04:47 AM
Hi guys
I am new to Cisco switching and i need some help. I have 3 vlans och 2 switches. Switch 1 has vlan 10 and vlan 20 configured on it and switch 2 has vlan 30 on it. I configured router on stick with dhcp and everything is good between the vlans and dhcp. My problem right now is that, i have a PC on the switch 2 which is in the default vlan 1. I would like to know how i can configure that pc so that it will get an ip address from the dhcp pool from the dhcp router.
Solved! Go to Solution.
03-25-2019 02:28 AM
Hi,
As VLAN 1 is not configured on Router. As both switches are working in L2 mode so you have to configure new VLAN 1 on the Router and configure DHCP pool for the VLAN 1. Same like you had configured VLAN 10 or 20.
Regards,
Deepak Kumar
03-25-2019 03:08 AM - last edited on 01-19-2023 04:44 AM by Translator
Hello,
in addition to Deepak's post, and wihout wanting to be redundant, you (obviously) also need a subinterface for the native Vlan. So the entire thing would look like this:
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool Vlan1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
!
interface GigabitEthernet0/0.1
encapsulation dot1q 1 native
ip address 192.168.1.1 255.255.255.0
03-25-2019 04:02 AM - last edited on 01-19-2023 04:46 AM by Translator
Hello
An alternative to creating a additional
sub-interface
which isn't necessarily required for vlan 1
int gig0/0
ip address 192.168.1.1 255.255.255.224
exit
ip dhcp pool vlan 1
network 192.168.1.0 /26
default-router 192.168.1.1
03-25-2019 02:28 AM
Hi,
As VLAN 1 is not configured on Router. As both switches are working in L2 mode so you have to configure new VLAN 1 on the Router and configure DHCP pool for the VLAN 1. Same like you had configured VLAN 10 or 20.
Regards,
Deepak Kumar
03-25-2019 03:08 AM - last edited on 01-19-2023 04:44 AM by Translator
Hello,
in addition to Deepak's post, and wihout wanting to be redundant, you (obviously) also need a subinterface for the native Vlan. So the entire thing would look like this:
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool Vlan1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
!
interface GigabitEthernet0/0.1
encapsulation dot1q 1 native
ip address 192.168.1.1 255.255.255.0
03-25-2019 09:48 AM
Thanks everyone.. It was helpful and i was able to fix it.
03-25-2019 04:02 AM - last edited on 01-19-2023 04:46 AM by Translator
Hello
An alternative to creating a additional
sub-interface
which isn't necessarily required for vlan 1
int gig0/0
ip address 192.168.1.1 255.255.255.224
exit
ip dhcp pool vlan 1
network 192.168.1.0 /26
default-router 192.168.1.1
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