配置文件:/etc/network/interface
配置设备使用静态ip地址,并自动启动,配置文件内容示例:
1 # This file describes the network interfaces available on your system
2 # and how to activate them. For more information, see interfaces(5).
3
4 # The loopback network interface
5 auto lo
6 iface lo inet loopback
7
8 # The primary network interface
9 allow-hotplug eth0
10 # iface eth0 inet dhcp
11 auto eth0
12 iface eth0 inet static
13 address 192.168.10.73
14 gateway 192.168.10.2
15 netmask 255.255.255.0
16 network 192.168.10.0
17 broadcast 192.168.10.255
保存后退出,使用命令 /etc/init.d/networking restart 重启网卡