进入/etc/network/interface
auto lo
iface lo inet loopback
在后面添加
auto eth0
iface eth0 inet static
address 10.78.3.4 //IP地址
netmask 255.255.0.0 //掩码
gateway 10.78.1.254 //网关
DNS 在/etc/resolv.config里,不用配置,已经有了
重启/etc/init.d/networking
本文详细介绍了如何在Linux环境下手动配置网络接口eth0,包括设置IP地址、子网掩码、默认网关,并说明了DNS配置及网络服务重启过程。
进入/etc/network/interface
auto lo
iface lo inet loopback
在后面添加
auto eth0
iface eth0 inet static
address 10.78.3.4 //IP地址
netmask 255.255.0.0 //掩码
gateway 10.78.1.254 //网关
DNS 在/etc/resolv.config里,不用配置,已经有了
重启/etc/init.d/networking
453

被折叠的 条评论
为什么被折叠?