Ubuntu Networking configuration
HOWTO- Configure Network interfaces by using bash shell
You can configure a network interface from the command line using the networking utilities.
First we need to edit /etc/apt/interfaces.so
Step1: Configure Dynamic ip adress:
#nano /etc/network/interfaces |
Then we got network interfaces file
auto etho iface eth0 inet dhcp |
Step2: Configure Static ip address:
#nano /etc/netw ork/interfaces |
#The primary network interfaces
auto eth0 iface etho inet static address 192.168.3.91 gateway 192.168.3.1 netmask 255.255.255.0 broadcast 192.168.3.255 |
After Entering all the details you need to Restart networking services
/etc/init.d/networking restart |
Step3: Configure DNS Server:
Manually configure your DNS configuration file and edit a following command
#nano /etc/resolv.conf |
Open your preferred editor
name server 192.168.3.91 (enter your dns ip) name server 192.168.3.91 (enter your alt dns ip) |
Be sure you have save your changes.
Step4: Restart your configuration:
/etc/init.d/network restart |
This should send result look like following command
*Reconfigure network interfaces...[ok ] |