Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding secondary IP address on startup

Status
Not open for further replies.
Jul 27, 2001
20
0
0
US
Hi all,

I was wondering if anyone has written an rc script which adds a secondary IP address to the hme0 interface upon startup. Currently, every time I reboot my server, it comes back without the secondary IP address, and I have to manually add it back in. I have zero knowledge of how to write scripts yet, let alone mess with the rc scripts. Can someone please help? Thanks in advance!

Rich
 
Hi

I think you do not need to put any script in rc directory.

Just do following steps.

#ifconfig hme0:1 plumb
#ifconfig hme0:1 inet new_ip_address netmask value_of_net_mask up

make entry of this ip address in /etc/hosts file with appropriate hostname

eg.

1.1.1.1 mynewhost

create a file /etc/hostname.hme0:1
and put one line entry of the new hostname for this additional interface.

eg.

mynewhost

Check whether it retains the additional ip address after rebooting.

Hope it works.

Thanks and regards

Sharad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top