Linux network related configuration files
- 2020-06-19 12:21:11
- OfStack
Linux network-related profile
1. Correspondence between network parameters and configuration files
所需要的网络参数 | 主要配置文件命名 | 重要参数 |
IP Netmask DHCP Gateway等 |
/etc/sysconfig/network-scripts/ifcfg-eth0 |
DEVICE=网卡名称 BOOTPROTO=是否使用dhcp HWADDR = 是否加入网卡MAC地址 IPADDR = IP地址 NETMASK = 子网掩码 ONBOOT = 要不要默认启动此接口 GATEWAY = 网关地址 |
主机名 | /etc/sysconfig/network |
NETWORKING = 要不要使用网络 NETWORKING_IPV6 = 是否支持IPv6 |
DNS IP | /etc/resolv.conf | Name Server DNS的IP地址 |
私有IP对应的主机名 | /etc/hosts | 私有IP 主机名 别名 |
2 Other files
/etc/service
This file records the port Numbers defined by HTTP, FTP, SSH, Telnet and other services built on TCP/IP. If you need to customize a new protocol corresponding to port, you need to change this file.
/etc/protocols
This file defines the data related to IP packet protocol, including the definition of ICMP/TCP/UDP packet protocol.
Above is the Linux network configuration information, if you have any questions, please leave a message or to this site community exchange discussion, thank you for reading, hope to help you, thank you for your support to this site!