1833187 Members
2965 Online
110051 Solutions
New Discussion

Add two IP

 
常有慈悲心
Regular Advisor

Add two IP

I want to add two IP on the two different NICs on the RP7410, 133.192.0.13 for lan0, 133,192,0,14 for lan1. but someone tell me that may be make the network work wrong according to the concept of tcp/ip. I want to know if i can do that, and why it can make the network work abnormality?
13 REPLIES 13
Massimo Bianchi
Honored Contributor

Re: Add two IP

Hi,
i have done it once, and the server stopped responding.

DON'T DO IT !!!!

If you want to have two network IP on the same network and on the same server, you must use the same NIC:

ifconfig lan0 133.192.0.13 ...

and after
ifconfig lan0:1 133.192.0.14 ...

please note the ":1".


If you want to use the combined speed, you must purchase APA and check if your networrk element support it.

The reason for the network going dumb, i think is the following: by definition network traffic towards a net goes to the NIC having that net in it, or to the default gateway if defined. In this case you will have two destination for the same packet. not sure for the answer, but for sure it does not work that way. You must use just one nic.

HTH,
Massimo
twang
Honored Contributor

Re: Add two IP

# ifconfig lan0:1 inet 192.9.200.1
# ifconfig lan0:2 inet 192.9.200.2
KCS_1
Respected Contributor

Re: Add two IP

Hi,

Edit 'netconf' file

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="133.192.0.13"
SUBNET_MASK[0]=" xxx.xxx.xxx.xxx "
BROADCAST_ADDRESS[0]=" xxx.xxx.xxx.xxx "
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]="lan1"
IP_ADDRESS[1]="133.192.0.14"
SUBNET_MASK[1]=" xxx.xxx.xxx.xxx "
BROADCAST_ADDRESS[1]=" xxx.xxx.xxx.xxx "
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]=0



# /sbin/init.d/net stop
# /sbin/init.d/net start

May it's possible.


Easy going at all.
Massimo Bianchi
Honored Contributor

Re: Add two IP

HI,
Patrick, it wont't work.

Server will stop responding, and you will have to go to console.

Massimo
KCS_1
Respected Contributor

Re: Add two IP

Oh,OK!!

If, it won't work, I will get one indirect experience from this problem.

Anyway, Thanks for teaching me :)
Easy going at all.
KCS_1
Respected Contributor

Re: Add two IP

Oh,OK!!

If, it won't work, I will get one indirect experience from this problem.

Anyway, Thanks for teaching me :)
Easy going at all.
Tim D Fulford
Honored Contributor

Re: Add two IP

Hi

Why not put both IPs on the SAME interface

ifconfig lan0 133.192.0.13 netmask 255.255.0.0
ifconfig lan0:1 133.192.0.14 netmask 255.255.0.0

You used to be able to do this.....I'm positive.... BUT all returns came out on the lowest networked interface for that subnet (e.g. in your case lan0). You will see a similar behaviour with this as all the return packets will come from lan0 (i.e. 133.192.0.13).

Hope this is of some help

Tim
-
Jeffrey Killian
Frequent Advisor

Re: Add two IP

What are you attempting to accomplish with this? Improve the speed of getting data to/from the machine? Load balanacing? Managing traffic?

We have two NICs in our system and we use on two separate networks to separate traffic between our servers (backend) and the users (frontend). The frontend NIC uses the IP address that any typical user of machine sees when attempting to access the system. The backend NIC uses a different network number, attached to a different network switch that ONLY the servers in our computer room connect to.

Our application allows us to use the backend network to move data, without the "network noise" experienced on the frontend network. We connect application servers, batch servers, database servers, etc. to this backend network so they can enjoy high speed communication. This segregation works extreamly well.

Good luck !
Sanjay_6
Honored Contributor

Re: Add two IP

Hi,

Try this link from docs site,

http://docs.hp.com./cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90135/B2355-90135_top.html&con=/hpux/onlinedocs/B2355-90135/00/00/28-con.html&toc=/hpux/onlinedocs/B2355-90135/00/00/28-toc.html&searchterms=subnet%20problem&queryid=20030703-074427

//Quote //

Multiple LAN interfaces, intermittent failures: I have been having problems getting the two LAN interfaces on my system to operate at the same time. Occasionally the ethernet cards stop communicating with remote systems. When this happens, the remote system also cannot communicate with the local system.

Answer: Check that the two interfaces on your system do not have the same network number or, if you are subnetting, the same subnet address. If both LAN interfaces have the same value in the network (subnet) address portions of the IP address, the cards may not be enabled simultaneously (although they may both run separately.)

Related Documentation: Refer to chapter 6, "Network Addressing".

//EndQuote //

Hope this helps.

Regds

Ivajlo Yanakiev
Respected Contributor

Re: Add two IP

if you need HA you can make little script and if first card is down just do
ifconfig lan2
Uttam_2
New Member

Re: Add two IP

Hi

I read all the messages from Different ppl, they say it won't work. We have around 100 servers. we have 2 IP's & 2 lan cards. Only difference is they are in different Subnet. One is primary lan card & other lan card we use for BACKUP EBR stuff. Iam 100% sure it works.

ifconfig lan0 133.192.0.13 netmask 255.255.xxx.0 up

ifconfig lan1 133.192.0.14 netmask 255.255.xxx.0 up
I hope it works for U. I f it won't work then get another IP from Different Subnet.

Thanks

Steven E. Protter
Exalted Contributor

Re: Add two IP

You are not supposed to have two cards on the same network and subnet with HP-UX.

Trust me. I tried it. Made network go BOOM. Machine dropped of network.

You can do this with Auto Port Agregation, which is network teaming, though I'm unsure whether it works with two cards or a single 4 port card.

To Author: You point handing record is a little on the low side. You will find people even MORE eager to help you if you assign points.

In this case, I wonder if the author has even checked the thread since making the post.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
twang
Honored Contributor

Re: Add two IP

I have bad experience about doing this on D390.
After I assigned IPs to both NICs, the server hangs. I do everything and cannot make it to start responding, eventually I have to reboot the server. And now I still don't know why it failed.