cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3190
Views
0
Helpful
5
Replies

Possible to force switch to use static routes over directly connected?

not-a-bot
Level 1
Level 1

I was wondering if its possible to force a switch to use a static route over a directly connected route?

5 Replies 5

vipinrajrc
Level 3
Level 3

Hi,

Yes you can

Please give two seperate Administrative distance for the static routes. This will automatically switch static route if the one is going down.

thanks

Vipin

Thanks and Regards, Vipin

Arun Nair
Level 1
Level 1

Yo, sure David. But only host routes (/32) do have the power to do that....

manju.cisco
Level 3
Level 3

Hi David,

@Arun, -------- are you sure you can do for /32 routes??? I doubt it, can you pls expalin little more clear how to do please, Is it by redistribution into routing protocols???

As per my understanding we cannot do for /32 routes, but for non /32 routes we CAN do.

I would require you help to understand a bit more.

@David,

Yes, you can do it.........but with little cheating and precaution and also its limited

Assume you have a connected interface (Gig 1/0) with subnet 1.1.1.0/24 and you want static route to get preferred for the same network.

All is to do is, for the network configure 2 static routes like below

----------------------------

ip route 1.1.1.0 255.255.255.128 gig1/0   -----(or your any other preferred exit point)

ip route 1.1.1.128 255.255.255.128 gig1/0    ---- (or your any other preferred exit point)

----------------------------

#sh ip route 1.1.1.1

Routing entry for 1.1.1.0/25

  Known via "static", distance 1, metric 0 (connected)  <---- learnt by static route

  Routing Descriptor Blocks:

  * directly connected, via GigabitEthernet1/0

      Route metric is 0, traffic share count is 1

#sh ip route 1.1.1.0

Routing entry for 1.1.1.0/25

  Known via "static", distance 1, metric 0 (connected)

  Routing Descriptor Blocks:

  * directly connected, via GigabitEthernet1/0

      Route metric is 0, traffic share count is 1

#sh ip route 1.1.1.150

Routing entry for 1.1.1.128/25

Known via "static", distance 1, metric 0 (connected)

  Routing Descriptor Blocks:

  * directly connected, via GigabitEthernet1/0

      Route metric is 0, traffic share count is 1

Hope this helps.

Thanks.

By the way, why are you looking to force a switch to use static routes over directly connected???

Yennjoyyyyy!!

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml

Just make sure you send it through the interface rather than specifying a next hop.

Thanks, I will try that. The reason I am trying to do this is because I have to migrate users from one switch to behind a FWSM. Normally if it was another switch I can set up HSRP on both switches and have a seamless migration.

A simplic view of my current topology is:

access switches <--trunk--> OLD 4500

                         <--trunk--> 6500/FWSM

Currently my switches are connected to an old 4500 with multiple SVIs. I was planning on dual connecting the access switches to my new 6500 and creating the SVIs on the FWSM. For the transition, I was thinking about having the same SVIs on both the 4500 and FWSM. For example both will have "int vlan 100" w/ different IP addresses and there will be a point to point link between the two switches for routing. I was going to change the DHCP settings to use the FWSM as the gateway once the workstation lease expires.

This is the problem I ran into. For example some VLAN 100 workstations renew their lease and use the FWSM as the gateway. They are trying to assess VLAN 150 still on the 4500. For example user VLAN 100, will go to the FWSM, out the outside interface to the 4500. Then the return traffic will not make it back because the 4500 will also have VLAN 100 and it is directly connected. The 4500 will do intervlan routing and never send anything to the FWSM.

But after thinking about this some more, I dont think this will work. Any ideas how I can do this with as little downtime as possible? Right now my new plan would be to just shutdown the SVI on the 4500 and turn on the SVI on the FWSM using the same IP address, so no need for DHCP leases, etc.. But this will cause downtime, even though it should be a few seconds.

Any thoughts or ideas would be appreciated.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card