在 OpenBSD 中建立互联网连接
了解如何在 OpenBSD 上设置网络连接。
1. 背景信息
OpenBSD 默认使用 dhcpleased 。不过,建议 与我们的基础设施不兼容。作为替代方案,您可以使用 isc-dhcp-client.
2. 手动网络配置步骤
无法通过 OpenBSD 安装程序自动建立网络连接。请按以下步骤手动设置网络连接: 手动:
- 从 DVD 引导启动并安装 OpenBSD ,安装过程中不要配置网络接口(选择“none”)。
使用 VNC 控制台 登录并手动配置网络:
ifconfig vio0 <IPAddress> netmask <IPNetmask>echo "nameserver 46.38.252.230\nnameserver 46.38.225.230" >> /etc/resolv.confroute add default <GatewayIP>
3. 若要永久保存网络配置,请创建文件 /etc/hostname.vio0 并写入以下内容:
inet <IPAddress> <IPNetmask>
!route add default <GatewayIP>
4. 然后运行 sh /etc/netstart 以配置网络接口。
3. 常见问题解答 (FAQ)
最后更新:2026 年 4 月 24 日
这篇文章有帮助吗?