1836462 Members
2142 Online
110101 Solutions
New Discussion

Re: routing

 
admin_18
Occasional Advisor

routing

How do I check my default route
Then add a new route .
5 REPLIES 5
Michael Schulte zur Sur
Honored Contributor

Re: routing

Hi,

default route is:
netstat -rn

adding a route is:
route add -host|-net destiny gateway ...
You can add either a single host or a net including a netmask.

look into the menu of both commands, this is how I remember it.

greetings,

Michael
steven Burgess_2
Honored Contributor

Re: routing

Hi

Check your default route with

netstat -rn | grep ^default

The easiest way to do it is via

set_parms addl_netwrk

Otherwise use the route command

man route

for more information

All changes are added automatically (if using set_parms) or manually (if using route command) to the below file

/etc/rc.config.d/netconf

HTH

Steve
take your time and think things through
Wodisch
Honored Contributor

Re: routing

Hi "admin",

put the wanted routes into "/etc/rc.config.d/netconf", but take care to fill in the proper netmask for each and every route (well, except for the default route, it is not neccessary there).
Usually classless IP routing is done everywhere and hence the default netmasks would be all wrong!
So you'll need a whole paragraph for each and every route in "netconf"...

FWIW,
Wodisch
I.Delic
Super Advisor

Re: routing

Hi.Admin,

To check default route try:
netstat -rn
to add route use
route add
to check these command check
man netstat
man route

In the file /etc/rc.config.netconf you can put route to.
I suggest you to read man pages of these command

Succes


Idriz
Ron Kinner
Honored Contributor

Re: routing

As previously mentioned netstat -rn | grep default will show the current default route. To check if it is working, you might try
traceroute A.B.C.D
(where A.B.C.D is an address on a network that you don't have a specific route for in netstat -rn). The first hop is going to be your default route. If it doesn't respond then it is not working.

You can also
ping default
which should also work. If it doesn't you may have other problems if you are running 11.0.

To change it with route you need to delete the old one and add a new:

route delete default oldrouteraddress
route add default newrouteraddress 1

note that this does not change the entry in /etc/rc.config.d/netconf so you must do this manually or it will go away when you reboot.

if running 11.0 (or maybe newer I'm not sure) there is an option in ndd which checks to see if a gateway is alive. If it does not respond to pings, it will be taken out of service after about 3 minutes.

Set it to 0 to make it stop:

ndd /dev/ip ip_ire_gw_probe_interval 0

Then delete and add the default route again.

then if that fixes your problem add the setting to /etc/rc.config.d/nddconf

TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_ire_gw_probe_interval
NDD_VALUE[0]=0

so that it will stay after a reboot. (If you already have an entry then use the next available integer in the brackets.)

Ron