03-04-2013 01:48 PM - edited 03-07-2019 12:03 PM
I'm planning to change my LAN's gateway of last resort to a new IP address. When I type "set ip route 0.0.0.0 0.0.0.0 192.168.1.1" will it replace or overwrite the old value immediately, or does the old value need removed first? Also, are there any caveats I should watch out for when making such a change? Thanks.
03-04-2013 03:30 PM
What device and IOS version are you using?
03-04-2013 04:17 PM
It's s 4506 running ipbase 12.2.54.
03-04-2013 05:06 PM
Then the command is "IP route 0.0.0.0 0.0.0.0 192.168.1.1" you shouldn't have to negate the other route but after you configure the new one do a "show run | include route " to check if it overwrote the existing route.
03-05-2013 09:15 AM
to verify your actual gateway, you can also do a "show ip route" and check for the line that begins with "
Gateway of last resort is"
03-22-2013 10:34 AM
It will add it as a redundant route. You'll need to remove the old one. Here's a simple example:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#ip route 0.0.0.0 0.0.0.0 192.168.1.5
Router(config)#do sh ip route
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 192.168.1.5 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.5
Router(config)#
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.6
Router(config)#
Router(config)#do sh ip route
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 192.168.1.6 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.6
[1/0] via 192.168.1.5
Router(config)#
04-03-2013 11:30 PM
Hi,
You have to remove your old 'ip route' command, else it will add both the routes in routing table if next hope is reachable and will most probably send all the traffic from the interface having lowest interface number.
Like if two default routes are there from S0/0 and S0/1, mostly it will send all the traffic from S0/0. You can verify that, I am not sure about it, but in my test scenerio it works like that.
04-04-2013 05:57 AM
Hi,
if the old route is not deleted then both routes will get installed indeed and the device will do per src-dst load-sharing by default as traffic is CEF switched( transit traffic).traffic from or destined to the device will be processed switched so load-shared per-packet.
Regards
Alain
Don't forget to rate helpful posts.
06-02-2013 09:15 PM
The both route will be added in routing table if you not remove the older one and router will do the load sharing on these routes beacuse ecach will have the same AD value.
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