As I did a detailed post about solving some tricky network problems (see here:http://www.techtimejourney.net/?p=667) I realized that there is still one common network issue which will need some elaboration. Imagine that you will start up your Linux and suddenly you realize that you do not have an IP address because the network configuration failed during the startup. One way to fix this is of course to restart the computer but there is also a better way: use if network configuration commands.
The so called if commands ifup interfacename and ifdown interfacename are commands by which you can simply reconfigure your network and more than possibly get a working ip address from DHCP server (provided of course that your network is not completely disabled)
An example: Network connection is wired and is seen by the system as eth0. To reconfigure the interface do in terminal as sudo or root:
sudo ifdown eth0
sudo ifup eth0
The first command ifdown eth0 is needed because your system thinks your network is configured correctly when it is in a state of “no network” so we need to of course remove that state.
If you are using wireless interface and your wlan card is located at wlan0, or similar, just replace the interfacename with wlan0 and start configuring your network to bring it back up again