Page tree
Skip to end of metadata
Go to start of metadata

配置静态IP

配置语法

# connmanctl config <service> --ipv4 manual <ip address> <netmask> <gateway> 
# connmanctl config wifi_dc85de828967_38303944616e69656c73_managed_psk --ipv4 manual 192.168.1.100 255.255.255.0 192.168.1.254

配置动态DHCP连接

# connmanctl config ethernet_985dad375f63_cable --ipv4 dhcp


配置DNS

# connmanctl config <service> --nameservers <dns-addr> 
# connmanctl config wifi_dc85de828967_38303944616e69656c73_managed_psk --nameservers 8.8.8.8 4.4.4.4 



连接受保护的WiFi热点

# connmanctl
connmanctl> scan wifi
connmanctl> services
connmanctl> agent on
connmanctl> connect wifi_dc85de828967_38303944616e69656c73_managed_psk
Agent RequestInput wifi_dc85de828967_38303944616e69656c73_managed_psk
  Passphrase = [ Type=psk, Requirement=mandatory ]
  Passphrase?
connmanctl> quit

连接开放的WiFi热点

# connmanctl scan wifi
# connmanctl services
*AO MyNetwork               wifi_dc85de828967_68756773616d_managed_psk
    OtherNET                wifi_dc85de828967_38303944616e69656c73_managed_psk 
    AnotherOne              wifi_dc85de828967_3257495245363836_managed_wep
    FourthNetwork           wifi_dc85de828967_4d7572706879_managed_wep
    AnOpenNetwork           wifi_dc85de828967_4d6568657272696e_managed_none
# connmanctl connect wifi_dc85de828967_4d6568657272696e_managed_none

  • No labels