Operating System - HP-UX
1835913 Members
2937 Online
110087 Solutions
New Discussion

traceroute trying to use backup lan instead of primary

 
Vicki Selover
Advisor

traceroute trying to use backup lan instead of primary

I have 2 network cards configured, each on a different subnet. lan0 is 100baseT and lan1 is a gigabit which is used for backing up the system. When I run a traceroute without specifying which lan, it always tries to use the gigabit card. Is there a place where this can be set to default to lan0?
29 REPLIES 29
Mark Grant
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

This would be a routing issue. Check the output of "netstat -rn". Here you can see which interface is used when connecting to a specific network.

You change these with the "route" command
Never preceed any demonstration with anything more predictive than "watch this"
Geoff Wild
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

If you are running 11.11 - then traceroute has another option - specify the interface:

traceroute -i lan0 destination

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Juergen Tappe
Valued Contributor

Re: traceroute trying to use backup lan instead of primary

If you have the IP entries in /etc/hosts

i.e.:
1.2.3.4 bla.blub.com bla
5.6.7.8 bla.blub.com bla

just switch these entries so that the 5.6.7.8 will be the first and any IP access will try that first.
Working together
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

Thanks for all the quick responses. My netstat is okay in that 192 ip uses 192 gateway and 170 ip uses 170 gateway. The traceroute works fine when I specify which lan to use with the -i option (I am on 11.11) but I don't understand why it defaults to the 192 when I don't use -i. I have the 170 in the /etc/hosts first, followed by the 192.
Mark Grant
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

traceroute will use whichever interface is indicated by the right hand column output from "netstat -rn" for the host you are trying to traceroute to.

If you want a specific host to be accessed via a different lan, add a new route for it that explicitly says which interface. However, it will need to appear before the general route for that network. So, delete your gigabit route to the target network, add a specific host route for the host you want to traceroute to and then add your gigabit route back in again.

I imagine that doing this is going to cause you more problems than its worth though. What is wrong with specifying the interface on teh command line?
Never preceed any demonstration with anything more predictive than "watch this"
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

Mark,
It's not a problem to specify the interface on command line. I was just concerned that regular network activity could be affected if packets are possibly trying to go out over lan1 instead of lan0. Is it possible that could happen? Everything is working okay, but I just noticed that when I ran the traceroute (before I found I had the option to do a -i), it was trying to use lan1. Sorry about my lack of network knowledge.

Vicki
Mark Grant
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

If traceroute is going down the wrong interface, then pretty much everything else is too. Have a look at the "Ipkts" and "Opkts" fields from "netstat -in" to see which interface is being used the most. Run it a few times in succession to get a good idea.

If users should be going down the gigabit interface, then remove the other route with "route". It might be helpful to post the output of you "netstat -rn"
Never preceed any demonstration with anything more predictive than "watch this"
Bharat Katkar
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

Try doing
# ioscan -fnC lan

Check the H/w paths. I think your gigabit is lan0 and what you are saying 100baseT could be a Management LAN.

Does your above output list both the cards. If i am right then it should only list the Gigabit Card and not that 100baseT card.

Regards,
You need to know a lot to actually know how little you know
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

netstat -in shows both interfaces and lan0 (100baseT) is the one showing activity. lan1 has packets also from when backups have been run and I assume where the Legato server is communicating to it, but changes to those numbers are minimal. lan1 is definitely the gigabit card in slot 0/8/0/0 and lan0 is in 0/0/0/0 (L3000).

Vicki
Mark Grant
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

Vicki,

It seems your routing table is routing network traffic down the wrong interface card. Have a look at "netstat -rn" (not "-in" this time) and post it here if you can.
Never preceed any demonstration with anything more predictive than "watch this"
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

Here's the netstat -rn output:

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
170.126.4.47 170.126.4.47 UH 0 lan0 4136
192.168.0.52 192.168.0.52 UH 0 lan1 4136
192.168.0.0 192.168.0.52 U 2 lan1 1500
170.126.0.0 170.126.4.47 U 2 lan0 1500
default 170.126.1.1 UG 0 lan0 0
Mark Grant
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
170.126.4.47 170.126.4.47 UH 0 lan0 4136
192.168.0.52 192.168.0.52 UH 0 lan1 4136
192.168.0.0 192.168.0.52 U 2 lan1 1500
170.126.0.0 170.126.4.47 U 2 lan0 1500
default 170.126.1.1 UG 0 lan0 0

