ip a
root@orangepi5max:~# ip a
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: enP3p49s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether c0:74:2b:fd:cb:b5 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.11/24 brd 192.168.1.255 scope global dynamic noprefixroute enP3p49s0
valid_lft 6143sec preferred_lft 6143sec
inet6 fe80::8989:bb:7aff:8010/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state DORMANT group default qlen 1000
link/ether c0:f5:35:bb:5b:fb brd ff:ff:ff:ff:ff:ff
chmod 600 /etc/netplan/orangepi-default.yaml
cat /etc/netplan/orangepi-default.yaml
1 network:
2 version: 2
3 renderer: NetworkManager
改为
network:
version: 2
renderer: NetworkManager
ethernets:
enP3p49s0:
dhcp4: no
dhcp6: no
addresses:
- 192.168.1.11/24
routes:
- to: default
via: 192.168.1.1
table: 100
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
wlan0:
dhcp4: no
dhcp6: no
addresses:
- 192.168.1.12/24
routes:
- to: default
via: 192.168.1.1
table: 200
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
netplan apply