Developing lightweight computation at the DSG edge

Commit 34bccc94 authored by p4u's avatar p4u
Browse files

- Adapt remaining code to the new gateways approach

- Some small changes in the networking functions (node/community id)
- Change non_overlapping name section for roaming
parent 8c98a20a
...@@ -19,16 +19,17 @@ config 'qmp' 'update' ...@@ -19,16 +19,17 @@ config 'qmp' 'update'
option 'filter' 'sysupgrade' option 'filter' 'sysupgrade'
option 'preserve' '/etc/config/qmp /etc/shadow /etc/passwd /etc/rc.local /etc/firewall.user /etc/dropbear /etc/config/b6m-spread /etc/qmp/.birth' option 'preserve' '/etc/config/qmp /etc/shadow /etc/passwd /etc/rc.local /etc/firewall.user /etc/dropbear /etc/config/b6m-spread /etc/qmp/.birth'
config 'qmp' 'non_overlapping' config 'qmp' 'roaming'
# Each node assings a non-overlapping DHCP IPv4 ranges over a /16 network on lan device # Each node assings a non-overlapping DHCP IPv4 ranges over a /16 network on lan device
option 'ignore' '0' option 'ignore' '0'
option 'dhcp_offset' '2' option 'dhcp_offset' '2'
option 'qmp_leasetime' '1h' option 'qmp_leasetime' '1h'
config 'qmp' 'networks' config 'qmp' 'networks'
option 'dns' '141.1.1.1 85.126.4.170 202.83.95.227' option 'dns' '141.1.1.1 85.126.4.170 202.83.95.227'
option 'lan_address' '172.30.22.1' option 'lan_address' '172.30.22.1'
option 'lan_netmask' '255.255.255.0' option 'lan_netmask' '255.255.0.0'
#option 'publish_lan' '0' # deprecated #option 'publish_lan' '0' # deprecated
option 'mesh_protocol_vids' 'olsr6:1 bmx6:2' # means olsr6 use vlantag 10+1, bmx6 use vlantag 10+2 option 'mesh_protocol_vids' 'olsr6:1 bmx6:2' # means olsr6 use vlantag 10+1, bmx6 use vlantag 10+2
option 'mesh_vid_offset' '10' option 'mesh_vid_offset' '10'
...@@ -38,93 +39,10 @@ config 'qmp' 'networks' ...@@ -38,93 +39,10 @@ config 'qmp' 'networks'
option 'bmx6_mesh_prefix48' 'fd02:0:0' option 'bmx6_mesh_prefix48' 'fd02:0:0'
option 'bmx6_ripe_prefix48' '2012:0:0' # suffix is autoconfigured based on community_node_id option 'bmx6_ripe_prefix48' '2012:0:0' # suffix is autoconfigured based on community_node_id
option 'bmx6_ipv4_prefix24' '10.202.0' # last 8 bits are autoconfigured based on MAC option 'bmx6_ipv4_prefix24' '10.202.0' # last 8 bits are autoconfigured based on MAC
# option 'bmx6_ipv4_address' '' # specify it if you want to have a specific IPv4 address # option 'bmx6_ipv4_address' '' # specify it if you want to have a specific IPv4 address
# option 'wan_metric' '2048' # metric for WAN interfaces (default: 2048) # option 'wan_metric' '2048' # metric for WAN interfaces (default: 2048)
# Deprecated
# option 'bmx6_tablePrefTuns' '7000'
# option 'bmx6_tableTuns' '70'
# option 'bmx6_throwRules' '1'
option 'netserver' '1' option 'netserver' '1'
config 'gateway'
option 'name' 'inet6'
option 'type' 'search'
option 'network' 'fc00::/7'
option 'maxPrefixLen' '0'
config 'gateway'
option 'name' 'inet6'
option 'ignore' '1'
option 'type' 'offer'
option 'network' '::/0'
option 'bandwidth' '100000'
config 'gateway'
option 'name' 'inet4'
option 'type' 'search'
option 'network' '0.0.0.0/0'
option 'maxPrefixLen' '0'
config 'gateway'
option 'name' 'inet4'
option 'ignore' '1'
option 'type' 'offer'
option 'network' '0.0.0.0/0'
option 'bandwidth' '100000'
config 'gateway'
option 'name' 'community6'
option 'type' 'search'
option 'network' '::/0'
option 'minPrefixLen' '32'
option 'maxPrefixLen' '48'
config 'gateway'
option 'name' 'cloud6'
option 'type' 'search'
option 'network' '::/0'
option 'minPrefixLen' '48'
config 'gateway'
option 'name' 'community'
option 'type' 'search'
option 'network' '10.0.0.0/8'
option 'maxPrefixLen' '8'
config 'gateway'
option 'name' 'community'
option 'type' 'offer'
option 'network' '10.0.0.0/8'
option 'bandwidth' '100000'
option 'ignore' '1'
config 'gateway'
option 'name' 'cloud'
option 'type' 'search'
option 'network' '10.0.0.0/8'
option 'minPrefixLen' '24'
config 'gateway'
option 'ignore' '1'
option 'type' 'search'
option 'network' '::/0'
option 'gwName' 'qMp-example'
config 'gateway'
option 'ignore' '1'
option 'type' 'search'
option 'gwName' 'qMp-example'
option 'network' '10.1.0.0/16'
option 'address' '10.2.2.2/32'
option 'minPrefixLen' '16'
option 'maxPrefixLen' '24'
option 'hysteresis' '20'
option 'bonus' '10'
option 'minBandwidth' '10000'
option 'exportDistance' '10'
config 'qmp' 'wireless' config 'qmp' 'wireless'
option 'driver' 'mac80211' option 'driver' 'mac80211'
option 'country' 'SP' option 'country' 'SP'
......
...@@ -62,6 +62,15 @@ qmp_get_primary_device() { ...@@ -62,6 +62,15 @@ qmp_get_primary_device() {
echo "$primary_mesh_device" echo "$primary_mesh_device"
} }
# qmp_get_id [dec]
qmp_get_id() {
community_node_id="$(qmp_uci_get node.community_node_id)"
[ -z "$community_node_id" ] && \
community_node_id="$(qmp_get_mac_for_dev $(qmp_get_primary_device) | awk -F':' '{print $6}' )"
[ "$1" == "dec" ] && echo "$(( 0x$community_node_id % 0x100 ))" || echo "$community_node_id"
}
qmp_check_device() { qmp_check_device() {
ip link show $1 1> /dev/null 2>/dev/null ip link show $1 1> /dev/null 2>/dev/null
return $? return $?
...@@ -640,43 +649,41 @@ qmp_get_ula96() { ...@@ -640,43 +649,41 @@ qmp_get_ula96() {
} }
qmp_get_addr64() { qmp_get_addr64() {
local prefix=$1 local prefix=$1
local node=$2 local node=$2
local suffix=$3 local suffix=$3
local mask=$4 local mask=$4
local addr64=$( qmp_calculate_addr64 $prefix $node $suffix ) local addr64=$( qmp_calculate_addr64 $prefix $node $suffix )
echo "$addr64/$mask" echo "$addr64/$mask"
} }
qmp_configure_rescue_ip_device() qmp_configure_rescue_ip_device() {
{ local dev="$1"
local dev="$1" local conf="$2"
local conf="$2" local viface="$3"
local viface="$3"
# Configuring rescue IPs # Configuring rescue IPs
if [ "$dev" == "eth1" ] && qmp_is_routerstationpro if [ "$dev" == "eth1" ] && qmp_is_routerstationpro
then then
if qmp_is_in "eth1.1" $(qmp_get_devices lan) if qmp_is_in "eth1.1" $(qmp_get_devices lan)
then then
return return
fi fi
qmp_configure_rescue_ip eth1 ${viface}_1_rescue
qmp_attach_device_to_interface @$viface.1 ${viface}_1_rescue qmp_configure_rescue_ip eth1 ${viface}_1_rescue
elif qmp_is_in "$dev" $(qmp_get_devices wan) || [ "$dev" == "br-lan" ] qmp_attach_device_to_interface @$viface.1 ${viface}_1_rescue
then
# If it is WAN or LAN elif qmp_is_in "$dev" $(qmp_get_devices wan) || [ "$dev" == "br-lan" ]
qmp_configure_rescue_ip $dev ${viface}_rescue then
qmp_attach_device_to_interface $dev ${viface}_rescue # If it is WAN or LAN
elif qmp_is_in "$dev" $(qmp_get_devices mesh) && [ "$dev" != "br-lan" ] qmp_configure_rescue_ip $dev ${viface}_rescue
then qmp_attach_device_to_interface $dev ${viface}_rescue
# If it is only mesh device elif qmp_is_in "$dev" $(qmp_get_devices mesh) && [ "$dev" != "br-lan" ]
qmp_configure_rescue_ip $dev then
qmp_attach_device_to_interface $dev $viface # If it is only mesh device
fi qmp_configure_rescue_ip $dev
qmp_attach_device_to_interface $dev $viface
fi
} }
qmp_configure_prepare() { qmp_configure_prepare() {
...@@ -690,6 +697,58 @@ qmp_configure_prepare() { ...@@ -690,6 +697,58 @@ qmp_configure_prepare() {
echo "" > /etc/config/$conf echo "" > /etc/config/$conf
} }
qmp_configure_lan() {
# Set some important variables
local dns="$(qmp_uci_get networks.dns)"
local lan_mask="$(qmp_uci_get networks.lan_netmask)"
local lan_addr="$(qmp_uci_get networks.lan_address)"
# If the lan address is empty in the configuration
[ -z "$lan_addr" ] && {
[ $(qmp_uci_get roaming.ignore) -eq 0 ] && {
lan_addr="172.30.22.1"
lan_mask="255.255.0.0"
qmp_log No LAN ip address configured, roaming mode enabled, autoconfiguring $lan_addr/$lan_mask
} || {
lan_addr="10.0.$(qmp_get_id dec).1"
lan_mask="255.255.255.0"
qmp_uci_set networks.bmx6_ipv4_address $lan_addr/24
qmp_log No LAN ip address configured, community mode enabled, autoconfiguring $lan_addr/$lan_mask
}
qmp_uci_set networks.lan_address $lan_addr
qmp_uci_set networks.lan_netmask $lan_mask
}
# If layer3 roaming enabled, check it is configured properly
# last byte of lan adress must be "1" to avoid overlappings
# mask must be /16
if [ $(qmp_uci_get roaming.ignore) -eq 0 ]; then
lan_mask="255.255.0.0"
lan_addr=$(echo $lan_addr | sed -e 's/\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\)\.[0-9]\{1,3\}/\1.1/1')
qmp_uci_set networks.lan_address $lan_addr
qmp_uci_set networks.lan_netmask $lan_mask
fi
# Configure DHCP
qmp_configure_dhcp
# LAN device (br-lan) configuration
echo "Configuring LAN bridge"
qmp_uci_set_raw network.lan="interface"
qmp_uci_set_raw network.lan.type="bridge"
qmp_uci_set_raw network.lan.auto='1'
qmp_uci_set_raw network.lan.proto="static"
qmp_uci_set_raw network.lan.ipaddr="$lan_addr"
qmp_uci_set_raw network.lan.netmask="$lan_mask"
[ -n "$dns" ] && qmp_uci_set_raw network.lan.dns="$dns"
# Attaching LAN devices to br-lan
local device
for device in $(qmp_get_devices lan) ; do
qmp_attach_device_to_interface $device lan
done
}
qmp_configure_network() { qmp_configure_network() {
local conf="network" local conf="network"
...@@ -700,47 +759,15 @@ qmp_configure_network() { ...@@ -700,47 +759,15 @@ qmp_configure_network() {
qmp_configure_prepare_network $conf qmp_configure_prepare_network $conf
primary_mesh_device="$(qmp_get_primary_device)"
lsb_prim_mac="$(qmp_get_mac_for_dev $primary_mesh_device | awk -F':' '{print $6}' )"
if qmp_uci_test qmp.interfaces.mesh_devices && qmp_uci_test qmp.networks.mesh_protocol_vids && qmp_uci_test qmp.networks.mesh_vid_offset; then if qmp_uci_test qmp.interfaces.mesh_devices && qmp_uci_test qmp.networks.mesh_protocol_vids && qmp_uci_test qmp.networks.mesh_vid_offset; then
local vids="$(qmp_uci_get networks.mesh_protocol_vids | awk -F':' -v RS=" " '{print $2 + '$(uci -q get qmp.networks.mesh_vid_offset)'}')" local vids="$(qmp_uci_get networks.mesh_protocol_vids | awk -F':' -v RS=" " '{print $2 + '$(uci -q get qmp.networks.mesh_vid_offset)'}')"
fi fi
if [[ -n "$vids" ]] && qmp_is_routerstationpro ; then if [[ -n "$vids" ]] && qmp_is_routerstationpro ; then
qmp_configure_routerstationpro_switch "$vids" qmp_configure_routerstationpro_switch "$vids"
elif qmp_uci_test qmp.interfaces.configure_switch ; then
local switch_device="$(qmp_uci_get interfaces.configure_switch)"
uci set $conf.$switch_device="switch"
uci set $conf.$switch_device.enable="1"
uci set $conf.$switch_device.enable_vlan="1"
uci set $conf.$switch_device.reset="1"
uci set $conf.lan_ports="switch_vlan"
uci set $conf.lan_ports.vlan="1"
uci set $conf.lan_ports.device="$switch_device"
uci set $conf.lan_ports.ports="0 1 5t"
uci set $conf.wan_ports="switch_vlan"
uci set $conf.wan_ports.vlan="2"
uci set $conf.wan_ports.device="$switch_device"
uci set $conf.wan_ports.ports="4 5t"
if [[ -n "$vids" ]] ; then
for vid in $vids; do
local mesh_ports="mesh_ports_vid${vid}"
uci set $conf.$mesh_ports="switch_vlan"
uci set $conf.$mesh_ports.vlan="$vid"
uci set $conf.$mesh_ports.device="$switch_device"
uci set $conf.$mesh_ports.ports="2t 3t 5t"
done
fi
fi fi
# LoopBack device # LoopBack device
...@@ -761,47 +788,9 @@ qmp_configure_network() { ...@@ -761,47 +788,9 @@ qmp_configure_network() {
qmp_uci_set_raw network.$viface.metric="${metric:-2048}" qmp_uci_set_raw network.$viface.metric="${metric:-2048}"
done done
# Set some important variables # LAN devices configuration
local primary_mesh_device="$(qmp_get_primary_device)" qmp_configure_lan
local lsb_prim_mac="$(qmp_get_mac_for_dev $primary_mesh_device | awk -F':' '{print $6}' )"
local community_node_id="$(qmp_uci_get node.community_node_id)"
local dns="$(qmp_uci_get networks.dns)"
local lan_mask="$(qmp_uci_get networks.lan_netmask)"
local lan_addr="$(qmp_uci_get networks.lan_address)"
lsb_prim_mac=${lsb_prim_mac:-0}
primary_mesh_device=${primary_mesh_device:-eth0}
community_node_id=${community_node_id:-$lsb_prim_mac}
lan_addr=${lan_addr:-172.30.22.1}
lan_mask=${lan_mask:-255.255.255.0}
# If DHCP non overlapping (layer3 roaming) enabled
# last byte of lan adress must be "1" to avoid overlappings
# mask must be /16
if [ $(qmp_uci_get non_overlapping.ignore) -eq 0 ]; then
lan_mask="255.255.0.0"
lan_addr=$(echo $lan_addr | sed -e 's/\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\)\.[0-9]\{1,3\}/\1.1/1')
fi
# Configure DHCP
qmp_configure_dhcp $community_node_id
# LAN device (br-lan) configuration
echo "Configuring LAN bridge"
qmp_uci_set_raw network.lan="interface"
qmp_uci_set_raw network.lan.type="bridge"
qmp_uci_set_raw network.lan.auto='1'
qmp_uci_set_raw network.lan.proto="static"
qmp_uci_set_raw network.lan.ipaddr="$lan_addr"
qmp_uci_set_raw network.lan.netmask="$lan_mask"
[ -n "$dns" ] && qmp_uci_set_raw network.lan.dns="$dns"
# Attaching LAN devices to br-lan
local device
for device in $(qmp_get_devices lan) ; do
qmp_attach_device_to_interface $device lan
done
# MESH devices configuration # MESH devices configuration
local counter=1 local counter=1
...@@ -885,7 +874,6 @@ qmp_unconfigure_bmx6_gateways() ...@@ -885,7 +874,6 @@ qmp_unconfigure_bmx6_gateways()
config_foreach qmp_remove_qmp_bmx6_tunnels tunOut config_foreach qmp_remove_qmp_bmx6_tunnels tunOut
} }
qmp_translate_configuration() qmp_translate_configuration()
{ {
orig_config=$1 orig_config=$1
...@@ -909,7 +897,7 @@ qmp_add_qmp_bmx6_tunnels() ...@@ -909,7 +897,7 @@ qmp_add_qmp_bmx6_tunnels()
local name="$section" local name="$section"
local config=bmx6 local config=bmx6
local ignore local ignore
local t
config_get ignore "$section" ignore config_get ignore "$section" ignore
[ "$ignore" = "1" ] && return [ "$ignore" = "1" ] && return
...@@ -918,22 +906,17 @@ qmp_add_qmp_bmx6_tunnels() ...@@ -918,22 +906,17 @@ qmp_add_qmp_bmx6_tunnels()
qmp_log Configuring gateway $name qmp_log Configuring gateway $name
local type local type="$(qmp_uci_get_raw gateways.$name)"
config_get type "$section" type
if [ "$type" = "offer" ] if [ "$type" = "offer" ]
then then
bmx6_type=tunIn bmx6_type=tunIn
uci set $config.$name="$bmx6_type" uci set $config.$name="$bmx6_type"
uci set $config.$name.$bmx6_type="$section" uci set $config.$name.$bmx6_type="$name"
qmp_translate_configuration gateways $section network $config $name $bmx6_type
qmp_translate_configuration gateways $section network $config $name qmp_translate_configuration gateways $section network $config $name
#qmp_translate_configuration gateways $section bandwidth $config $name
else else
# if [ "$type" = "search" ]
bmx6_type=tunOut bmx6_type=tunOut
uci set $config.$name="$bmx6_type" uci set $config.$name="$bmx6_type"
uci set $config.$name.$bmx6_type="$section" uci set $config.$name.$bmx6_type="$section"
local t
for t in network gwName address minPrefixLen maxPrefixLen hysteresis bonus \ for t in network gwName address minPrefixLen maxPrefixLen hysteresis bonus \
tableRule minBandwidth exportDistance tableRule minBandwidth exportDistance
do do
...@@ -977,17 +960,13 @@ qmp_configure_bmx6() { ...@@ -977,17 +960,13 @@ qmp_configure_bmx6() {
local primary_mesh_device="$(qmp_get_primary_device)" local primary_mesh_device="$(qmp_get_primary_device)"
local community_node_id local community_node_id=$(qmp_get_id)
if qmp_uci_test qmp.node.community_node_id; then
community_node_id="$(qmp_uci_get node.community_node_id)"
elif ! [ -z "$primary_mesh_device" ] ; then
community_node_id="$( qmp_get_mac_for_dev $primary_mesh_device | awk -F':' '{print $6}' )"
fi
if qmp_uci_test qmp.interfaces.mesh_devices && if qmp_uci_test qmp.interfaces.mesh_devices &&
qmp_uci_test qmp.networks.mesh_protocol_vids && qmp_uci_test qmp.networks.mesh_protocol_vids &&
qmp_uci_test qmp.networks.mesh_vid_offset; then qmp_uci_test qmp.networks.mesh_vid_offset
then
local counter=1 local counter=1
for dev in $(qmp_get_devices mesh); do for dev in $(qmp_get_devices mesh); do
...@@ -1026,8 +1005,8 @@ qmp_configure_bmx6() { ...@@ -1026,8 +1005,8 @@ qmp_configure_bmx6() {
uci set $conf.tmain.tun4Address="$bmx6_ipv4_address/$bmx6_ipv4_netmask" uci set $conf.tmain.tun4Address="$bmx6_ipv4_address/$bmx6_ipv4_netmask"
else else
local ipv4_suffix24="$(( 0x$community_node_id % 0x100 ))" local ipv4_suffix24="$(qmp_get_id dec)"
local ipv4_prefix24="$(uci get qmp.networks.bmx6_ipv4_prefix24)" local ipv4_prefix24="$(qmp_uci_get networks.bmx6_ipv4_prefix24)"
if [ $(echo -n "$ipv4_prefix24" | tr -d [0-9] | wc -c) -lt 2 ]; then if [ $(echo -n "$ipv4_prefix24" | tr -d [0-9] | wc -c) -lt 2 ]; then
ipv4_prefix24="${ipv4_prefix24}.0" ipv4_prefix24="${ipv4_prefix24}.0"
fi fi
...@@ -1086,14 +1065,8 @@ EOF ...@@ -1086,14 +1065,8 @@ EOF
local primary_mesh_device="$(qmp_get_primary_device)" local primary_mesh_device="$(qmp_get_primary_device)"
local community_node_id local community_node_id=$(qmp_get_id)
if qmp_uci_test qmp.node.community_node_id; then
community_node_id="$(uci get qmp.node.community_node_id)"
elif ! [ -z "$primary_mesh_device" ] ; then
community_node_id="$( qmp_get_mac_for_dev $primary_mesh_device | awk -F':' '{print $6}' )"
fi
if qmp_uci_test qmp.interfaces.mesh_devices && qmp_uci_test qmp.networks.mesh_protocol_vids && qmp_uci_test qmp.networks.mesh_vid_offset; then if qmp_uci_test qmp.interfaces.mesh_devices && qmp_uci_test qmp.networks.mesh_protocol_vids && qmp_uci_test qmp.networks.mesh_vid_offset; then
local counter=1 local counter=1
...@@ -1189,17 +1162,15 @@ qmp_set_hosts() { ...@@ -1189,17 +1162,15 @@ qmp_set_hosts() {
qmp_configure_system() { qmp_configure_system() {
local primary_mesh_device="$(qmp_get_primary_device)"
local community_node_id
if qmp_uci_test qmp.node.community_node_id; then if qmp_uci_test qmp.node.community_node_id; then
community_node_id="$(qmp_uci_get node.community_node_id)" local community_node_id=$(qmp_get_id)
else else
community_node_id="$(qmp_get_mac_for_dev $primary_mesh_device | awk -F':' '{print $6}' )" local community_node_id=$(qmp_get_id)
qmp_uci_set node.community_node_id $community_node_id
fi fi
local community_id="$(qmp_uci_get node.community_id)" local community_id="$(qmp_uci_get node.community_id)"
[ -z "$community_id" ] && community_id="qmp" [ -z "$community_id" ] && community_id="qmp" && qmp_uci_set node.community_id $community_id
# set hostname # set hostname
uci set system.@system[0].hostname=${community_id}${community_node_id} uci set system.@system[0].hostname=${community_id}${community_node_id}
...@@ -1231,13 +1202,13 @@ qmp_configure_initial() { ...@@ -1231,13 +1202,13 @@ qmp_configure_initial() {
} }
qmp_configure() { qmp_configure() {
qmp_configure_system
qmp_hooks_exec preconf qmp_hooks_exec preconf
qmp_check_force_internet qmp_check_force_internet
qmp_configure_network qmp_configure_network
qmp_configure_bmx6 qmp_configure_bmx6
qmp_configure_olsr6 qmp_configure_olsr6
qmp_configure_lan_v6 qmp_configure_lan_v6
qmp_configure_system
qmp_hooks_exec postconf qmp_hooks_exec postconf
} }
...@@ -56,36 +56,36 @@ qmp_set_gateway() ...@@ -56,36 +56,36 @@ qmp_set_gateway()
qmp_gw_search_default_ipv4() { qmp_gw_search_default_ipv4() {
qmp_set_gateway ignore 1 type offer network 0.0.0.0/0 qmp_set_gateway inet4_offer ignore 1
qmp_set_gateway ignore 0 type search network 0.0.0.0/0 maxPrefixLen 0 qmp_set_gateway inet4 ignore 0 type search network 0.0.0.0/0 maxPrefixLen 0 tableRule 32767/253
qmp_gw_masq_wan 0 qmp_gw_masq_wan 0
} }
qmp_gw_search_default_ipv6() { qmp_gw_search_default_ipv6() {
qmp_set_gateway ignore 1 type offer network ::/0 qmp_set_gateway inet6_offer ignore 1
qmp_set_gateway ignore 0 type search network ::/0 maxPrefixLen 0 qmp_set_gateway inet6 ignore 0 type search network ::/0 maxPrefixLen 0 tableRule 32767/253
} }
qmp_gw_offer_default_ipv4() { qmp_gw_offer_default_ipv4() {
qmp_set_gateway ignore 1 type search network 0.0.0.0/0 maxPrefixLen 0 qmp_set_gateway inet4 ignore 1