Linux Common network configuration file

Source: Internet
Author: User

Name Service interchange Configuration (/etc/nsswitch.conf) file

Every keyword in/etc/nsswitch.conf is a file name that can be/etc/nsswitch.conf controlled under the/etc/directory.

Aliases: Mail aliases

passwd: System User

Group: User Workgroup

Shadow: Encrypt password

Hosts: Host name

Networks: Network Name

Protocols: Network protocol

Services: Service Name

Ethers: Ethernet

RPC: Name of the remote process call

Netgroup: In-network Working Group

Files: In addition to Netgroup, valid for all other keywords

DNS: only meaningful for hosts

/etc/services is a network service configuration file that converts the network service name to a port number/protocol. Each line in the file corresponds to a service that consists of 4 fields that represent the service name, use port, protocol name, and service description.

/etc/resolv.conf is a DNS client configuration file that, when DNS client users need DNS resolution, sends a query request to the IP address defined by the NameServer statement in this file (the IP address of the DNS server). You can also set up a domain name that requires queries, etc.

Search domain name (eg:liu.com): Set the search domain to liu.com

nameserver IP Address (eg:192.168.1.1): Set the IP address of the DNS server to 192.168.1.1

Domain domain name (eg:li.com): Define local domain name

/etc/sysconfig/network is primarily used to set the hostname of the Linux system and whether the network card information is loaded when the system starts

Networking=yes: Indicates that the network IPV4 protocol is loaded at system startup

Hostname=liu.a.com: Indicates that the host name of the system is set to Liu.a.com

/etc/sysconfig/network-scripts/ifcfg-eth0 is the NIC information profile, including network interface devices, protocol type (static, dynamic), IP address, subnet mask, gateway, DNS server, and so on.

The contents of the static IP settings are as follows:

Device=eth0

Onboot=yes//Whether the network adapter information is loaded when the system is powered on

Bootproto=static

ipaddr=192.168.1.1

netmask=255.255.255.0

gateway=192.168.1.254

The contents of the dynamic IP settings are as follows:

Device=eth0

Onboot=yes

Bootproto=dhcp

This article from "Fancy" blog, reproduced please contact the author!

Linux Common network configuration file

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.