Monday, September 20, 2010

Network Interface Configuration in Ubuntu 10.04 LTS Lucid Lynx

Normally all the users will create and configure their network while installing the Operating System Itself. However here I am post the process of configuring the network using command line in Ubuntu 10.04 LTS Lucid Lynx. You can also configure network using GUI utilities in Ubuntu 10.04 LTS such as network-admin or else your famous ifcfg command etc.


Here I am following the bare metal method and will edit the main network configuration files for providing the network information. The main network configuration file of any Ubuntu based distribution is the "/etc/network/interfaces" file. Just open the file in your favourite editor and start configuring it as follows.

Configuring DHCP addressing for your network interface card in Ubuntu.

        # sudo vi /etc/network/interfaces


                    # The primary network interface - use DHCP to assign network address
                    auto eth0
                    iface eth0 inet dhcp

Configuring Static IP addressing for your network interface card in Ubuntu.


                   # The primary network interface

                   auto eth0
                   iface eth0 inet static
                   address 192.168.10.100
                   gateway 192.168.10.1
                   netmask 255.255.255.0
                   network 192.168.10.0
                   broadcast 192.168.10.255

Here the network information I provided is for your information only. You should chance the details as per your network requirements.

Restarting the Network service in Ubuntu 10.04 LTS


Also after editing these network information you should restart the networking service of you Ubuntu 10.04 LTS Server/Desktop.

                # /etc/init.d/networking restart

Also do not forget that the new Ubuntu 10.04 LTS distribution allows you use the
"service command for starting / stoping / restarting the services just like RedHat based distributions.

So you can also use the following command to restart the networking service in Ubuntu 10.04 LTS.

                # service networking restart

No comments:

Post a Comment