centos与debian网卡详解程序员

debian    /etc/network/interfaces

# This file describes the network interfaces available on your system 
# and how to activate them. For more information, see interfaces(5). 
 
# The loopback network interface 
auto lo 
iface lo inet loopback 
 
# The primary network interface 
auto eth0 
iface eth0 inet static 
        address 192.168.1.111 
        network 192.168.1.0 
        netmask 255.255.255.0 
        broadcast 192.168.1.255 
        gateway 192.168.1.1

centos /etc/sysconfig/network-script/ifcfg-eth0

DEVICE=eth0 
HWADDR=08:00:27:F6:17:CA 
TYPE=Ethernet 
UUID=fb7ada01-fa87-4f9d-8c03-3155f175b00f 
ONBOOT=yes 
NM_CONTROLLED=yes 
BOOTPROTO=none 
IPADDR=192.168.1.3 
NETMASK=255.255.255.0 
GATEWAY=192.168.1.1

 

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/2501.html

(0)
上一篇 2021年7月16日
下一篇 2021年7月16日

相关推荐

发表回复

登录后才能评论