cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
903
Views
0
Helpful
6
Replies

static routing ip route via vlan or interface is better?

getaway51
Level 2
Level 2

Hi

 

May i know which is better? One is using vlan, the other is interface.

Personally i think interface is better because once gi0/0/1 is up, the static route will be activated. The route shld not active unless the interface is UP. This is the objective. As i know, vlan is always UP once configured.  

Is my assumption correct?

ip route 172.30.0.0 255.255.0.0 vlan300 10.1.1.1

ip route 172.30.0.0 255.255.0.0 gi0/0/1 10.1.1.1

6 Replies 6

marce1000
VIP
VIP

 

 - It depends on the situation, for instance on an ISP-link  you sometimes only have one outgoing routed port and no 'ongoing' vlans.  You then route via an interface to provide internet access for your intrAnet (basically).

 M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

Hi,

 

ip route 172.30.0.0 255.255.0.0 gi0/0/1 10.1.1.1

Can i confirm tht for this cli, ip route only works/activated when gi0/0/1 is UP?

Hi,

 

   Yes, your below statement is correct. For "ip route 172.30.0.0 255.255.0.0 gi0/0/1 10.1.1.1" route is active as long as gi0/0/1 is UP? The scope of adding both next-hop and egress interface to a static route, is to actually create a condition for the next-hop, you're basically telling the router that that specific next-hop is valid ONLY if it's recursively reachable over that specific interface (which implies the interface is UP), otherwise the next-hop is invalid, thus the route invalid.

 

Regards,

Cristian Matei.

Richard Burts
Hall of Fame
Hall of Fame

To provide good answers I believe that we need to understand the context of the question better. What platform is this on? Answer might depend on whether this is a router or a switch. What kind of interface is gi0/0/1? If this is an access port on a switch then static route using vlan is definitely better than using interface. If this is a routed interface then static route using interface is definitely better than using vlan.

HTH

Rick

This is a vlan mode access - interface. and will be using the route via vlan. Thanks!

You are welcome.

HTH

Rick
Review Cisco Networking products for a $25 gift card