【實(shí)戰(zhàn)】ping
[導(dǎo)讀]環(huán)境介紹
筆記本連接學(xué)校wifi,開發(fā)板通過有限插入筆記本。
如果不是這種情況的,請點(diǎn)我進(jìn)入電腦 開發(fā)板 虛擬機(jī)三者互ping通教程。
達(dá)到效果:
開發(fā)板、linux、pc互p
環(huán)境介紹
環(huán)境
IP
網(wǎng)關(guān)
192.168.2.1
PC
192.168.2.2
虛擬機(jī)
192.168.2.3
開發(fā)板-uboot
192.168.2.4
開發(fā)板-rootfs
192.168.2.5
筆記本連接學(xué)校wifi,開發(fā)板通過有限插入筆記本。
達(dá)到效果: 開發(fā)板、linux、pc互ping通且pc能上網(wǎng)。但是這種情況虛擬機(jī)不能上網(wǎng),要想上網(wǎng)后面會介紹。如果不是這種情況的,請點(diǎn)我進(jìn)入電腦 開發(fā)板 虛擬機(jī)三者互ping通教程。
簡單介紹由于我們將使用無線網(wǎng)卡來使PC上網(wǎng),使用有限網(wǎng)卡使其三者互通。所以有限和無限的網(wǎng)段不能在一個(gè)段!
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ā)板重啟自動(dòng)修改的話,輸入下面這條命令:
echo "ifconfig eth0 192.168.2.5" >> /etc/init.d/rcS
到此完畢!





