Operating System - HP-UX
1833278 Members
3429 Online
110051 Solutions
New Discussion

How to configure IP address on secondary port

 
SOLVED
Go to solution
Bunty....
Advisor

How to configure IP address on secondary port

Hi,
I need to configure another IP address on secondary port.

these are the details:
# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/8/1/0/4/0 0x00306EF3D7AA 0 UP lan0 snap0 1 ETHER Yes 119
1/0/1/1/0/4/0 0x00306E497FFE 1 UP lan1 snap1 2 ETHER Yes 119
1/0/10/1/0 0x00306EF4680E 2 UP lan2 snap2 3 ETHER Yes 119

# ifconfig lan0
lan0: flags=1843
inet 170.120.1.14 netmask ffffff80 broadcast 170.120.1.17

# ifconfig lan1
ifconfig: no such interface

# ifconfig lan2
ifconfig: no such interface


Is there a way for you to confirm that we have network connectivity on LAN1 of this server?


If they are connected, i need to configure the secondary ports as follows:

lan1--170.120.1.15 (subnet:255.255.255.128)

how can i do this?
and in which files , i have to make changes & what changes

thanks
bunty
10 REPLIES 10
Sanjay_6
Honored Contributor

Re: How to configure IP address on secondary port

Hi Bunty,

Toe make the changes permanent across a reboot you need to modify the /etc/r.config.d/netconf file. Take a look at this thread from HP docs site,

http://docs.hp.com/en/B2355-90796/ch03s04.html

Hope this helps.

regds
AndyMueller
Frequent Advisor

Re: How to configure IP address on secondary port

Hello Bunty,

more /etc/rc.config.d/netconf

This should give you a good idea on how you would need to add info for lan1. If you edit this file, then this information will be retained if the server is rebooted.

To just add onetime:
ifconfig lan1 170.120.1.15 netmask 255.255.255.128

Also, consider
man ifconfig for more information

Regards,
Andy
HGN
Honored Contributor

Re: How to configure IP address on secondary port

Hi

To add the if you need to edit the file

#cd /etc/rc.config.d
#vi netconf

Once this is activated to test this is possbile only by
- removing the already existing lan0 cable since both lan0 & lan1 are in the same network
- the other way would be to swap the cables put the new cable on lan0 and the old cable on lan1 it should not matter since both are in the same network.

Rgds

HGN
Bunty....
Advisor

Re: How to configure IP address on secondary port

should i make these changes:

#ifconfig lan1 170.120.1.15 netmask 255.255.255.128 broadcast 170.120.1.127 up

# vi /etc/rc.config.d/netconf
INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=170.120.1.15
SUBNET_MASK[1]=255.255.255.128
BROADCAST_ADDRESS[1]=170.120.1.127
INTERFACE_STATE[1]=up

# vi /etc/hosts
170.120.1.15 server_host_name

should i need to do anything more?
should i need to define the gateway for this interface or it will automatically use the gateway of lan0?
if i need to define the gateway for this interface, how can i ?
what are the changes should i make?
HGN
Honored Contributor
Solution

Re: How to configure IP address on secondary port

Hi

I think you are all set,there is no need to add the gateway since both are in the sametime and will use the default gateway.

Rgds

HGN
Raj D.
Honored Contributor

Re: How to configure IP address on secondary port

Hi Bunty ,

for default gateway ,
You have to add :

ROUTE_GATEWAY[1]=10.112.248.3
ROUTE_COUNT[1]=1
ROUTE_DESTINATION[1]=default


in the /etc/rc.config.d/netconf


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: How to configure IP address on secondary port

Bunty,

ROUTE_GATEWAY[1]=

Where is your gateway IP.

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Bunty....
Advisor

Re: How to configure IP address on secondary port

i need to simply add these details:

ROUTE_GATEWAY[1]=10.112.248.3
ROUTE_COUNT[1]=1
ROUTE_DESTINATION[1]=default

in the /etc/rc.config.d/netconf

no need to give any command???????
AndyMueller
Frequent Advisor

Re: How to configure IP address on secondary port

Bunty,

as discussed, if you made the changes in the netconf file, you should not have to do anything else. Your lan1 portion of the netconf file should exactly as lan0, except that you use specify the new entries with [1], as it appears af if you have done that.

You could run /sbin/init.d/net stop and then /sbin/init.d/net start, then check your settings by typing:
ifconfig lan1 You should see that it is UP, and that the correct values for IP address, netmask and brooadcast are there.

If this is a box in production or clustered via MC ServiceGuard, you may not want to stop / start net. In that case just do the ifconfig lan1 IPaddress netmask 255.255.255.xxx

Hope that helped,
Andy
Raj D.
Honored Contributor

Re: How to configure IP address on secondary port

Bunty ,

If you are not restarting network services :

# ifconfig lan1 netmask

Do route add, after that.


Else:
------
/sbin/init.d/net stop
/sbin/init.d/net start


Then Check with ifconfig , and netstat -rn

cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "