cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1616
Views
8
Helpful
5
Replies

host routes on layer-2 switch not using default-gateway

phil_carter
Level 1
Level 1

Hello,

I have a standard base imaged layer-2 switch that has a default gateway configured (no ip routing), but host routes seem to be learning a different next-hop address (which is a firewall interface):

SLHC3551#sh ip def
172.21.64.254
SLHC3551#
SLHC3551#sh ip ro
Default gateway is 172.21.64.254

Host               Gateway           Last Use    Total Uses  Interface
10.2.0.4           172.21.64.240         0:00        121299  Vlan160
192.168.100.3      172.21.64.240         0:00      18992285  Vlan160
172.21.84.2        172.21.64.240         0:26         12409  Vlan160
172.17.23.69       172.21.64.240         0:00       1022512  Vlan160

Model: WS-C3560-24TS

IOS: c3560-ipbase-mz.122-25.SEE3

Can someone please explain how this is learning this next-hop IP (,240)?

Thanks

Phil

5 Replies 5

andrew.prince
Level 10
Level 10

Sounds like the device 172.21.64.254 has "ip redirects" enabled - check and remove.

HTH>

Already looked at redirects.... the SVI for the default-gateway has redirects turned off....

interface Vlan160
description Interface for subnet PRO 0
ip address 172.21.64.250 255.255.255.0
no ip redirects

standby 3 ip 172.21.64.254
standby 3 priority 140
standby 3 preempt

...and on the switch management IP interface as well...

interface Vlan160
ip address 172.21.64.245 255.255.255.0
no ip redirects

SLHC3551#sh ip redirects
Default gateway is 172.21.64.254

Host               Gateway           Last Use    Total Uses  Interface
10.2.0.4           172.21.64.240         0:00        121407  Vlan160
192.168.100.3      172.21.64.240         0:00      18995779  Vlan160
172.21.84.2        172.21.64.240         1:09         12409  Vlan160
172.17.23.69       172.21.64.240         0:00       1022594  Vlan160

...but it still redirects traffic... is there another command I'm missing?

Hi,

172.21.64.240 is sending ICMP redirects so this is on this device where you must disable ip redirects otherwise on your device you could configure an access-list denying the ICMP redirects.

Regards.

Alain.

Don't forget to rate helpful posts.

jsumrall2003
Level 1
Level 1

Just came across this post and thought if anyone out there was still searching for this answer, it'd be helpful to know the answer.

For my 2960XR's, I had to go into global config and issue a 'no ip host-routing' in order for the host routes to clear out.

Thanks, it helped me to resolve the problem.