標題:
Raspberry Pi —— 怎样check interface IP address?
[打印本頁]
作者:
角色
時間:
2019-2-7 21:11
標題:
Raspberry Pi —— 怎样check interface IP address?
本帖最後由 角色 於 2019-2-7 21:24 編輯
因为Raspberry Pi的network default是用DHCP client去DHCP server取IP的,我们要在外面用ssh进入系统,必须知道它的IP address才能进去。
我们采用ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:a8:6e:1a brd ff:ff:ff:ff:ff:ff
inet 192.168.55.59/24 brd 192.168.55.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::3cc5:8f24:ecb:d517/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether b8:27:eb:fd:3b:4f brd ff:ff:ff:ff:ff:ff
複製代碼
从上面可以看到eth0就是LAN port的interface name,IPV4 address是192.168.55.59
歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/)
Powered by Discuz! 7.2