Operating System - HP-UX
1820201 Members
3791 Online
109620 Solutions
New Discussion юеВ

Re: how can i config two ip address to one ether card

 
чОЛцЫж_1
Occasional Advisor

how can i config two ip address to one ether card

hi expert,
i must config two ip address to a host, but the host only have one card,what can i do.
thanks
6 REPLIES 6
Balaji N
Honored Contributor

Re: how can i config two ip address to one ether card

ifconfig lanx:1 ipaddress.


hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
T G Manikandan
Honored Contributor

Re: how can i config two ip address to one ether card

Radhakrishnan Venkatara
Trusted Contributor

Re: how can i config two ip address to one ether card

hi,

u can logical ip's from sam.

go to netowrking communications -> network interface cards ->
choose the interface card ->
go to actions menu -> add logical ip interface.

or edit /etc/rc.config.d/netconf

add the entry

IP_ADDRESS[1]=135.254.244.26
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[1]=lan0:1
BROADCAST_ADDRESS[1]=135.254.244.255
INTERFACE_STATE[1]=up


radhakrishnan
Negative thinking is a highest form of Intelligence
Ravi_8
Honored Contributor

Re: how can i config two ip address to one ether card

Hi,

Issue the following commands to configure multiple IP addresses

1. ifconfig lan#:0 <1st IP Address> netmask

Note: Specifying lan0:0 is equivalent to lan0.

2. ifconfig lan#:1 <2nd IP Address> netmask


/etc/rc.config.d/netconf should resemble the following format:

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]=10.10.10.1
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]="lan0:1"
IP_ADDRESS[1]=10.10.20.15
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]=0
never give up
Pradeep_3
Frequent Advisor

Re: how can i config two ip address to one ether card

editing file /etc/rc.config.d/netconf is more better way than doing ifconfig as the configuration done using ifconfig remains till server is up and running. When rebooted next it will start with previous configuration i.e. only one ip address to a lan card.

So edit /etc/rc.config.d and add lines given by ravi.

note: once you edit /etc/rc.config.d/netconf

restart your net daemon using,

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

This will restart net daemon and both ip add will be active.

Paresh.
Steven E. Protter
Exalted Contributor

Re: how can i config two ip address to one ether card

?? Sir,

You have received good answers to your questions. As good as if I'd posted them myself.

You have received 53 responses to your various questions.

It is customary to assign points to people who help you. None for me please, but I see a couple I'd assign 10 points.

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