1836473 Members
2178 Online
110101 Solutions
New Discussion

Routing problems

 
David Islas González_1
Frequent Advisor

Routing problems

Hi,
I'm having the next trouble. I have the next subnets configured on my system.
192.168.1.95 255.255.255.192 lan1 PUBLIC
100.100.100.1 255.255.255.0 lan3 PRIVATE
10.10.10.1 255.255.255.0 lan5 PRIVATE
Gateway 192.168.1.65

Because of this I sometimes have correct connection to my server (from another net) and sometimes it doesn't answer.

when I did a traceroute to another host on my public subnet I got an error like this:
traceroute: Warning: Multiple interfaces found; using 100.100.100.1 @ lan3

How can I add a route all my traffic to 192.168.1.64 through lan1???

I want to add this even when I reboot my system, no only temporary.

I appreciate any suggestion.

Regards.



9 REPLIES 9
Tim Nelson
Honored Contributor

Re: Routing problems

The config looks correct.

With multihomed you must tell traceroute which interface to use. ( traceroute -i lanx )

If you are on another subnet and accessing 192.168.1.95 does not always work I would look at the router itself. Perhaps the privates are not privates or the "other" subnet matches one of your privates. In this case the server will send the return packet out the private interface and to never-never land.

HarmM
New Member

Re: Routing problems

Hi David,

As you have a router that you want to act as your default gateway it might be good to turn off IP forwarding on the HP-UX host using ndd. This of course provided that you don't want to use the HP-UX host to do any routing from the private networks to your public network and vice versa.

Best regards,

Harm Meijer
BUPA IS
Respected Contributor

Re: Routing problems

Hello David,
does your question have a typing error ?
> Gateway 192.168.1.65
>
> How can I add a route all my traffic to 192.168.1.64 through lan1???

Which one is the router/gateway address ?
Please post the ouput of netstat -nrv .
Since you have a subnet mask of 255.255.255.192 which is uncommon have you checked that other interfaces on this subnet ( including the router) have the mask set correctly ?
Have you checked for duplicate ip addresses on the 192.168.1.xxx subnet ?
In order to make routes appear at boot time you need to edit /etc/rc.config.d/netconf
adding something like this
[x] is the instance number e.g.[0] for the script which reads conf file.

ROUTE_DESTINATION[x]="default"
ROUTE_MASK[x]="255.255.255.192"
ROUTE_GATEWAY[x]="192.168.1.65" or is it 64 ?
ROUTE_COUNT[x]="1"
ROUTE_ARGS[x]=""

mike

Help is out there always!!!!!
Wei Jung
Trusted Contributor

Re: Routing problems

Try this :)

http://www.netfilter.org/

really good if you want to port forward, or perform source/destination NAT and masquerading
Wouter Jagers
Honored Contributor

Re: Routing problems

Could you post the output of 'netstat -nr' ?

I would expect the system to automatically add routes for its configured networks, so let's see whether there is one for your 192.168.1.64 network on lan1..

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Wouter Jagers
Honored Contributor

Re: Routing problems

Also, in response to:
> does your question have a typing error ?

The netmask of 255.255.255.192 means the IP 192.168.1.95 is in the network 192.168.1.64. The first IP in this network is 192.168.1.65 and the broadcast address would be 192.168.1.127.

Hence, no typo in the question: David has his default gateway on 192.168.1.65 and wants to have the traffic to the 192.168.1.64 -network- routed to the lan1 interface.

..if I understand correctly.
Hope that clarifies :)

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
David Islas González_1
Frequent Advisor

Re: Routing problems

Hi everybody sorry about the late.

It seems to be that only the traceroute wasn't working OK :S, and my traffic was correctly routed. I didn't have a correct connection to my server because of a user ...

He took that address by mistake...

Thanks everybody!!

Regards
David Islas González_1
Frequent Advisor

Re: Routing problems

..
Noble Sebastian
Frequent Advisor

Re: Routing problems

hi ,
You have Router ? Operating system not itself route , we can put ip for routing
give your netstat -rn out put from hp ux , ipconfig/all output fron windows pc ...

regards
noble