Operating System - HP-UX
1836564 Members
2672 Online
110102 Solutions
New Discussion

multiple ips on the same nic

 
Luca_11
Occasional Contributor

multiple ips on the same nic

hi,
i try to describe the situation:
i've only one NIC (hp-ux 11i) and i need to assign it 2 different ip belonging to different networks.
so the current situation is:
lan0 = 10.214.16.11/24
lan0:1 = 10.214.136.1/27
Now i execute this command:
traceroute -s 10.215.16.11 remotehost
the output is ok, remote host i reached.

instead executing
traceroute -s 10.214.136.1 remotehost
remote host is not reached.

if i configure lan0:1 = 10.214.136.2/27 (the same subnet of lan0) all works fine.

I'm not sure if it depends on firewall configuretion so the question is:
Is it possible configure multiple ip belonging to different network on the same NIC?

Thanks in advance,
Luca

6 REPLIES 6
Sean OB_1
Honored Contributor

Re: multiple ips on the same nic

Do a netstat -rn and make sure that there is a route for each IP address.

Roger Baptiste
Honored Contributor

Re: multiple ips on the same nic

hi,



Yes. What's the output of netstat -r (and netstat -nr).

-raj
Take it easy.
Luca_11
Occasional Contributor

Re: multiple ips on the same nic

This is the output of netstat -rn

[h3mih042]/#netstat -rn
Routing tables
Destination Gw Flags Refs If Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.214.136.1 10.214.136.1 UH 0 lan0:1 4136
10.214.16.11 10.214.16.11 UH 0 lan0 4136
10.214.136.0 10.214.136.1 U 4 lan0:1 1500
10.214.16.0 10.214.16.11 U 4 lan0 1500
default 10.214.16.250 UG lan0 0

errata corrige:
...
if i configure lan0:1 = 10.214.16.2/27 (the same subnet of lan0) all works fine.
...
instead of
...
if i configure lan0:1 = 10.214.136.2/27 (the same subnet of lan0) all works fine.
...

regards
Luca


Joaquin Gil de Vergara
Respected Contributor

Re: multiple ips on the same nic

add a entry in the /etc/rc.config.d/nddconf file like this

TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_check_subnet_addr
NDD_VALUE[0]=0

and restart network!
(Check that no other entry with the 0 exists. If this change the 0 for another number!)
Teach is the best way to learn
Luca_11
Occasional Contributor

Re: multiple ips on the same nic

this solution has not solved my problem,is it possible that the problem is the configuration of vlan?

bye
Luca
Sean OB_1
Honored Contributor

Re: multiple ips on the same nic

Luca,

Just a reminder to give points out to those who answered your questions. It only takes a moment, and helps make the forums more useful to everyone.

Sean