7

I'm testing a network and I use the vlan among 20 vlan but in this packet tracer I just use 10 Vlan on my network,

In this case, I use the DHCP server on my multilayer switch, not on my router.

so on the port on multilayer swith to switch layer 2 I use:

switchport trunk encapsulation dot1q
switchport mode trunk

for the DHCP server on multilayer switch I use:

ip dhcp pool vlan1
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1

and the same for other vlan.

I have add the vlan and the IP address like on the picture

enter image description here

but when I config on the all switch layer 2,

on fa0/1 who connected to multilayerswitch I use:

switchport mode trunk

and port fa0/2-3 who connected to PC I use:

switchport mode access
switchport access vlan <VLANID>
! VLANID == VLAN for respective switch

But there's some thing weird,

On VLAN 1 and 2 it's almost connected and get the dhcp ip success but on the other PC I cannot get the DHCP IP it's remarks "dhcp failed. apipa is being used"

please help,

  • maybe u can attach .pkt please, – user16524 Jul 11 '15 at 15:04
  • Did you configure VTP or add the VLANs to all the L2 switches? Run the following command on one of the L2 switches where it isn't working and edit it into the question: sh interface trunk – YLearn Nov 9 '15 at 23:36
  • Try packet tracers simulation mode. – IsAGuest Feb 8 '16 at 7:19
  • i faced the same issue with my lab, the problem it was the VLAN interfaces in the L3 switch, after that everything were working perfectly. thank you guys for your comments they were very useful. – user31128 Oct 9 '16 at 13:19
  • I should check a few things:<br/> <br/> - if the access port are belongs to the desired vlan on L2 Switch<br/> - if the desired VLANs are present on L2 Switch<br/> - if the VLANs are allowed on trunk interface<br/> - if the SVI's are up on Multilayer Switch<br/> - and then fainally the DHCP pools<br/> <br/> let me know – cost Jan 9 '17 at 0:42
1

Friend use configuration as below as you should have be sound basic knowledge

on router

Lab-R1> ena

Lab-R1# config t

Lab-R1(config)# ip dhcp pool myLAN

Lab-R1(dhcp-config)# network 192.168.0.0 255.255.255.0

Lab-R1(dhcp-config)# domain-name mydomain.lan

Lab-R1(dhcp-config)# default-router 192.168.0.1

Lab-R1(dhcp-config)# dns-server 192.168.0.2

Lab-R1(dhcp-config)# exit

Lab-R1(config)# ip dhcp excluded-address 192.168.0.1 192.168.0.120

at L2 sw

create vlan as 1 to 20 everyone have ip address with in same range as specified in router with each vlan have four ip address

int vlan 1
ip address  192.168.0.5 255.255.255.0

int vlan 2
ip address  192.168.0.10 255.255.255.0

.
..
..
.
.

int vlan 20 ip address  192.168.0.100 255.255.255.0

it's working

0

See i made a similar topology and uploaded to drive.

The ports connecting from to L3-sw to L2-sw and L2-sw to L3-sw both need to be trunked to carry all the vlans.

And the port connecting to pc should be access and assigned to the vlan you want.

Also create both the vlans on L3-sw along with the interfaces for those vlans.

If you want inter-vlan routing then also enable:

conf t 
ip routing
0

You should check a few things:

  • if the access port are belongs to the desired vlan on L2 Switch
  • if the desired VLANs are present on L2 Switch
  • if the VLANs are allowed on trunk interface
  • if the SVI's are up on Multilayer Switch
  • and then fainally the DHCP pools

If you have any other problem please attach the show running-config of the Multilayer Switch

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