Ifupdown
Ubuntu natively supports Linux's network bottom-up commands: Ifconfig,route,ip and other commands, but in order to make the network setup simpler, Debian provides a standard advanced network Setup tool that includes ifup and ifdown programs and/etc/network /interfaces file. If you choose to use Ifupdown to configure your network, then do not use the underlying tools to configure it at the same time. This also means that you should not use other advanced configuration tools such as Whereami, divine, intuitively, and so on. They also invoke the underlying configuration tool. The Ifupdown program is designed with the assumption that only such a program will be used to set up the network interface.
One. Command: 1.ifup
Ifup Start/etc/network/interfaces
2.ifdown
Ifup Close/etc/network/interfaces
3.ifconfig
Modify network parameters for interface settings
$ifconfig {interface} {Up|down} # Start an interface $ifconfig interface {options} # Configure an interface # Options:up, Down,mtu,broadcast
Two. Edit settings file: (/etc/network/interfaces) Basic interface settings
# interface Eth0 # Set IP address # Set Mask # setting up the gateway
Routing settings
# Add an IP routing route del # turn off an IP route # echo Information # echo Information
Domain name
# Reference resolv.conf Correspondence function # Define a search list for a domain name # define the IP address of the DNS server # define a local domain name # to sort the returned domain names
DHCP configuration
Iface eth0 inet DHCP
Configuring the Wireless Card
Iface eth0 inet DHCP
wireless-Essid Network name wireless-key password
Set the PPP interface, or the Ppoe interface
Iface ppp0 inet PPP
Provider Myisp
Configuring multiple Ethernet interfaces for a gateway
# LAN 1, dynamic IP # LAN 2, dynamic IPaddress 192.168.1.1255.255.255.0
Setting up the Virtual interface
You can set up an Ethernet card to make it an interface with many IP subnets.
# LAN 1 Intranet address 192.168.0.1255.255.255.0192.168.0.0192.168.0.255 # LAN 2 Virtual interface
Dual Logic interface
# Logical Interface 1, the general default logical interface is eth0address192.168.0.123255.255.255.0192.168.0.1# address 81.201.3.123255.255.0.081.201.1.1
Command line start Logical interface
$ ifdown eth0 # Start Logical Interface home,$ ifup eth0=home$ ifdown eth0 # Start Logical interface work $ ifup Eth0=work
Ubuntu uses Ifupdown for advanced network settings