Operating System - HP-UX
1837185 Members
2496 Online
110114 Solutions
New Discussion

Re: Using different NIC cards; selecting one for sends!

 
MAD_2
Super Advisor

Using different NIC cards; selecting one for sends!

Our HP is configured with a couple of NICs. One of them is a Fast Ethernet 10/100 NIC, another one is a 1000Base-T, and there is yet another 1000Base-T port which has not been configured yet.

What I'd like to know is, since we have a couple of active cards with different IPs/speeds each, how do I set up a default port for sending (i.e. FTPs from scripts, file copies from one system to another -- rcp, etc.) so that I may use for sending (because of speed) only the 1000Base-T and not the Fast Ethernet card.
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
13 REPLIES 13
Sridhar Bhaskarla
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

Hi Mynor,

Unfortunately you can not have the same IP/subnet on two different interfaces. Your thought is good but not possible to implement.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Helen French
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

Hi Mynor:

This thread may help you:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7c459f5b3d4fd61190030090279cd0f9,00.html

HTH,
Shiju

Life is a promise, fulfill it!
MAD_2
Super Advisor

Re: Using different NIC cards; selecting one for sends!

Sridhar, I think you misunderstood. The two interfaces have different IPs, what I want to know is how to set scripting to use the faster IP for sends. Like if I have a script that sends files using email, how do I default it to the faster card? Or if files are sent through FTP within a script to another server, how do I specify the 1000Ethernet-T card?
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
Sridhar Bhaskarla
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

OK. There isn't it a full proof method that will allow you to use the 1GB interface for only sending the data. I mean you can not really make it like a "duplex" connection where the send is through 1GB and receive through 100MB interfaces.

You can set up a static route on the local system using 'route' so that the packets intended for a specific destination will go through the other interface. However, the destination will receive the packets through the same interface in that operation.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

...Sorrrry.. please correct the last sentence as the "destination will send back the packets through the same interface".

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MAD_2
Super Advisor

Re: Using different NIC cards; selecting one for sends!

How do I make the fastest card the default for all traffic unless the Fast Ethernet is specifically used?
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
MAD_2
Super Advisor

Re: Using different NIC cards; selecting one for sends!

Oh, one more thing, I posted another question on the link given by Shiju regarding netconf, here it is:
============================================

About this subject, I have basically the same issue. Can someone clear up a question I have about /etc/r.config.d/netconf

To make all outbound traffic go on the fastest card (let's assume a 1000Base-T card uses xxx.xx.xx.01 IP while xxx.xx.xx.02 is a Fast Ethernet), would prescedence here make this happen? By the way, in my netconf file, the only IP appering under the Internet Configuration parameters is the Fast Ethernet; the 1000Base-T is included under reverse ARP

Inside netconf...
# Internet configuration parameters. See ifconfig(1m), autopush(1m)
# For each additional network interfaces, add a set of variable assignments
# like the ones below, changing the index to "[1]", "[2]" et cetera.
#
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=xxx.xx.xx.02
SUBNET_MASK[0]=255.255.254.0
BROADCAST_ADDRESS[0]=xx.xxx.xxx.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

#Here is my question???
#INTERFACE_NAME[1]=lan1
#IP_ADDRESS[1]=xxx.xx.xx.01
#SUBNET_MASK[0]=255.255.254.0
#BROADCAST_ADDRESS[0]=xx.xxx.xxx.255
#INTERFACE_STATE[0]=up
#DHCP_ENABLE[0]=0


#
# Router Discover Protocol daemon configuration. See rdpd(1m)

# RDPD: Set to 1 to start rdpd daemon

RDPD=0

#
# Reverse ARP daemon configuration. See rarpd(1m)
#
# RARP: Set to 1 to start rarpd daemon
#
RARP=0
IP_ADDRESS[1]=xxx.xx.xx.01
SUBNET_MASK[1]=255.255.254.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=xxx.xx.xx.255
INTERFACE_STATE[1]=up
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
Sridhar Bhaskarla
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

Hi Mynor,

Precedence will not matter. But look at your default route statement in the same file and modify it to point to the gigabit interface. So, the traffic by default will go through it.


And you can add static routes using the IP of the fast ethernet card if you need to use it in those cases.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

And actually you are not enabling RARPD and if you do so, it will read from /etc/rarpd.conf not from the subsequent entries in netconf file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MAD_2
Super Advisor

Re: Using different NIC cards; selecting one for sends!

Sridhar,

If you are referring to the below statements inside netconf, it appears to me that the ROUTE_DESTINATION is using the slower card right now [0]....

# Internet routing configuration. See route(1m), routing(7)
#
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=xxx.xx.xx.5
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

Because from Internet configuration parameters, this is what we have (slower card)...

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=xxx.xx.xx.02
SUBNET_MASK[0]=255.255.254.0
BROADCAST_ADDRESS[0]=xx.xxx.xxx.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

What's the RARP? This is where the fast card appears...

# Reverse ARP daemon configuration. See rarpd(1m)
#
RARP=0
IP_ADDRESS[1]=xxx.xx.xx.01
SUBNET_MASK[1]=255.255.254.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=xxx.xx.xx.255
INTERFACE_STATE[1]=up

Also, after changes take place here, do they take effect immediately after the parameters are changed or do I need to reboot? Sorry for the little questions, but this is really new ground to discover for me...
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
Sridhar Bhaskarla
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

Hi (again) Mynor,

1. The index of route statements doesn't have any relation with that of the corresponding interface. But it depends on the reachability of the IP address of the ROUTE_GATEWAY and it usually sits on one of the broadcasting domains of the interfaces.

2. If you do not have a gateway on the broadcast domain of lan1, you will need to switch the IPs of these interfaces.

3. You cannot have the same subnet on two interfaces. It appears that the IP Addresses of interfaces are different but are in the same subnet.

4. RARP is reverse address resolution protocol that responds to requests that ask for the IP Address of a particular hardware address. I wouldn't recommend to change it.

5. You will need to reboot the server to have these changes into affect. It will not be automatic. You can make then online by using ifconfig and route commands. But I would suggest you reboot the servers.

The essence of this is that you are basically switching the functionalities of these two cards.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MAD_2
Super Advisor

Re: Using different NIC cards; selecting one for sends!

I am returning here to see if I can get a little clarification. I also decided to include (with ficticiuos IP address) the contents of file /etc/r.conf.d/netconf

Some clarification:
The fast 1000Base-T card is located at the bottom (IP 199.199.52.79); the Fast Ethernet (slower card) located at the top (IP 199.199.52.80) and setup as default route destination. Should I just be changing the values inside the brackets? 199.199.52.80 to [1] and 199.199.52.79 to [0]???

From what I understand in your comments Sridhar, this is what I must do to achieve my goal, correct? I also understand a reboot is necessary afterwards.

Also, any other files I need to be concerned with?

Thanks.
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
John Payne_2
Honored Contributor

Re: Using different NIC cards; selecting one for sends!

You want to see where your machine finds it's ip address. ie. /etc/nsswitch.conf is set up go to /etc/hosts first, then you need to change the values there. (I am assuming that you want to change primary to faster card.) Or change it in DNS.

If you want to send out email only through your larger card, configure sendmail to use the nodename of the larger card. ie. if your larger card's name in /etc/hosts or whatever is 'bob', configure sendmail to route through 'bob'. I think that would work...

Hope it helps.

John
Spoon!!!!