- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 2 lan cards, 2 IPs on same subnet how to choose wh...
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:05 PM
02-20-2009 12:05 PM
2 lan cards, 2 IPs on same subnet how to choose which one to use
I've a box with 2 lan cards (here in my case lan1 and lan3) configured on the same subnet:
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan3 1500 142.101.127.0 142.101.127.38 110752671 0 693951992 0 0
lan1 1500 142.101.127.0 142.101.127.43 1615284800 0 1184988610 0 0
lan0 1500 10.192.41.0 10.192.41.43 1384923343 0 2800573313 0 0
lo0 4136 127.0.0.0 127.0.0.1 24386238 0 24386239 0 0
lan0 is currently my backend, lan1 is the IP configured for the application users , and lan3 (which is the one on the same subnet than lan1) is used for taking backup, as I see in the hosts file.
Well I need to get out by .43 when I do for exemple a traceroute: it says multiple interfaces using lan3... The thing is that the firewall is opened only for traffic comming from .43
# traceroute 208.252.131.100
traceroute: Warning: Multiple interfaces found; using 142.101.127.38 @ lan3
traceroute to 208.252.131.100 (208.252.131.100), 30 hops max, 40 byte packets
1 142.101.127.1 (142.101.127.1) 0.618 ms 0.567 ms 0.543 ms
I don't know if this is possible to have 2 lan cards on the same subnet? If so how can I specify how to use lan1 by default?
Regards
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:11 PM
02-20-2009 12:11 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=786336
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:11 PM
02-20-2009 12:11 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
I'm running HP-UX 11.11, and here is the routing table:
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
142.101.127.43 142.101.127.43 UH 0 lan1 4136
142.101.127.38 142.101.127.38 UH 0 lan3 4136
10.192.41.43 10.192.41.43 UH 0 lan0 4136
10.192.41.0 10.192.41.43 U 2 lan0 1500
142.101.127.0 142.101.127.43 U 2 lan1 1500
10.254.247.0 10.192.41.1 UG 0 lan0 0
10.11.246.0 10.192.41.1 UG 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 142.101.127.1 UG 0 lan3 0
I can probably add a route to the specific lan...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:13 PM
02-20-2009 12:13 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:16 PM
02-20-2009 12:16 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
traceroute: Warning: Multiple interfaces found; using X.X.X.X @ lan0
The traceroute command now selects the source IP address to place in
the outbound packet based upon the first lan interface it finds in the
system as opposed to using the source IP address of the interface the
packet is routed out of.
On hosts with a single interface, this is not a problem but on hosts
with multiple interfaces, this may cause problems or confusing results.
Specifically, if the IP address used as the source of the outbound
packet is not the IP address of the lan interface that the packet is
sent on the remote node(s) may not be able to respond to the packet.
In such cases, you will need to determine which interface the packets
will be routed out of based upon the routing tables (use "netstat -rn").
Once you have determined the interface you may use the -i option to the
traceroute command to specify thus interface. Traceroute will then take
the IP address off of this interface and use it as the source IP
address.
It should be noted that the -i option as in:
/usr/contrib/bin/traceroute -i lan3
does not force the packet to go OUT lan3 it mearly instructs the
command to use the source IP assigned to lan3.
PS: Assign point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:26 PM
02-20-2009 12:26 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
What currently need to do is a sftp out to an address, but in the firewall rules to get out of my network i'm only granted to do it from the lan1 IP. And for a reason unknown to me when I do my sftp out I'm hitting my firewall with my lan3 IP.
I tried with the -i option on the traceroute commands and it worked good with traceroute (always good to known)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:48 PM
02-20-2009 12:48 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
route add host x.x.x.x gateway x.x.x.x 0
now it works...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 12:48 PM
02-20-2009 12:48 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 04:16 PM
02-20-2009 04:16 PM
Re: 2 lan cards, 2 IPs on same subnet how to choose which one to use
Otherwise, the stack assumes that each interface configured in the same subnet has equal connectivity to the rest of the world.