Developing lightweight computation at the DSG edge

Commit e4112de2 authored by p4u's avatar p4u
Browse files

Adapt gw offer/search functions to use tableRule

Adapt gw default config to tableRule parameter and add name option for future use
Adapt gw uci-default config gateways for use tableRule
parent 659fe881
config 'qmp' 'interfaces'
# option 'configure_switch' 'eth0' # (uncomment line if available, e.g. WGT634U)
option 'lan_devices' 'eth0 wlan1 dummy0' # will be used for LAN
option 'wan_devices' 'eth1' # will be used for WAN
option 'mesh_devices' 'wlan0 wlan2 eth0 eth1' # will be extended by vlan tag for by uses as Mesh
option 'lan_devices' '' # will be used for LAN
option 'wan_devices' '' # will be used for WAN
option 'mesh_devices' '' # will be extended by vlan tag for by uses as Mesh
# option 'no_vlan_devices' '' # interfaces which won't be vlan tagged
config 'qmp' 'node'
......@@ -47,47 +47,75 @@ config 'qmp' 'networks'
option 'netserver' '1'
config 'gateway'
option 'name' 'inet6'
option 'type' 'search'
option 'network' '::/0'
option 'tableRule' '32767/253'
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'
option 'tableRule' '32767/253'
config 'gateway'
option 'name' 'inet4'
option 'ignore' '1'
option 'type' 'offer'
option 'network' '0.0.0.0/0'
# option 'bandwidth' '100000'
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' '16'
option 'minPrefixLen' '24'
config 'gateway'
option 'ignore' '1'
option 'type' 'search'
option 'network' '::/0'
option 'gwName' 'qMp-d6'
option 'gwName' 'qMp-example'
config 'gateway'
option 'ignore' '1'
option 'type' 'search'
option 'gwName' 'qMp-ab'
option 'gwName' 'qMp-example'
option 'network' '10.1.0.0/16'
option 'address' '10.2.2.2/32'
option 'minPrefixLen' '16'
......
......@@ -90,7 +90,7 @@ qmp_set_gateway()
qmp_gw_search_default_ipv4() {
qmp_set_gateway ignore 1 type offer network 0.0.0.0/0
qmp_set_gateway ignore 0 type search network 0.0.0.0/0 maxPrefixLen 0
qmp_set_gateway ignore 0 type search network 0.0.0.0/0 maxPrefixLen 0 tableRule 32767/253
qmp_gw_masq_wan 0
}
......@@ -100,7 +100,7 @@ qmp_gw_search_default_ipv6() {
}
qmp_gw_offer_default_ipv4() {
qmp_set_gateway ignore 1 type search network 0.0.0.0/0 maxPrefixLen 0
qmp_set_gateway ignore 1 type search network 0.0.0.0/0 maxPrefixLen 0 tableRule 32767/253
qmp_set_gateway ignore 0 type offer network 0.0.0.0/0
qmp_gw_masq_wan 1
}
......@@ -111,7 +111,7 @@ qmp_gw_offer_default_ipv6() {
}
qmp_gw_disable_default_ipv4() {
qmp_set_gateway ignore 1 type search network 0.0.0.0/0 maxPrefixLen 0
qmp_set_gateway ignore 1 type search network 0.0.0.0/0 maxPrefixLen 0 tableRule 32767/253
qmp_set_gateway ignore 1 type offer network 0.0.0.0/0
qmp_gw_masq_wan 0
}
......
......@@ -80,7 +80,7 @@ translate_tunnel()
type_no_ignore="search"
if [ "$ipv" = 4 ] && [ "$tunnel_network" = "0.0.0.0/0" ]
then
extra_args_no_ignore="maxPrefixLen 0"
extra_args_no_ignore="maxPrefixLen 0 tableRule 32767/253"
fi
else
config_get tunnel_network tunnels offer_ipv${ipv}_tunnel
......@@ -90,7 +90,7 @@ translate_tunnel()
type_no_ignore="offer"
if [ "$ipv" = 4 ] && [ "$tunnel_network" = "0.0.0.0/0" ]
then
extra_args_ignore="maxPrefixLen 0"
extra_args_ignore="maxPrefixLen 0 tableRule 32767/253"
fi
fi
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment