47

linux下的网络设备文件配置

 5 years ago
source link: https://www.linuxprobe.com/linux-etc-file.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

系统网络设备的配置文件保存在"/etc/sysconfig/network-scripts”目录下,ifcfg-eth0 包含第一块网卡的配置信息,ifcfg-eth1 包含第二块网卡的配置信息。
下面是“/etc/sysconfig/network-scripts/ifcfg-eth0”文件的示例:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.66
NETMASK=255.255.255.0
GATEWAY=192.168.0.65

若希望手工修改网络地址或在新的接口上增加新的网络界面,可以通过修改对应的文件(ifcfg-ethN) 或创建新的文件来实现。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK