Tuesday, June 2, 2009

Linux's version of ipconfig

Last night I installed Ubuntu Server 9.04 via VMWare running inside my Windows 2003 Server. I've used several distros in the past but always gave up in Linux because of how hard to find the real solutions to all the problems that I've encountered in the past. Almost every year, I try to at least test one or two distros whenever I get a chance. Personally, I like OpenSuSe and Fedora Core but since Ubuntu is pretty much the de facto standard for desktop OS, I'll stick with Ubuntu just because of the community support.

Anyway, the point of this post is post is to educate newbie of Linux such as myself. The practice of most people, if not all, is to statically assign IP addresses on all their servers and let the clients to get their IP address dynamically (DHCP). As for me, I don't like assigning static IP addresses in my home network. Why? I don't know. I just don't feel like it. c",) Anyway, I didn't like the IP address that I received when I issued ifconfig (ipconfig equivalent in Windows), so I went ahead and reserved the IP address of the one I like to use for this box by going to my router setup page. Once it was done, I needed to issue the equivalent commands of Window's ipconfig /release and /renew in Linux. So what a normal person would do? Well, they'll apply their mad Google skillz (hahaha). Anyway I found several commands that were suggested and are listed below:

sudo ifconfig eth0 down

then

sudo ifconfig eth0 up

That actually didn't do the trick. This pretty much the same thing as Cisco's command shutdown and no shutdown command. The correct command were showed below:

sudo dhclient -r

then

sudo dhclient

After issuing those commands, I was able to get the IP address that I reserved in my router.

Hopefully, you'll be able to use these commands on your long journey as a Network professional.

Note:
I believe these commands will only work for Debian based distro such as Ubuntu. If you use a different distro, try taking out the sudo and it might work. If not, then use your mad Google skillz to find the answer.

Posted by Andr01d
"I know nothing except the fact of my ignorance" - Socrates

0 comments:

Post a Comment