A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

July 7, 2009

Kernel Routing Table - Interface specific routes

I have a question on kernel routing table. It will be great if any of you can throw some light on this topic

In general, whenever an inteface is brought to 'up' state, an interface route comes up. for ex. If eth0 with Ip address is brought up, the following route is created by default
" U 0 0 0 eth0"
After this route is created, if i try to add the same route manually, with the following command, the same route gets added again.
"route add -net netmask dev eth0"
I do not see any difference in both of these routes when i verified with 'route -n' or 'netstat -r' or 'cat /proc/net/route'. How is this possible?
In general, at any point of time, you cannot have two same entries in the kernel routing table. Can any of the linux expert help me with this question??


Click Here!