使用网线从路由器连接到树莓派
先使用wifi连接树莓派
ssh进入树莓派
使用网线从路由器连接到树莓派
树莓派执行
ifconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:b9:e9:3e:6d txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::f146:8df:5bef:a232 prefixlen 64 scopeid 0x20<link>
ether e4:5f:01:4b:a5:44 txqueuelen 1000 (Ethernet)
RX packets 78698 bytes 5684127 (5.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 206954 bytes 307110648 (292.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 75 bytes 10186 (9.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 75 bytes 10186 (9.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.103 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::d01:2653:5fea:e87c prefixlen 64 scopeid 0x20<link>
ether e4:5f:01:4b:a5:45 txqueuelen 1000 (Ethernet)
RX packets 14909963 bytes 285315972 (272.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17825313 bytes 1283975898 (1.1 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0其中,etho的net(192.168.1.101)就是以太IP.wlan0的net(192.168.1.103)就是wifi IP.