I learned about the Ubuntu network configuration. Here I will introduce the Ubuntu network configuration application in detail, I hope to use Ubuntu network configuration to include a very good translation and easy-to-use architecture. configure a DHCP address for the NIC: to configure a DHCP address, edit/etc/network/interfaces and enter the following lines (assume that your Nic is eth0 ): sudovi/etc/network/interface
I learned about the Ubuntu network configuration. Here I will introduce the Ubuntu network configuration application in detail, I hope to use Ubuntu network configuration to include a very good translation and easy-to-use architecture. configure a DHCP address for the NIC: to configure a DHCP address, edit/etc/network/interfaces and enter the following lines (assume that your Nic is eth0 ): sudo vi/etc/network/interfaces
# The primary network interface-use DHCP to find our address
Auto eth0
Iface eth0 inet dhcp // specify as dhcp
After entering these lines, run the following command to restart your network device: sudo/etc/init. d/networking restart
Configure a static IP address for the NIC
To configure a static IP address, edit/etc/network/interfaces and enter the following lines (assume that your Nic is eth0): sudo vi/etc/network/interfaces
# The primary network interface
Auto eth0
Iface eth0 inet static // specify as static
Address 192.168.3.90 // ip address
Gateway 192.168.3.1 // gateway
Netmask 255.255.255.0 // Subnet Mask
Network 192.168.3.0 // This ...... Network?
Broadcast 192.168.3.255 // broadcast
After entering these lines, run the following command to restart your network device: sudo/etc/init. d/networking restart
Set the second IP address or virtual IP address. If you are a server administrator or a common user, you can assign a second IP address to the system, edit the/etc/network/interfaces file (assuming your Nic is eth0 ):
Sudo vi/etc/network/interfaces
Auto eth0: 1
Iface eth0: 1 inet static
Address 192.168.1.60
Netmask 255.255.255.0
Network x. x
Broadcast x. x
Gateway x. x
After entering these lines, run the following command to restart your network device: sudo/etc/init. d/networking restart
Set the hostname of the Ubuntu network configuration system to change the hostname of the system using the following command format, or directly edit/etc/hostname sudo hostname newname
Set DNS
Sudo vi/etc/resolv. conf
Enter the following details
Search test.com
Nameserver 192.168.3.2
The above describes the Ubuntu network configuration.