#vi /etc/network/interfaces
OR$ sudo vi /etc/network/interfaces
Modify as follows:
1 auto eth0 2 auto eth0:0 3 auto eth0:1 4 iface eth0 inet static 5 address 192.168.1.1 6 netmask 255.255.255.248 7 gateway 192.168.1.254 8 9 iface eth0:0 inet static 10 address 192.168.1.2 11 netmask 255.255.255.248 12 13 iface eth0:1 inet static 14 address 192.168.1.3 15 netmask 255.255.255.248 16 17 # add rest of alias / binds below
Save and close the file.
Now restart networking, enter:# /etc/init.d/networking restart
OR$ sudo /etc/init.d/networking restart
时间: 2024-10-21 01:32:49