Linux shows no Nic

Source: Internet
Author: User

Network-related configuration files
2.1/etc/hosts
Contains a list of known hosts (in the local network. If the system IP address is not dynamically obtained, you can use it. For simple host name resolution (Dot-based representation), before requesting a DNS or NIS network name server,/etc/hosts. conf usually tells the resolution Program First, click here.
File Format:
IP address host name alias
$ CAT/etc/hosts
127.0.0.1 localhost. localdomain localhost
2.2/etc/service.ap-southeast-1.maxcompute.aliyun-inc.com/api
The Internet service file to convert the network service name to the port number/protocol. By inetd, telnet, tcpdump
And some other programs. Each row in the file corresponds to a service. It consists of four fields separated by tabs or spaces, indicating "service name", "port used", "protocol name", and
"Alias ".
File Format:
Service port/port type alias
$ CAT/etc/services | more
Tcpmux 1/tcp # TCP port service Multiplexer
Echo 7/tcp
Echo 7/udp
Discard 9/tcp sink null
Discard 9/udp sink null
Listen at 11/tcp users
Daytime 13/tcp
Daytime 13/udp
Netstat 15/tcp
QOTD 17/tcp quote
MSP 18/tcp # Message send Protocol
2.3/etc/hostname
The host name configuration file, which has only one line and records the Host Name of the local machine.
File Format:
Host Name
$ CAT/etc/hostname
Tonybox
2.4/etc/host. conf
When both DNS domain name resolution and/etc/hosts host table mechanism exist in the system, the/etc/host. conf determines the host name interpretation order. Example:
Order hosts, bind # name interpretation order
Multi on # Allow the host to have multiple IP addresses
Nospoof on # Disable IP Address Spoofing
Order is the keyword. It is defined to first interpret the name in the host table of the local host. If it cannot be interpreted, search for the BIND name server (DNS ).
2.5/etc/nsswitch. conf
Name Service Switch configuration file. It controls database search, including recognized hosts, users, and groups. In addition, this file defines the database to be searched, for example, this row:
Hosts: Files DNS
Specifies that the host database comes from two places, files (/etc/hosts file) and DNS, and files on the local machine are preferred over DNS.
$ CAT/etc/nsswitch. conf
Passwd: compat
GROUP: compat
Shadow: compat
Hosts: Files DNS
Networks: Files
Protocols: DB files
Services: DB files
Ethers: DB files
RPC: DB files

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.