链接本地IP网络配置 - PC
小心
网络配置的正确说明取决于您的SDK版本。在左下角的上拉菜单中选择您的SDK版本。
这将指导您如何将PC设置为link-local。在继续之前,请确保您首先将相机配置为link-local。转到 DHCP或链接本地IP网络配置 - 相机 了解如何执行此操作。
识别网络接口名称。
netsh interface ip show config Configuration for interface "Ethernet 2" DHCP enabled: Yes InterfaceMetric: 5 DNS servers configured through DHCP: None Register with which suffix: Primary only WINS servers configured through DHCP: None Configuration for interface "WiFi" DHCP enabled: Yes IP Address: 192.168.0.4 Subnet Prefix: 192.168.0.0/24 (mask 255.255.255.0) Default Gateway: 192.168.0.1 Gateway Metric: 0 InterfaceMetric: 35 DNS servers configured through DHCP: 192.168.0.1 Register with which suffix: Primary only WINS servers configured through DHCP: None
ip addr 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: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 link/ether e8:6a:64:d3:52:51 brd ff:ff:ff:ff:ff:ff altname enp0s31f6 3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 98:2c:bc:af:a5:19 brd ff:ff:ff:ff:ff:ff inet 192.168.2.165/20 brd 192.168.15.255 scope global dynamic noprefixroute wlp2s0 valid_lft 85346sec preferred_lft 85346sec inet6 fe80::e2b2:f4ff:e2f:b629/64 scope link noprefixroute valid_lft forever preferred_lft forever
获取链路本地IP地址。
Windows有一个自动私有IP寻址(APIPA) 功能。此功能默认启用,包括一 个 NetBIOS Naming Service (WINS)。为了触发此功能,必须配置为DHCP的网络接口。
netsh interface ip set address "<name>" dhcp
在此示例中,它将是:
netsh interface ip set address "Ethernet 2" dhcp
然后确保释放所有已分配的IP地址,以防有DHCP服务器在使用中。
ipconfig /release
可以通过 netplan 配置 Link-Local。首先,我们需要验证现有配置。
ls /etc/netplan/ 01-network-manager-all.yaml
在教程的例子中,我们为界面添加了一个新的配置。
sudo nano /etc/netplan/99_config.yaml
network: version: 2 renderer: networkd ethernets: eno1: link-local: [ipv4]
sudo netplan apply
配置网络设置后,连接相机并等待 45 秒以上。然后检查是否已分配链路本地 IP 地址。
netsh interface ipv4 show ipaddresses "<name>"
在此示例中,它将是:
netsh interface ipv4 show ipaddresses "Ethernet 2" Address 169.254.208.207 Parameters --------------------------------------------------------- Interface Luid : Ethernet 2
ip addr 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: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether e8:6a:64:d3:52:51 brd ff:ff:ff:ff:ff:ff altname enp0s31f6 inet 169.254.242.125/16 brd 169.254.255.255 scope link eno1 valid_lft forever preferred_lft forever 3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 98:2c:bc:af:a5:19 brd ff:ff:ff:ff:ff:ff inet 192.168.2.165/20 brd 192.168.15.255 scope global dynamic noprefixroute wlp2s0 valid_lft 80799sec preferred_lft 80799sec inet6 fe80::e2b2:f4ff:e2f:b629/64 scope link noprefixroute valid_lft forever preferred_lft forever