Ok, If your netmask is 255.255.0.0 for each interface then any traffic going to the 192.168 network should be going through lan1.

Is this what you would expect?
Never preceed any demonstration with anything more predictive than "watch this"
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

Mark,
That is what I would expect. My netmasks are 255.255.248.0 for lan0 and 255.255.255 for lan1.

Vicki
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

When I run the traceroute, I get this:

Warning: Multiple interfaces found; using 192.168.0.52 @ lan1.

I would have thought if I were doing a traceroute to a 170 address, traceroute would have used lan0.
Bharat Katkar
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

Does /etc/netconf file has entries as below and if not how they look like:

ROUTE_DESTINATION[1]=default
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]=170.126.1.1
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""


Regards,
You need to know a lot to actually know how little you know
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

Here are the entries:
Is my problem that the broadcast is specified for lan1 as the 192 network and it's not specified for lan0?

Vicki

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="170.126.4.47"
SUBNET_MASK[0]=255.255.248.0
ROUTE_GATEWAY[0]="170.126.1.1"
ROUTE_COUNT[0]="1"
ROUTE_DESTINATION[0]="default"

INTERFACE_NAME[1]="lan1"
IP_ADDRESS[1]="192.168.0.52"
SUBNET_MASK[1]="0xfffff800"
BROADCAST_ADDRESS[1]="192.168.0.255"
Mark Grant
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

I have to say, your subnet/broadcast addresses look wrong to me though I can't quite get my head to gether to tell you why!
Never preceed any demonstration with anything more predictive than "watch this"
Bharat Katkar
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

Not sure but try changing this entry:

SUBNET_MASK[1]="0xfffff800" to


SUBNET_MASK[1]=255.255.248.0

Then do

/sbin/init.d/net stop
/sbin/init.d/net stop


Hope that works.

Regards,


You need to know a lot to actually know how little you know
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

Good thing it's Friday then Mark! I didn't mean to be such a pain on the first question I've ever posted!!
Bharat Katkar
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

I hope (255.255.248.0)this is what you plan to have but check it according to your IP addressing scheme.

Secondly Broadcast address is decided by your subnet mask and you don't have to worry about it.

Regards,
You need to know a lot to actually know how little you know
W.C. Epperson
Trusted Contributor

Re: traceroute trying to use backup lan instead of primary

I think it may be defaulting the ROUTE_MASK incorrectly because of the non-traditional netmask on the interface. Try "netstat -rnv" and see what the default route's netmask looks like. If it's not "0.0.0.0", try setting it explicitly in /etc/rc.config.d/netconf.

ROUTE_MASK[0]="0.0.0.0"
"I have great faith in fools; self-confidence, my friends call it." --Poe
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

It is set to 0.0.0.0 according to the output: default/0.0.0.0

I also tried changing the subnet as suggested and it made no difference.
Vicki Selover
Advisor

Re: traceroute trying to use backup lan instead of primary

I just noticed something on that output though. Does this look right? On the 2nd line, the netmask is 255.255.255.255 for the 170 network and on the 5th line, it's 255.255.255.248. Vicki

Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
170.126.4.47/255.255.255.255 170.126.4.47 UH 0 lan0 4136
192.168.0.52/255.255.255.255 192.168.0.52 UH 0 lan1 4136
192.168.0.0/255.255.255.0 192.168.0.52 U 2 lan1 1500
170.126.0.0/255.255.248.0 170.126.4.47 U 2 lan0 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 lo0 0
default/0.0.0.0 170.126.1.1 UG 0 lan0 0
Mel Burslan
Honored Contributor

Re: traceroute trying to use backup lan instead of primary

if there are no backups running at this moment, can you try deleting the route to 192.168 network ? This is a non-routable class C network and in my opinion should have a 3rd octet when placed in the routing table and the address needs to be associated with a 24 bit netmask, i.e., 255.255.255.0

looking at your routing table, you have a route to 192.168.x.x net. I am not sure if you can specify such a network. As Mark indicated, it did not sound kosher to me.

do you actually have devices on this subnet with 0 (zero) on the 3rd octet of the IP address ?
________________________________
UNIX because I majored in cryptology...