From b3eca8c14e77eabee5afe04a49dee0208bc715ee Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Fri, 8 Jul 2022 12:42:26 +0000 Subject: lb-wan: T4518: Add XML for conf mode load-balancing wan Add XML for configuration mode "load-balancing wan" for the future rewriting this to Python Remove node from Makefile as Python code is not yet completed --- .../include/ipv4-address-prefix-range.xml.i | 39 ++ .../include/port-port-range.xml.i | 26 ++ interface-definitions/load-balancing-wan.xml.in | 395 +++++++++++++++++++++ 3 files changed, 460 insertions(+) create mode 100644 interface-definitions/include/ipv4-address-prefix-range.xml.i create mode 100644 interface-definitions/include/port-port-range.xml.i create mode 100644 interface-definitions/load-balancing-wan.xml.in (limited to 'interface-definitions') diff --git a/interface-definitions/include/ipv4-address-prefix-range.xml.i b/interface-definitions/include/ipv4-address-prefix-range.xml.i new file mode 100644 index 000000000..aadc6aaec --- /dev/null +++ b/interface-definitions/include/ipv4-address-prefix-range.xml.i @@ -0,0 +1,39 @@ + + + + IP address, subnet, or range + + ipv4 + IPv4 address to match + + + ipv4net + IPv4 prefix to match + + + ipv4range + IPv4 address range to match + + + !ipv4 + Match everything except the specified address + + + !ipv4net + Match everything except the specified prefix + + + !ipv4range + Match everything except the specified range + + + + + + + + + + + + diff --git a/interface-definitions/include/port-port-range.xml.i b/interface-definitions/include/port-port-range.xml.i new file mode 100644 index 000000000..ce550f549 --- /dev/null +++ b/interface-definitions/include/port-port-range.xml.i @@ -0,0 +1,26 @@ + + + + Port number + + txt + Named port (any name in /etc/services, e.g., http) + + + u32:1-65535 + Numeric IP port + + + start-end + Numbered port range (e.g. 1001-1005) + + + + \n\nMultiple destination ports can be specified as a comma-separated list.\nThe whole list can also be negated using '!'.\nFor example: '!22,telnet,http,123,1001-1005' + + + + + + + diff --git a/interface-definitions/load-balancing-wan.xml.in b/interface-definitions/load-balancing-wan.xml.in new file mode 100644 index 000000000..c2b6316ae --- /dev/null +++ b/interface-definitions/load-balancing-wan.xml.in @@ -0,0 +1,395 @@ + + + + + Configure load-balancing + + + + + Configure Wide Area Network (WAN) load-balancing + + + + + Disable source NAT rules from being configured for WAN load balancing + + + + + + Enable WAN load balancing for locally sourced traffic + + + + + + Flush connection tracking tables on connection state change + + + + + + Script to be executed on interface status change + + txt + Script in /config/scripts + + + + + + + + + Interface name + + + + + + + + Failure count + + u32:1-10 + Failure count + + + + + + + + + Outbound interface nexthop address. Can be 'DHCP or IPv4 address' [REQUIRED] + + dhcp + + + ipv4 + Nexthop IP address + + + dhcp + Set the nexthop via DHCP + + + + (dhcp) + + + + + + Success count + + u32:1-10 + Success count + + + + + + + + + Rule number + + u32:0-4294967295 + Rule number + + + + + + + + + Ping response time (seconds) + + u32:1-30 + Response time (seconds) + + + + + + + + + Health target address + + ipv4 + Health target address + + + + + + + + + Path to user-defined script + + txt + Script in /config/scripts + + + + + + + + + TTL limit (hop count) + + u32:1-254 + Number of hops + + + + + + + + + WLB test type + + ping ttl user-defined + + + ping + Test with ICMP echo response + + + ttl + Test with UDP TTL expired response + + + user-defined + User-defined test script + + + (ping|ttl|user-defined) + + + + + + + + + + Rule number (1-9999) + + u32:1-9999 + Rule number + + + + + + + + + Description for this rule + + txt + Description for this rule + + + + + + Destination + + + #include + #include + + + + + Exclude packets matching this rule from WAN load balance + + + + + + Enable failover for packets matching this rule from WAN load balance + + + + + + Inbound interface name (e.g., "eth0") [REQUIRED] + + any + + + + + + + Interface name [REQUIRED] + + + + + + + + Load-balance weight + + u32:1-255 + Interface weight + + + + + Weight must be between 1 and 255 + + + + + + + Enable packet limit for this rule + + + + + Burst limit for matching packets + + u32:0-4294967295 + Burst limit for matching packets + + + + + + + + + Time window for rate calculation + + hour minute second + + + hour + hour + + + minute + minute + + + second + second + + + (hour|minute|second) + + + + + + Number of packets used for rate limit + + u32:0-4294967295 + Number of packets used for rate limit + + + + + + + + + Threshold behavior for limit + + above below + + + above + Above limit + + + below + Below limit + + + (above|below) + + + + + + + + Option to match traffic per-packet instead of the default, per-flow + + + + + + Protocol to match (protocol name, number, or "all") + + + all tcp_udp + + + all + All IP protocols + + + tcp_udp + Both TCP and UDP + + + u32:0-255 + IP protocol number + + + <protocol> + IP protocol name + + + !<protocol> + IP protocol name + + + + + + + + + Source information + + + #include + #include + + + + + + + Configure sticky connections + + + + + Enable sticky incoming WAN connections + + + + + + + + + + -- cgit v1.2.3