02-16-2017 06:13 AM - edited 03-08-2019 09:22 AM
I have this network setup (pic below) in packet tracer and the last client [PC3] can't access any other part of the network, the other 2 are receiving DHCP and can ping.
My configuration is this:
R1:
en
conf t
int g0/0.1
enc dot 10
ip add 192.168.1.1 255.255.255.0
exit
int g0/0.2
enc dot 20
ip add 192.168.2.1 255.255.255.0
exit
int g0/0.3
enc dot 30
ip add 192.168.3.1 255.255.255.0
exit
ip route 192.168.1.0 255.255.255.0 g0/0.1 1
ip route 192.168.2.0 255.255.255.0 g0/0.2 1
ip route 192.168.3.0 255.255.255.0 g0/0.3 1
ip dhcp pool Net10
net 192.168.1.0 255.255.255.0
def 192.168.1.1
exit
ip dhcp pool Net20
net 192.168.2.0 255.255.255.0
def 192.168.2.1
exit
ip dhcp pool Net30
net 192.168.3.0 255.255.255.0
def 192.168.3.1
end
wr mem
SW1:
en
conf t
int g0/1
sw mode trunk
sw trunk all vlan 10,20,30
exit
int g0/2
sw mode trunk
sw trunk all vlan 10,20,30
exit
int fa0/1
sw mode acc
sw acc vlan 10
end
wr mem
SW2:
en
conf t
int g0/1
sw mode trunk
sw trunk all vlan 10,20,30
exit
int g0/2
sw mode trunk
sw tr al vlan 10,20,30
exit
int fa0/1
sw mode ac
sw ac vlan 20
end
wr mem
SW3:
en
conf t
int g0/2
sw mode trunk
sw trunk all vlan 10,20,30
exit
int g0/2
sw mode trunk
sw tr al vlan 10,20,30
exit
int fa0/1
sw mode ac
sw ac vlan 30
end
wr mem
If anyone could tell me what is wrong with this and explain to me why, I would be thankful.
Solved! Go to Solution.
02-16-2017 07:20 AM
Hi
Have you created the vlans on the switches? Also is good practice to exclude the gateway address, using the following command:
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.2.1
ip dhcp excluded-address 192.168.3.1
Also this config is not required, because the router knows its subnets connected directly.
ip route 192.168.1.0 255.255.255.0 g0/0.1 1
ip route 192.168.2.0 255.255.255.0 g0/0.2 1
ip route 192.168.3.0 255.255.255.0 g0/0.3 1
02-16-2017 07:20 AM
Hi
Have you created the vlans on the switches? Also is good practice to exclude the gateway address, using the following command:
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.2.1
ip dhcp excluded-address 192.168.3.1
Also this config is not required, because the router knows its subnets connected directly.
ip route 192.168.1.0 255.255.255.0 g0/0.1 1
ip route 192.168.2.0 255.255.255.0 g0/0.2 1
ip route 192.168.3.0 255.255.255.0 g0/0.3 1
02-16-2017 11:48 AM
I guess just entering the vlan 10, vlan 20, vlan 30 on each switch fixed it.
Thank you.
02-16-2017 12:10 PM
You are welcome, have a great day!
Thank you
02-16-2017 07:32 AM
Hi
You don't need the static routes. Router will handle itself has he knows all subnets:
ip route 192.168.1.0 255.255.255.0 g0/0.1 1
ip route 192.168.2.0 255.255.255.0 g0/0.2 1
ip route 192.168.3.0 255.255.255.0 g0/0.3 1
Did you excluded all default-router IP for all subnets on your DHCP config?
Does PC3 gets its DHCP IP ?
Thanks
PS: Please don't forget to rate and mark as correct answer if this answered your question
02-16-2017 11:46 AM
PC1 and PC2 do get the DHCP IP, but PC3 doesn't
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