筆記本連接學(xué)校wifi,開發(fā)板通過有限插入筆記本。
達到效果: 開發(fā)板、linux、pc互ping通且pc能上網(wǎng)。但是這種情況虛擬機不能上網(wǎng),要想上網(wǎng)后面會介紹。如果不是這種情況的,請點我進入電腦 開發(fā)板 虛擬機三者互ping通教程。
簡單介紹由于我們將使用無線網(wǎng)卡來使PC上網(wǎng),使用有限網(wǎng)卡使其三者互通。所以有限和無限的網(wǎng)段不能在一個段!
cmd
-> ipconfig
- vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth4
iface eth4 inet static
address 192.168.2.3
netmask 255.255.255.0
gateway 192.168.2.1
/etc/init.d/networking restart //重啟網(wǎng)卡
reboot
第三步:
設(shè)置開發(fā)板uboot-ip:
set ipaddr 192.168.2.4
set gatewayip 192.168.2.1
set netmask 255.255.255.0
save
ifconfig eth0 192.168.2.5
如果想要下次開發(fā)板重啟自動修改的話,輸入下面這條命令:
echo "ifconfig eth0 192.168.2.5" >> /etc/init.d/rcS
到此完畢!