The Charm Store will undergo scheduled database maintenance on July 5, 2026 22:00 to July 6, 02:00 UTC. During this time, you may be unable to access charm and bundle metadata or publish updates. No user action is required and services will automatically resume once maintenance is complete.

Advanced Routing

Platform:

Ubuntu
24.04 22.04 20.04 18.04
Channel Revision Published Runs on
latest/stable 77 08 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/stable 76 08 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/stable 75 08 Sep 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/stable 11 31 Aug 2022
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/stable 7 14 Oct 2021
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 75 11 Aug 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 76 11 Aug 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 77 11 Aug 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 11 19 Aug 2022
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 7 14 Oct 2021
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 105 24 Jun 2026
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 104 24 Jun 2026
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 101 10 Apr 2026
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 13 06 Sep 2022
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
juju deploy advanced-routing

Basic usage

Add to an existing application using juju-info relation.

Example:

juju deploy advanced-routing
juju add-relation ubuntu advanced-routing

The user can configure the following parameters:

  • enable-advanced-routing: Enable routing. This requires for the charm to have routing information configured in JSON format: juju config advanced-routing --file path/to/your/config
  • advanced-routing-config parameter contains 3 types of entities: ‘table’, ‘route’, ‘rule’. The ‘type’ parameter is always required.

table: routing table to put the rules in (used in rules)

route: defines a static route with the following params:

  • default_route: should this be a default route or not (boolean: true|false) (optional, requires gateway and table)
  • net: IPv4 CIDR for a destination network (string) (mutually exclusive with default_route, and requires gateway or device)
  • gateway: IPv4 gateway address (string) (either device or gateway is required)
  • table: routing table name (string) (optional, except if default_route is used)
  • metric: metric for the route (int) (optional)
  • device: device (interface) (string) (either device or gateway is required)

rule:

  • from-net: IPv4 CIDR source network or “all” (string) (required)
  • to-net: IPv4 CIDR destination network or “all” (string) (optional)
  • table: routing table name (string) (optional, default is main)
  • priority: priority (int) (optional)

An example yaml config file below:

settings:
  advanced-routing-config:
    value: |-
      [ {
          "type": "table",
          "table": "SF1"
      }, {
          "type": "route",
          "default_route": true,
          "gateway": "10.191.86.2",
          "table": "SF1",
          "metric": 101,
          "device": "eth0"
      }, {
          "type": "route",
          "net": "6.6.6.0/24",
          "gateway": "10.191.86.2"
      }, {
          "type": "rule",
          "from-net": "192.170.2.0/24",
          "to-net": "192.170.2.0/24",
          "table": "SF1",
          "priority": 101
      } ]
  enable-advanced-routing:
    value: true

The example_config.yaml file is also provided with the codebase.

Note: the from-net parameter refers not to the tcp conversation, but to the individual packet path. I.e., if a reply from our host to a remote host is from the interface with address 192.170.2.4, regardless of destination, that would trigger the rule when we state "from-net": "192.170.2.0/24".