Would like to get assistance on the following issue that i'm currently facing.
I have the setup as follows:
Internet --------------> Router --------------------> SWitch ---------------> Hosts
Router is acting as the default gateway and has an address of 10.10.192.1/21
Behind the router i have 6 switches and behing each switch I have hosts and the switch is acting as a dhcp server for the hosts.
on the switches i have the following configuration:
ip dhcp pool 1
network 10.10.193.0 255.255.255.0
default router 10.10.192.1
int vlan 1
ip add 10.10.193.1 255.255.255.0
The hosts receives the ip from via dhcp but unable to ping the default gateway 10.10.192.1 ??
Am i missing something here?
Hosts need to have default gateway in same subnet as their ip. So I guess it should be 10.10.193.1. Becuase end host will send ARP broadcasts to resolve default gateway ip to MAC address. Those broadcasts local to subnet and will never reach router.
So you need to change default GW to 10.10.193.1 and configure routing on siwtch to route traffic sent to internet to 10.10.192.1 towards your router.
Thanks Nikolay. That perfectly makes sense from the default-route configuraiton on the ip dhcp pool.
Would adding a static route on the switch help?
ip route 0.0.0.0 0.0.0.0 10.10.192.1? I guess the default-gateway also does the same job?
Message was edited by: Vijay Swaminathan
Router and switch are connected back to back.
Router (10.10.192.1/21) connected to switch (10.10.194.1/24)
so since 10.10.194.1/24 is a subnet inside the network 10.10.192.1/21 I guess it should not be a problem for the router to reach this..
my concern is how does switch reach router?
please advice if I'm incorrect.
Can you please check the reachability of the router IP "10.10.192.1" from the switch. It seems like since the switch output port ( i assume the port is confgured as a L3 port ) is in a "/24" subnet it may not see "10.10.192.1"
we may need to
- either make both these interfaces on the same subnet ( so switch interface can see the router subnet )
- Configure a static route to the router IP as going via the switch interface
"ip route 10.10.192.1 255.255.255.255
Kindly let me know if I'm missing something.
I have configured a SVI on the switch with an address 10.10.194.1 with the same mask /21, i'm able to ping the default gateway 10.10.192.1. However i was unable to reach internet .
I had ip default-gateway 10.10.192.1 configured but that did not work. when I configured a static route on the switch then that worked
I still don;'t know why the "ip default-gateway 10.10.192.1" didn't work
Can you please paste the config ( with the dafault-gateway configuration ) which is failing
Thanks and Regards,