給網卡eth0配置一個ip别名
sudo ifconfig eth0:0 10.108.125.6/22 up
若想儲存該配置,以便每次開機都可以使用該ip别名,則應
auto eth0
iface etho inet dhcp
auto eth0:0
iface eth0 inet static #本來想的是eth0:0,不小心錯寫成了eth0,但這樣卻成功了,可以通路網關。
address 10.108.125.6
netmask 255.255.252.0
gateway 10.108.124.1