03-25-2020 12:56 AM
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
03-25-2020 01:30 AM
- 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.
03-25-2020 01:53 AM
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?
03-25-2020 02:54 AM
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.
03-25-2020 09:09 AM
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.
03-25-2020 06:30 PM
This is a vlan mode access - interface. and will be using the route via vlan. Thanks!
03-26-2020 07:34 AM
You are welcome.
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