Thursday, June 25, 2015

Diffrence between Defaut route and Static route

Difference between default route and static route. As I have explain default route little bit in previous post.
I can differentiate between these two by two specific point.
1> Default route says match anything. Means match all those route with no specific route define in routing table.
You can point gateway as a exit interface or next hope.
#ip route 0.0.0.0 0.0.0.0 eth0
# ip route 0.0.0.0 0.0.0.0 1.1.1.1
2> default route can be installed manually or can inserted dynamically by dynamic routing protocols like RIP,OSPF,BGP...
By default AD of default route is 255, which means least specific route.

1> static route is route pointing to specific remote network. Doesn't care for those unattended routes.
2> it's can not be inserted automatically, Admin must need to insert manually and exit gateway could be exit interface or next hope ip address. If you use exit interface then AD would be 0, that means most specific route. If you use next hope ip address as gateway then AD would be 1, means second most specific route.
Note: AD of both default route and static route can defined accordingly as per need of network design.
# 10.0.0.0 255.0.0.0 eth0
# 10.0.0.0 255.0.0.0 2.2.2.2

1 comment: