1847648 Members
4562 Online
110265 Solutions
New Discussion

Route probelm

 
Subhash_5
Frequent Advisor

Route probelm

Hello all
I have a problem with my Hp-UX server. i am having 2 NIC'c configured in the server,
LAN0 with 192.168.200.24 with default gateway 192.168.200.4 & LAN1 with 192.168.199.2 no gateway( this one we are using for IP san)
when i am trying to ping to external IP from server it gives me warning multiple interfaces found & uses 192.168.199.2 IP NIC & then it couldn't ping outside.
How can make sure that all outgoing trafice will go via 192.168.200.24.
please advice
many thanks in advance.
16 REPLIES 16
baiju_3
Esteemed Contributor

Re: Route probelm

What is the subnet mask you are using .

Assuming that you are using 255.255.255.0



Add a custome route

route add net 192.168.199.0 netmask 255.255.255.0 192.168.200.4 1

Now do a traceroute and ping commands to test .If it works then consider this putting in a startup script under /sbin/init.d


Thanks,
BL








Good things Just Got better (Plz,not stolen from advertisement -:) )

Re: Route probelm

What's your subnet mask? Are both these interfaces in the same IP subnet? If so that ain't supported on HP-UX - you will need to change one of the interfaces to reflect that.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Subhash_5
Frequent Advisor

Re: Route probelm

Hi Thanks for reply
yes subnet Mask is 255.255.255.0, i want to ping 192.10.10.30 & it should go thro' 192.168.200.24 & not thro' 192.168.199.2
please advice what exactly i should do,
many thanks.
Jeff Schussele
Honored Contributor

Re: Route probelm

Hi,

Use ping as follows:

ping -i 192.168.200.24 dest_host/ip

This will "force" the ping out the proper NIC.

man ping for more details.
BTW - traceroute will do the same thing sometimes.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!

Re: Route probelm

Can you post the output of:

netstat -in

Thx

Duncan

I am an HPE Employee
Accept or Kudo
Nemer_1
Regular Advisor

Re: Route probelm

Hi,

first thing you have to ensure your routing table using "netstat -r" inspect this table carefully and see if it contains any entries for the network you want to reach, see what interface this entry is using (lan0 or lan1) in the interface colomn

Also check you default routing entry named "default", you should have only one default entry that uses the interface lan0.
Subhash_5
Frequent Advisor

Re: Route probelm

Dear All
please see belwo o/p of netstat & traceroot to destination which usages lan1 instead of lan0 ,but if i down LAN1 then traceroute uses LAN0 & then it can reach to destination IP.
Please advice many thanks in advance.

# netstat -rn
Routing tables
Destination Gateway Flags Refs interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.199.2 192.168.199.2 UH 0 lan1 4136
192.168.200.25 192.168.200.25 UH 0 lan0 4136
192.168.200.4 192.168.200.4 UGH 0 lan0 0
192.168.199.1 192.168.199.1 UGH 0 lan1 0
192.168.200.0 192.168.200.25 U 2 lan0 1500
192.168.199.0 192.168.199.2 U 2 lan1 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 192.168.200.4 UG 0 lan0 0

# ifconfig lan0
lan0: flags=1843
inet 192.168.200.25 netmask ffffff00 broadcast 192.168.200.255

ifconfig lan1
lan1: flags=1843
inet 192.168.199.2 netmask ffffff00 broadcast 192.168.199.255

# traceroute 192.10.10.30
traceroute: Warning: Multiple interfaces found; using 192.168.199.2 @ lan1
traceroute to 192.10.10.30 (192.10.10.30), 30 hops max, 40 byte packets
1 * * *
2 * * *

Muthukumar_5
Honored Contributor

Re: Route probelm

Your problem is seeming to be a behaviour of traceroute. It will not detect default gateway routing when there is no suitable routing for an IP.

Refer this:

http://sunportal.sunmanagers.org/pipermail/summaries/2002-August/002237.html

Some man page example executiong itself is showing the warning messages of that.

http://bama.ua.edu/cgi-bin/man-cgi?traceroute+1M

hth.
Easy to suggest when don't know about the problem!
Subhash_5
Frequent Advisor

Re: Route probelm

Many Thanks Mr. MuthtuKumar
but i am not able to ping also to destination IP, also our default gateway is router which will accept requests only from lan0 (we have configured it for security reasons) & also lan1 is not connected to publich switch, its connecetd to private san switch.
please advice if any workaround?
many thanks again for HELP, i will assign points.

Regards
Subhash
Nemer_1
Regular Advisor

Re: Route probelm

your routing table seems to be correct. this sounds that you have a network issue. try to ping and traceroute a local IP address on the 192.168.200 network and see if it's reachable or not, then try to do the same with your default gateway...
is it reachable??? hope so
Muthukumar_5
Honored Contributor

Re: Route probelm

Try to add another routing entry as,

# route add net 192.10.10.0 192.168.200.4 1

or

# route add host 192.10.10.30 192.168.200.4 1

Try to ping it now.

hth.
Easy to suggest when don't know about the problem!
Subhash_5
Frequent Advisor

Re: Route probelm

Hello All
thanks for your help, i could traceroute to some other local IP & also can ping to default gateway. but still not able to ping or traceroute to this outside IP, we have done nating in router & it will allow only 192.168.200.25 IP to send trafic out.
please see below o/p of traceroute & netstat.
thanks
# traceroute 192.10.10.30
traceroute: Warning: Multiple interfaces found; using 192.168.199.2 @ lan1
traceroute to 192.10.10.30 (192.10.10.30), 30 hops max, 40 byte packets
1 * * *
#netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.199.2 192.168.199.2 UH 0 lan1 4136
192.168.200.25 192.168.200.25 UH 0 lan0 4136
192.10.10.30 192.168.200.4 UGH 0 lan0 0
192.168.200.4 192.168.200.4 UGH 0 lan0 0
192.168.199.1 192.168.199.1 UGH 0 lan1 0
192.168.200.0 192.168.200.25 U 2 lan0 1500
192.168.199.0 192.168.199.2 U 2 lan1 1500
192.10.10.0 192.168.200.4 UG 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 192.168.200.4 UG 0 lan0 0
Nemer_1
Regular Advisor

Re: Route probelm

if this really true, then you don't have any problem with your HP-UX box. your real problem is with your router. it seems that your router is blocking the traceroute & ICMP traffic.
Subhash_5
Frequent Advisor

Re: Route probelm

Hello
thanks for your reply, i also feel that there is no problem in Hp-UX box, funny enough just now i tried FTP & it works with destination server.
i will check with networking guys ,many thanks for your support.

gr8 fotum to learn the stuff.


Regards
Subhash
Muthukumar_5
Honored Contributor

Re: Route probelm

If you don't have problem in testing this machine then,

Remove routing entries of all lan1 related things.

192.168.199.2 192.168.199.2 UH 0 lan1 4136
# route del host 192.168.199.2 192.168.199.2 1
192.168.199.1 192.168.199.1 UGH 0 lan1 0
# route del host 192.168.199.2 192.168.199.2 1
192.168.199.0 192.168.199.2 U 2 lan1 1500
# route del net 192.168.199.0 192.168.199.2 0

Note: Login with lan0 ip-address and send prior notice to all who are using lan1 ip.

Try to ping and traceroute now.

hth.
Easy to suggest when don't know about the problem!
Nemer_1
Regular Advisor

Re: Route probelm

in this setup the only entry that is not needed in your setup and you can be removed is

192.168.199.1 192.168.199.1 UGH 0 lan1 0

all others are needed for the server to be able to communicate with others on the "SAN IP network"