Ubuntu uses Ifupdown for advanced network settings

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.