Gentoo网络管理方法

OpenRC/netifrc

Netifrc is a collection of modules created to configure and manage network interfaces via individual, per-interface scripts located in the /etc/init.d/ directory.
Enable Gentoo’s network stack (net.* scripts).

检测网卡名字
ifconfig -a
or
ls /sys/class/net
添加网卡

通过net.lo链接

ln -s /etc/init.d/net.lo /etc/init.d/net.ifname
/etc/init.d/net.ifname start
rc-update add net.ifname default
配置网络IP

编辑/etc/conf.d/net文件

config_ifname="192.168.1.10/24"    #ip、掩码
routes_ifname="default via 192.168.1.1"    #网关
添加DNS

编辑`/etc/resolv.conf文件

nameserver 202.99.166.4
nameserver 202.99.160.68

Newnet

enable the new network stack (experimental)

DHCPCD

D**ynamic *H**ost **C**onfiguration **P**rotocol **C**lient **D**aemon (DHCPCD*) is a popular DHCP client for Gentoo Linux users.
使用dhcpcd自动获取IP,需要将net.*scripts标本停用,并设置/etc/conf.d/netconfig_ifname="dhcp"或留空。

dhcpcd-ui

https://wiki.gentoo.org/wiki/Dhcpcd-ui#Usage
- dhcpcd-gtk

NetworkManager

NetworkManager is a network management software for Ethernet, Wifi, DSL, dialup, VPN, WiMAX and mobile broadband network connections.
It’s a good idea to use dhclient from net-misc/dhcp instead of net-misc/dhcpcd.

NetworkManager GUI

参考:
Network management
Network_management_using_DHCPCD/OpenRC_message
Netifrc
Network management using DHCPCD
NetworkManager

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值