06-11-2009 02:35 AM - edited 03-06-2019 06:12 AM
Hi all, If I want to point a host route out of say fa 0/1 but there is an interface on the router say fa 0/2 that is ion the same subnet as the host, will the static route pointing out fa 0/1 still work?
06-11-2009 02:50 AM
Hi Carl,
Absolutely and this route will take precedence for this particular host as it is more specific.
Regards
06-11-2009 05:14 AM
does this still stand true even if there is an interface directly connected on that subnet? will the route still work ?
06-11-2009 06:52 AM
HI,
Yes it will work for that specific host.
Thanks
Mahmood
06-11-2009 07:26 AM
could I do this for the whole/24 network then, I thought the AD of the connected interface would overide the static route?
please advise
06-11-2009 07:29 AM
Hi
The router choosess the route which is more specific i.e on longest-prefix matching so if u take /24 mask and /32 mask /32 is more prefered.
Thanks
Mahmood
06-11-2009 07:41 AM
hi there
I understand that but, I wanted to know if I had a connected interface with a subnet on, could I then point this subent somewhere else using a static route, or would it always go out of the connected interface ?
06-12-2009 05:05 AM
hi there
can anyone help on this?
cheers
06-12-2009 09:04 AM
Hi
It would go out the connected interface.
Thanks
Mahmood
06-12-2009 09:13 AM
Are you asking to bridge the networks or are these two distinct segments with overlapping IP space?
06-15-2009 02:26 AM
hi there
I mean, I have a router with 2 interfaces, say one interface on 192.168.1.1/24 ann the other on 10.1.1.1/24, if I point a static route say 192.168.1.0/24 through the 10.1.1.1 interface woult this work? if not I guess it would allow a host or further subnetted route as its a longer match, please help
cheers
06-15-2009 07:51 AM
The route would function as a floated static.
06-15-2009 10:52 AM
Hai Friends, this topic is going for a long... lets put an end to it..
It will give preferance to the connected interface. Please find the below, output form my test router..
Router#sh ip
*Mar 1 00:47:09.055: %SYS-5-CONFIG_I: Configured from console by consoleroute
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 100.100.100.1 to network 0.0.0.0
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
100.0.0.0/30 is subnetted, 1 subnets
C 100.100.100.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 100.100.100.1
Router#
Router#
Router#sh run | in ip route
ip route 0.0.0.0 0.0.0.0 100.100.100.1
ip route 1.1.1.1 255.255.255.255 100.100.100.1
ip route 100.100.100.2 255.255.255.255 100.100.100.1
I have configured static route for loopback0 and fast ethernet interface IP addresses.. But in the routing table it will shows only the connected one..
Hope this clear the doubts..
thanks
Sudheesh
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