Nic parameter settings in debian

Source: Internet
Author: User
Set Nic parameters in debian-Debian information for the Linux release. For more information, see the following section. The mounted system cannot work on the NIC of other hosts. How can I perform this operation:

Run lspci to check whether the hardware information of the NIC exists.

Ifconfig cannot display the information of the current Nic. Only one lo entry is required, and then ifconfig eth0, eth1, or eht2 ......, If there is information, perform the next step.

After debian is installed, the IP address and DNS are automatically obtained by default, but sometimes we need to manually specify the IP address and DNS. What should we do? After reading the following instructions, you will.

In debian, the IP address configuration parameters are in the interface under the/etc/network/directory, while the DNS configuration parameters are in the resolv. in conf, the following describes the configuration parameters:

======================================

IP Address Settings:/etc/network/interface

// Obtain Dynamic DHCP

# Start the system activation device
# Loop address
Auto lo
Iface lo inet loopback

# Start the system activation device
# Set eth0 to DHCP
Auto eth0
Iface eth0 inet dhcp

// Obtain the Static data

# Start the system activation device
# Loop address
Auto lo
Iface lo inet loopback

# Start the system activation device
# Set the network adapter eth0 to the Static type
Auto eth0
Iface eth0 inet static

# Specifying IP addresses, subnet masks, and gateways
Address 192.168.0.1
Netmask 255.255.255.0
Gateway 192.168.0.1

Note: When configuring IP address parameters, "// dynamic DHCP get" and "// Static get" can only be one of them. The two cannot exist at the same time. Remember !!!

======================================

DNS Server Settings:/etc/resolv. conf
# It must be set. Otherwise, no URL can be accessed.

Nameserver 202.103.0.117

Nameserver 211.95.193.97

======================================

The preceding parameters can be modified as needed.

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.