Operating System - HP-UX
1836617 Members
2080 Online
110102 Solutions
New Discussion

dynamic route add and where it is stored

 
SOLVED
Go to solution
siva baskaran
Regular Advisor

dynamic route add and where it is stored

Dear,
can anyone help to add route(dynamic) in server and where it is sotred because of we can edit that file directly

thanks
siva baskaran
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: dynamic route add and where it is stored

Dynamically you would use the "route add" command (man route). To make it permanent you would put an entry into /etc/rc.configd./netconf.


Pete

Pete
siva baskaran
Regular Advisor

Re: dynamic route add and where it is stored

dear,

i needed dynamic routing there is chance to change, so please let explain abt dynamic route add

thanks
siva
Ninad_1
Honored Contributor
Solution

Re: dynamic route add and where it is stored

To add route you can use route add command.
e.g.
route add 10.221.40.0 netmask 255.255.255.0 10.221.53.250
man route for more understanding.
This will be dynamic and not valid across reboots. So add entry for the route to /etc/rc.config.d/netconf

ROUTE_DESTINATION[1]="10.221.40.0"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="10.221.53.250"
ROUTE_COUNT[1]="1

The number in the [] should be the next unused from the netconf file for ROUTE_DESTINATION.

Regards,
Ninad
Chan 007
Honored Contributor

Re: dynamic route add and where it is stored

Hi Siva,

route add & route delete are the one that you can use in dynamic.

to check you routing table
netstat -nr

dynamic routes are not stored in any file, this is a property of IP (Check RFC sites for more information) either you can add or delete thats it.

see the link, hope that will help

Chan

http://www.sangoma.com/main/support/tutorials/tcpip

http://www.faqs.org/rfcs/rfc1716.html

http://rfc.net/rfc-index.html
Bill Hassell
Honored Contributor

Re: dynamic route add and where it is stored

Note: dynamic routing is not automatic. The route command just establishes a new route until you change it. You can change routes several times but when you reboot, the route goes back to the settings in your /etc/rc.config.d/netconf file.


Bill Hassell, sysadmin
Logu_2
Advisor

Re: dynamic route add and where it is stored

Do you mean dynamic routing? Or just adding the static routes using CLI.?

route command enables you do add static routes. If you want to setup dynamic routing you have to look for tools that provide BGP, RIP etc.

-logu