3
静态IP配置-FreeBSD
source link: https://garywu520.github.io/2022/07/29/%E9%9D%99%E6%80%81IP%E9%85%8D%E7%BD%AE-FreeBSD/
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.
静态IP配置-FreeBSD
字数统计: 113字
| 阅读时长≈ 1分
1. 配置IP
cat /etc/rc.conf
hostname="FreeBSD-168"
ifconfig_vmx0="inet 172.16.10.168 netmask 255.255.255.0"
defaultrouter="172.16.10.1"
其中vmx0为网络接口名称
defaultrouter为网关,即配置后添加一条默认路由
2. 配置DNS
cat /etc/resolv.conf
nameserver 9.9.9.9
nameserver 8.8.8.8
3. 重启网络服务生效
/etc/netstart restart
此操作除了重启网络配置之外,还会加载防火墙配置(如果有)
扫一扫,分享到微信
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK