1、修改/etc/network/interfaces文件内容
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 192.168.0.20
gateway 192.168.0.1
netmask 255.255.255.0
2、刷新ip地址
ip addr flush eth1
3、重启网络接口
ifdown eth1
ifup eth1
1万+

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



