routing

Unanswered Question
Jun 11th, 2009
User Badges:

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Harold Ritter Thu, 06/11/2009 - 02:50
User Badges:
  • Cisco Employee,

Hi Carl,


Absolutely and this route will take precedence for this particular host as it is more specific.


Regards

carl_townshend Thu, 06/11/2009 - 05:14
User Badges:

does this still stand true even if there is an interface directly connected on that subnet? will the route still work ?

mahmoodmkl Thu, 06/11/2009 - 06:52
User Badges:
  • Gold, 750 points or more

HI,


Yes it will work for that specific host.


Thanks

Mahmood

carl_townshend Thu, 06/11/2009 - 07:26
User Badges:

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

mahmoodmkl Thu, 06/11/2009 - 07:29
User Badges:
  • Gold, 750 points or more

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

carl_townshend Thu, 06/11/2009 - 07:41
User Badges:

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 ?

mahmoodmkl Fri, 06/12/2009 - 09:04
User Badges:
  • Gold, 750 points or more

Hi


It would go out the connected interface.


Thanks

Mahmood

leekleybm Fri, 06/12/2009 - 09:13
User Badges:

Are you asking to bridge the networks or are these two distinct segments with overlapping IP space?

carl_townshend Mon, 06/15/2009 - 02:26
User Badges:

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

sudheesh.pb Mon, 06/15/2009 - 10:52
User Badges:

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


Actions

This Discussion