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
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,
Best Answer
Friend use configuration as below as you should have be sound basic knowledge
on router
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
it's working