首先说明一下,我局域网内的IP网段和子网掩码:
IP是:192.168.4.xxx
子网掩码是:255.255.240.0
配置网络有两种方法:图形化界面 和 文件。对于第二种方法,需要配置/etc/network/interfaces文件,示例如下:
auto lo iface lo inet loopback
auto eth0 iface eth0 inet static address 192.168.4.150 netmask 255.255.240.0 gateway 192.168.0.8
auto eth1 iface eth1 inet dhcp address 192.168.4.160 netmask 255.255.240.0 gateway 192.168.0.8 |