我有一台运行 K3OS 的 PC,带有两个以太网接口。一个 (eth0) 连接到没有具有静态 IP 地址的 DHCP 服务器的网络,另一个 (eth1) 连接到具有 DHCP 的网络,该网络返回默认网关。K3OS 使用 connman 作为其网络管理器。
我配置了两个 connman 服务,c 和 d:
/net/connman/service/ethernet_00606561750c_cable
Type = ethernet
Security = [ ]
State = ready
Favorite = True
Immutable = False
AutoConnect = True
Name = Wired
Ethernet = [ Method=auto, Interface=eth0, Address=xx:xx:xx:xx:xx:xx, MTU=1500 ]
IPv4 = [ Method=dhcp, Address=10.4.144.15, Netmask=255.255.255.0, Gateway=10.4.144.254 ]
IPv4.Configuration = [ Method=dhcp ]
IPv6 = [ ]
IPv6.Configuration = [ Method=auto, Privacy=disabled ]
Nameservers = [ 10.1.1.60 …Run Code Online (Sandbox Code Playgroud)