參考網頁: http://longwind.blog.51cto.com/419072/806302
我主要的目標是將兩個網卡同時默認啟用兩個網卡:
只要修改配置的信息:# vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
雖然我配置了Ubuntu,但是我自己用的是arch linux,我就又想找出我自己發行版的網絡配置是哪里。
/etc/hostname: 配置主機名稱
/etc/hosts: 配置域名轉換的
/sys/class/net:記錄當前有線或無線的設備的名字。
udev程序, 是用於給設備分配名字的。寫規則來進行分配
清用網卡是使用ip命令:ip link set eth0 up
使用dhcpcd來進行動態分配。
所以,我雖然沒有第二個網卡添加上,我估計的方法就是,udev會自動識別除這個設備,然后我可以是ip命令來啟用。
然后我再看到另外一個帖子(https://www.ostechnix.com/configure-static-dynamic-ip-address-arch-linux/),說了以下幾種方法:
Method 1: Configure Static IP Address in Arch Linux using netctl
Method 2: Configure Static IP Address in Arch Linux using systemd