未修改过的/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
修改过的/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.200.99
netmask 255.255.255.0
gateway 192.168.200.100
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
启动项 /etc/init.d/networking
重启 sudo /etc/init.d/networking restart
---by(vangeldoro)
使用ssh2远程连接时,注意用户名和远程登陆用户名保持一致。
本文介绍如何在系统中为以太网接口eth0配置静态IP地址,并提供了重启网络服务的方法。通过设置静态IP地址192.168.200.99、子网掩码255.255.255.0及默认网关192.168.200.100,确保了网络连接的稳定性和可控性。

672

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



