Operating System - HP-UX
1833800 Members
2569 Online
110063 Solutions
New Discussion

default route to different subnet

 
SOLVED
Go to solution
jason thompson_1
Frequent Advisor

default route to different subnet

I have a net route that points to a gateway on the same subnet as the server. Can I add a default route that points to a gateway on a different subnet? I have tried editing /etc/rc.config.d/netconf and route add default xxx.xxx.xxx.xxx 1.
What's that smell?
4 REPLIES 4
Dave Hutton
Honored Contributor

Re: default route to different subnet

I know you can do a route add command and edit the files so it's there for good. But usually I just use the:
#set_parms addl_netwrk

Since I use this, I don't have the right route add syntax.

Dave
Ashwani Kashyap
Honored Contributor

Re: default route to different subnet

A gateway is used to direct trafiic on different subnet than the host itself .
So I think its not possible to do that . But I am not sure as I have never tried doing it .
Victor Fridyev
Honored Contributor
Solution

Re: default route to different subnet

Hi,

You can't define a router in a subnet where your computer doesn't have an adapter.

Sorry
Entities are not to be multiplied beyond necessity - RTFM
Thomas Bianco
Honored Contributor

Re: default route to different subnet

the thing about default gateways: they're default. "in the event we don't know where the packet goes, send it over there and let that router figure it out". if the default gateway is on another subnet, to whom would you send message destined for the default gateway?

you can define routes to "far" subnets, but in general, it's best not to and let the gateway (router) do it's job.

if this is the case, you would set the gateway to whatever router was actually connected to that subnet*, rather then localhost or blank


*more accuratly: you would set the gateway to whichever router on the local subnet is closest to the far subnet
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.