1830171 Members
4735 Online
109999 Solutions
New Discussion

static route

 
Claude_8
Occasional Contributor

static route

Any suggestion

I have an A-class server with 2 NIC:
142.127.159.38
142.127.159.39

Both are on the same subnet 255.255.255.240

# ifconfig lan0
lan0: flags=843
inet 142.127.159.38 netmask fffffff0 broadcast 142.127.159.47

# ifconfig lan1
lan1: flags=843
inet 142.127.159.39 netmask fffffff0 broadcast 142.127.159.47



I added a static route to an IP 142.127.169.238 gateway 142.127.159.38

# netstat -nrv
Routing tables
Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
142.127.159.38/255.255.255.255 142.127.159.38 UH 0 lan0 4136
142.127.159.39/255.255.255.255 142.127.159.39 UH 0 lan1 4136
142.127.169.238/255.255.255.255 142.127.159.38 UH 0 lan0 0
142.127.159.4/255.255.255.255 142.127.159.39 UH 0 lan1 0
142.127.159.32/255.255.255.240 142.127.159.39 U 2 lan1 1500
142.127.159.32/255.255.255.240 142.127.159.38 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 142.127.159.38 U 0 lan0 1500


When I do a traceroute to 142.127.169.238 I get

# /usr/contrib/bin/traceroute 142.127.169.238
traceroute: Warning: Multiple interfaces found; using 142.127.159.39 @ lan1
traceroute to 142.127.169.238 (142.127.169.238), 30 hops max, 40 byte packets
1 142.127.159.39 (142.127.159.39) 0.185 ms !N 0.211 ms !N 0.037 ms !N



Why would it say it using 142.127.159.39?


9 REPLIES 9
Jeff Schussele
Honored Contributor

Re: static route

Hi Claude,

In general you don't want 2 NICs on the same subnet for the exact reason you're seeing. You won't be able to control the routes.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jim Turner
HPE Pro

Re: static route

Hi Claude,

Without Auto Port Aggregation, you probably should NOT put two NICs on the same subnet. It's kinda like setting your cactus next to your alarm clock: You can do it, it's just not a very good idea.

Put the two NICs on separate subnets or purchase the APA software. Otherwise your mileage will vary as you are seeing.

Cheers,
Jim
Darrell Allen
Honored Contributor

Re: static route

2 NICs on the same subnet kinda, almost, just about, sorta works. You should avoid doing so without APA.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Deshpande Prashant
Honored Contributor

Re: static route

HI
If you want to seperate LAN traffic, configure both NIC on differnet segments.
If you want bigger LAN pipe or want fail-over use the APA software.

Thanks.
Prashant.
Take it as it comes.
Brian Hackley
Honored Contributor

Re: static route

Hi,

This sounds like you are using HPUX 11.11. Use the -i option with traceroute to tell it which interface to use.

Hope that helps,

-> Brian Hackley
Ask me about telecommuting!
Ron Kinner
Honored Contributor

Re: static route

I agree with the other posters that it is a bad idea to have both NICs in the same subnet and doesn't accomplish a whole lot. However, as to your original question: Go back and do a netstat -r
I think you will see that your new route just points back to the host which helps to explain why traceroute is confused. The route table is supposed to help the host find the quickest way to a remote destination. Its purpose is not to steer a packet out a particular interface.

Your setup uses Proxy Arp and expects a router which knows how to get to your destination to reply with its own MAC when the host ARPs for the MAC of the destination IP address. This is a rather old fashioned method and results in a bit slower connection for the first packet because of the ARP delay. It is also somewhat risky since it is quite easy for your router guy to simply turn off Proxy Arp some day leaving you high and dry. The good thing about this setup is that you don't need to know the router's IP address. I've also seen this used on 11.0 systems where the router did not respond to pings and the admin did not know how to turn off dead gateway detection.

You would normally add the route so that its gateway address was the IP address of the router you want it to use. (The Gateway is supposed to be the next hop not the NIC you want it to leave on.) When you add a route you need to add a metric of at least 1 at the end so that the host will know that the address is not a local (present on the host) address. Your default route should be the same way and if both use the same router there is no point in having a separate route for the individual host.

Ron
Evert Ladrak
Advisor

Re: static route

Have a look at the following URL:
ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_ndd.txt

I believe reading from this doco, that you would have to switch ip_strong_es_model to 1 to beable to do what you want.

I must admit I believe APA would be a better solution.



Evert
Claude_8
Occasional Contributor

Re: static route

Thanks everyone for your quick response.

I didn???t get into details about why I need this work this way but it is a requirement of an application that I am running.

I will read up on Auto Port Aggregation


P.S
Evert ..
I did switch ip_strong_es_model to 1 and I am still
Getting the same result
rick jones
Honored Contributor

Re: static route

traceroute is bypassing the stacks routing decisions and picking an interface on its own. you may have some success with the -i and -s options to traceroute.

ip_strong_es_model only affects the routing decisions made by the stack - by including source IP address - so, using -s above amy halep it select the route you want to traceroute.

i have never had the time to figure-out what is done whe there is not source IP address. one of these days if someone has the cycles, i'd love to hear the result.

having said all that, unless those two interfaces connect to disconnected network segments, the "better" way to put two NICs into the same IP subnet is to bond them together with APA - this makes them look like one NIC to the transport, and you can get failover all all that good stuff.
there is no rest for the wicked yet the virtuous have no pillows