Board logo

標題: 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. 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  2.     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  3.     inet 127.0.0.1/8 scope host lo
  4.        valid_lft forever preferred_lft forever
  5.     inet6 ::1/128 scope host
  6.        valid_lft forever preferred_lft forever
  7. 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
  8.     link/ether b8:27:eb:a8:6e:1a brd ff:ff:ff:ff:ff:ff
  9.     inet 192.168.55.59/24 brd 192.168.55.255 scope global eth0
  10.        valid_lft forever preferred_lft forever
  11.     inet6 fe80::3cc5:8f24:ecb:d517/64 scope link
  12.        valid_lft forever preferred_lft forever
  13. 3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
  14.     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