Wednesday, November 21, 2007

Changing UNIX host IP address

Recently, our DHCP server had an issue which prevented several computers on 3 computer laboratories from getting any ip address. The lab head, deeming that it is more important to have the hosts access the network now (it was for an exam) instead of troubleshooting further, decided to configure static IP addresses to each of the 40+ PCs across 3 computer labs.

Bad thing is that these are Linux boxes, which I'm not familiar with (hey, I'm used to ipconfig not ifconfig lol). Just for better retention on my part, here are the commands for manipulating network configuration of Linux boxes:

ifconfig eth0 10.10.10.75
route add default gw 10.10.10.1 dev eth0
route del -net 10.10.0.0 gw 0.0.0.0 netmask 255.255.0.0 dev eth0

I just hope I remember these commands by heart by now :))

No comments:

Post a Comment