From Wiki-UX.info

How to manually change ip address
Jump to: navigation, search

How to manually change ip address

To change a network card IP Address on the fly, you use ifconfig command to unplumb and plumb the network card.

# ifconfig lan# unplumb
# ifconfig lan# plumb
# ifconfig lan# <ip_address> netmask <netmask> up

Example:

# ifconfig lan0 unplumb
# ifconfig lan0 plumb
# ifconfig lan0 16.90.48.75 netmask 255.255.252.0 up
# ifconfig lan0
lan0: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
        inet 16.90.48.75 netmask fffffc00 broadcast 16.90.51.255

To make permanente changes, you can use "set_parms ip_address" to change the network configuration. Alternative, you can edit the network configuration files directly and restart the network.

-> /etc/rc.config.d/netconf

-> /etc/hosts

You restart the network configuration with the "net" configuration script.

# /sbin/init.d/net stop
# /sbin/init.d/net start
This page was last modified on 21 November 2007, at 00:13. This page has been accessed 1,598 times.