UNIX network commands
In UNIX there are several basic commands for managing network connections, here are the most useful.
Note that you must be logged in as the root user to make any changes. Network cards are named dc0, dc1 and so on.
Open command line and type the command without quotes, and hit enter.
Display Current Config for all NIC's
Display Current Config for dc0
Assign multiple IP's
'ifconfig dc0:0 192.168.1.2'
Assign second IP
'ifconfig dc0:1 192.168.1.3'
Disable network card
'ifconfig dc0 down'
Enable network card
'ifconfig dc0 up'
'ifconfig dc0 inet 192.168.1.2 netmask 255.255.255.0'
'route delete default && route add default 192.168.1.1'
If you are running Linux, you might be interested in The Linux network commands.
Read similar articles