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

Dynamic Host Configuration Protocol Client Daemon (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

posted @   孤逐王  阅读(568)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示