linux -- centos 下网卡配置文件ifcfg-eth*的选项说明

在cent-os中,你可以redhat-config-network工具非常方便的配置网络信息。如果你没有安装这个工具也没关系,你可以通过直接编辑/etc/sysconfig/network-scripts/下面的网卡配置文件来进行配置,下面说明一下网卡配置文件夹的各个选项参数:

 

  • BOOTPROTO=<protocol> , where <protocol> is one of the following:

    • none — No boot-time protocol should be used.

    • bootp — The BOOTP protocol should be used.

    • dhcp — The DHCP protocol should be used.

  • BROADCAST=<address> , where <address> is the broadcast address. This directive is deprecated.

  • DEVICE=<name> , where <name> is the name of the physical device (except for dynamically-allocated PPP devices where it is the logical name ).

  • DNS{1,2} =<address> , where <address> is a name server address to be placed in /etc/resolv.conf if the PEERDNS directive is set to yes .

  • IPADDR=<address> , where <address> is the IP address.

  • NETMASK=<mask> , where <mask> is the netmask value.

  • NETWORK=<address> , where <address> is the network address. This directive is deprecated.

  • ONBOOT=<answer> , where <answer> is one of the following:

    • yes — This device should be activated at boot-time.

    • no — This device should not be activated at boot-time.

  • PEERDNS=<answer> , where <answer> is one of the following:

    • yes — Modify /etc/resolv.conf if the DNS directive is set. If using DCHP, then yes is the default.

    • no — Do not modify /etc/resolv.conf .

  • SRCADDR=<address> , where <address> is the specified source IP address for outgoing packets.

  • USERCTL=<answer> , where <answer> is one of the following:

    • yes — Non-root users are allowed to control this device.

    • no — Non-root users are not allowed to control this device.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值