# ifconfig eth0 up
[ 32.627544] Generic PHY stmmac-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:01, irq=-1)
[ 32.639435] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 32.647233] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
# ifup eth0
ifup: ignoring unknown interface eth0
# [ 97.666629] random: crng init done
# ifconfig eth0 192.168.1.100
# ifconfig
eth0 Link encap:Ethernet HWaddr 02:00:91:F6:8D:99
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:38
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# ping 10.23.14.63
PING 10.23.14.63 (10.23.14.63): 56 data bytes
ping: sendto: Network is unreachable
我在串口助手上进行ping操作,请问怎么才知道v3s的网卡是正常工作?ping的地址应该是ping什么地址,v3s需要接网线吗?
离线
V3s地址:192.168.1.100
子网掩码:255.255.255.0如果你不设置网关的情况下,是不能ping通 ping 10.23.14.63
只能ping通: 192.168.1.1 - 192.168.1.254
网有多大, 由子网掩码控制了!
我在u-boot命令行中设置了网关ip是
ethact=ethernet@1c30000
ethaddr=02:00:91:f6:8d:99
fdt_addr_r=0x41800000
fdtcontroladdr=43b40128
fdtfile=sun8i-v3s-licheepi-zero.dtb
gatewayip=192.168.253.1
ipaddr=192.168.126.100
kernel_addr_r=0x41000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
netmask=255.255.255.0
这样算设置了网关?
离线
linux下设置网关有专门的命令:
route add default gw 192.168.0.xxx
还有就是进行ping操作的时候 v3s板子需要接上网线?
我接上路由器网线就
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
# [ 257.926361] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
离线
那v3s板子不接网线 可以ping通笔记本?
离线
不接网线能ping通?有无线网卡吧?
我现在有点搞不懂原理,是将笔记本本v3s板子连在一起,然后进行ping?能ping通说明网卡正常工作?
离线
但是我把v3s板子和笔记本连在一起还是平不同、
ping 169.254.63.187
PING 169.254.63.187 (169.254.63.187): 56 data bytes
ping: sendto: Network is unreachable
# [ 607.606202] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
169.254.63.187是我将v3s和笔记本连在一起时候,笔记本的IP地址,..是驱动没设置好?
离线
已经解决了 谢谢大家
离线
怎么解决的?
我没有将电脑IP地址和板子的IP地址设置在同一网段下,所以ping不通,设置在同一网段下就可以了
离线