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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing IP addresses 1

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
CA
Hi,
I want to change the IP addresses of my current Unix box, and the subnet mass of Net card. My questions are:
- Beside the /etc/hosts file that I have to concern, is there anything else should I concern?

- Command: ifconfig hme0 xxx.xxx.xxx.xxx allows me to change the subnet address too?

Thanks
 
Changing ipaddr & netmask


1. do an ifconfig -a (this will show present configuration)

2. find the interface you wish to change

3. If changing the network leg then vi /etc/netmasks
to reflect the new netmask.

4. down the interface you need to modify

ifconfig hme0 down

5. run the ifconfig command

ifconfig hem0 192.128.111.20 netmask 255.255.255.0
broadcast 192.128.111.255 up

6. ifconfig -a (look for the new settings)

7. Did you gateway addresss change? If so then vi the
/etc/defaultrouter for the new address and look on this
site for an earlier (today) psot on how to change the
default route without rebooting.


8. ping a host within your lan and outside to check both
local remote access.
 
Thanks Tuka,
It's a very helpful tip.
 
babeo,
I forgot to isnert this info:

vi /etc/hosts file to correct the new ipaddress

vi /etc/defaultrouter to correct the new router address
 
Hi Tuka,
Instead of using the command "broadcast.... up"
Will the command "ifconfig xxxxx up" do the same thing?
Thanks
 
Sure! The "up" at the end just place the interface in an up state so it save a little typing time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top