fuchsia.router.config

PROTOCOLS

RouterAdmin

Defined in fuchsia.router.config/services.fidl

RouterAdmin provides APIs for administering the router.

CreateWan

Request

NameType
name string
vlan uint16
ports vector<uint32>

Response

NameType
id Id?
error Error?

CreateLan

Request

NameType
name string
vlan uint16
ports vector<uint32>

Response

NameType
id Id?
error Error?

RemoveWan

Request

NameType
wan_id Id

Response

NameType
error Error?

RemoveLan

Request

NameType
lan_id Id

Response

NameType
error Error?

SetWanProperties

Request

NameType
wan_id Id
properties WanProperties

Response

NameType
error Error?

SetLanProperties

Request

NameType
lan_id Id
properties LanProperties

Response

NameType
error Error?

SetDhcpAddressPool

Request

NameType
lan_id Id
pool AddressPool

Response

NameType
error Error?

SetDhcpServerOptions

Request

NameType
lan_id Id
options DhcpServerOptions

Response

NameType
error Error?

SetDhcpReservation

Request

NameType
lan_id Id
reservation DhcpReservation

Response

NameType
reservation_id Id?
error Error?

DeleteDhcpReservation

Request

NameType
reservation_id Id

Response

NameType
error Error?

SetSystemConfig

Request

NameType
config SystemConfig

Response

NameType
id Id?
error Error?

SetDnsResolver

Request

NameType
config DnsResolverConfig

Response

NameType
id Id?
error Error?

SetDnsForwarder

Request

NameType
config DnsForwarderConfig

Response

NameType
error Error?

AddDnsEntry

Request

NameType
entry DnsForwarderEntry

Response

NameType
entry_id Id?
error Error?

DeleteDnsEntry

Request

NameType
entry_id Id

Response

NameType
error Error?

SetRoute

Request

NameType
route Route

Response

NameType
id Id?
error Error?

DeleteRoute

Request

NameType
route_id Id

Response

NameType
error Error?

UpdateRouteMetric

Request

NameType
route_id Id
metric uint32

Response

NameType
error Error?

SetSecurityFeatures

Request

NameType
features SecurityFeatures

Response

NameType
error Error?

SetPortForward

Request

NameType
rule PortForwardingRule

Response

NameType
rule_id Id?
error Error?

DeletePortForward

Request

NameType
rule_id Id

Response

NameType
error Error?

SetPortTrigger

Request

NameType
rule PortTriggerRule

Response

NameType
rule_id Id?
error Error?

DeletePortTrigger

Request

NameType
rule_id Id

Response

NameType
error Error?

SetFilter

Request

NameType
rule FilterRule

Response

NameType
rule_id Id?
error Error?

DeleteFilter

Request

NameType
rule_id Id

Response

NameType
error Error?

SetIpv6PinHole

Request

NameType
rule Ipv6PinHoleRule

Response

NameType
rule_id Id?
error Error?

DeleteIpv6PinHole

Request

NameType
rule_id Id

Response

NameType
error Error?

SetDmzHost

Request

NameType
rule DmzHost

Response

NameType
rule_id Id?
error Error?

DeleteDmzHost

Request

NameType
rule_id Id

Response

NameType
error Error?

CreateWlanNetwork

Request

NameType
network WlanNetwork

Response

NameType
iface Id?
error Error?

DeleteWlanNetwork

Request

NameType
network_id Id

Response

NameType
error Error?

RouterSystem

Defined in fuchsia.router.config/services.fidl

RouterSystem provides APIs for managing features that are considered crytical for the system. For example, setting filter rules that come into effect on startup.

SetAcl

Request

NameType
rule SystemAcl

Response

NameType
acl_id Id?
error Error?

DeleteAcl

Request

NameType
acl_id Id

Response

NameType
error Error?

GetAcl

Request

NameType
acl_id Id

Response

NameType
acl SystemAcl
error Error?

GetAcls

Request

NameType

Response

NameType
error Error?

RouterState

Defined in fuchsia.router.config/services.fidl

RouterState provide APIs for querying the router state.

GetWan

Request

NameType
wan_id Id

Response

NameType
wan_lif Lif
error Error?

GetWans

Request

NameType

Response

NameType
wans vector<Lif>

GetWanPorts

Request

NameType
wan_id Id

Response

NameType
port_ids vector<uint32>
error Error?

GetLan

Request

NameType
lan_id Id

Response

NameType
lan_lif Lif
error Error?

GetLans

Request

NameType

Response

NameType
lans vector<Lif>

GetLanPorts

Request

NameType
lan_id Id

Response

NameType
port_ids vector<uint32>
error Error?

GetPort

Request

NameType
port_id uint32

Response

NameType
port Port?
error Error?

GetPorts

Request

NameType

Response

NameType
ports vector<Port>

GetWlanNetworks

Request

NameType

Response

NameType
networks vector<WlanNetwork>

GetWanProperties

Request

NameType
wan_id Id

Response

NameType
properties WanProperties
error Error?

GetLanProperties

Request

NameType
lan_id Id

Response

NameType
properties LanProperties
error Error?

GetDhcpConfig

Request

NameType
lan_id Id

Response

NameType
dhcp_config DhcpServerConfig?
error Error?

GetDnsResolver

Request

NameType

Response

NameType
dns_resolver DnsResolverConfig

GetDnsForwarder

Request

NameType

Response

NameType
dns_forwarder DnsForwarder

GetRoutes

Request

NameType

Response

NameType
routes vector<Route>

GetRoute

Request

NameType
route_id Id

Response

NameType
route Route?
error Error?

GetSecurityFeatures

Request

NameType

Response

NameType
features SecurityFeatures

GetPortForward

Request

NameType
rule_id Id

Response

NameType
rule PortForwardingRule?
error Error?

GetPortTrigger

Request

NameType
rule_id Id

Response

NameType
rule PortTriggerRule?
error Error?

GetFilter

Request

NameType
rule_id Id

Response

NameType
rule FilterRule?
error Error?

GetIpv6PinHole

Request

NameType
rule_id Id

Response

NameType
rule Ipv6PinHoleRule?
error Error?

GetDmzHost

Request

NameType
rule_id Id

Response

NameType
rule DmzHost?
error Error?

GetPortForwards

Request

NameType

Response

NameType
port_forward_rules vector<PortForwardingRule>

GetPortTriggers

Request

NameType

Response

NameType
port_trigger_rules vector<PortTriggerRule>

GetFilters

Request

NameType

Response

NameType
port_filter_rules vector<FilterRule>

GetIpv6PinHoles

Request

NameType

Response

NameType
pinhole_rules vector<Ipv6PinHoleRule>

GetDevice

Request

NameType

Response

NameType
device Device

GetSystemConfig

Request

NameType

Response

NameType
config SystemConfig

GetRadios

Request

NameType

Response

NameType
radios vector<Radio>

OnChange

Response

NameType
events vector<Event>

STRUCTS

Id

Defined in fuchsia.router.config/common.fidl

Represents a unique identifier for each element at specific version. eg. LIF, rules, reservations, clients, etc.

NameTypeDescriptionDefault
uuid uint8[16]

Time-independent unique identifier of the element.

No default
version uint64

Represents a specific config at a point in time in the global config database. Incremented monotonically at each change. For any new change requested by the client, this must match the latest value in the database, otherwise the change will be rejected.

No default

DnsSearch

Defined in fuchsia.router.config/dns.fidl

DnsSearch is the device DNS search configuration.

NameTypeDescriptionDefault
servers vector<fuchsia.net/IpAddress>

List of DNS servers to consult.

No default
domain_name string?

Domain to add to non fully qualified domain names.

No default

DnsResolverConfig

Defined in fuchsia.router.config/dns.fidl

DnsResolverConfig is the device DNS Resolver configuration.

NameTypeDescriptionDefault
element Id No default
search DnsSearch

DNS search configuration.

No default
policy DnsPolicy

DNS configuration merge policy.

No default

DnsForwarderConfig

Defined in fuchsia.router.config/dns.fidl

DNSForwarderConfig is the device DNS Forwarder configuration.

NameTypeDescriptionDefault
element Id No default
search DnsSearch

Upstream DNS server.

No default

DnsForwarderEntry

Defined in fuchsia.router.config/dns.fidl

DNSForwarder entry is a name - address mapping.

NameTypeDescriptionDefault
element Id No default
address fuchsia.net/Ipv4Address No default
names vector<string> No default

DnsForwarder

Defined in fuchsia.router.config/dns.fidl

DNSForwarder the device DNS Forwarder configuration.

NameTypeDescriptionDefault
config DnsForwarderConfig

Forwarder configuration.

No default
resolver vector<DnsForwarderEntry>

Local Names.

No default
interfaces vector<Id>

Interfaces where the DNS forwarder is enabled.

No default

AddressPool

Defined in fuchsia.router.config/lan.fidl

Range of addresses in the interface subnet available for DHCP assignment.

NameTypeDescriptionDefault
element Id No default
from fuchsia.net/Ipv4Address No default
to fuchsia.net/Ipv4Address No default

DhcpReservation

Defined in fuchsia.router.config/lan.fidl

DhcpReservation hold a mac to address DHCP association.

NameTypeDescriptionDefault
element Id No default
name string No default
address fuchsia.net/Ipv4Address No default
mac fuchsia.net/MacAddress No default

DhcpServerConfig

Defined in fuchsia.router.config/lan.fidl

NameTypeDescriptionDefault
options DhcpServerOptions No default
pool AddressPool No default
reservations vector<DhcpReservation> No default

Route

Defined in fuchsia.router.config/route.fidl

Route hold a routeing table entry.

NameTypeDescriptionDefault
element Id No default
name string No default
subnet fuchsia.net/Subnet No default
metric uint32 No default
gateway fuchsia.net/IpAddress? No default
if_id Id? No default

Port

Defined in fuchsia.router.config/routercfg.fidl

NameTypeDescriptionDefault
element Id No default
id uint32 No default
path string No default

PortRange

Defined in fuchsia.router.config/security.fidl

NameTypeDescriptionDefault
from port No default
to port No default

FilterRule

Defined in fuchsia.router.config/security.fidl

Filter rule is applied on the LAN side; it allows blocking traffic from LAN to WAN. Normally, all traffic from LAN to WAN is allowed. By applying filter rules, it is possible to selectively block traffic from LAN devices to services on the WAN side.

NameTypeDescriptionDefault
element Id No default
action FilterAction No default
selector FlowSelector No default

PortForwardingRule

Defined in fuchsia.router.config/security.fidl

Port Forwarding allows remote (WAN) devices to connect to a service hosted on a LAN device. It forwards all WAN packets (or only those from the optional source_address), destined to any of the incoming ports, to the target address and port. Target address must be on one of the LANs.

NameTypeDescriptionDefault
element Id No default
name string? No default
enabled bool No default
source_address CidrAddress No default
destination_ports vector<PortRange> No default
target_address fuchsia.net/IpAddress No default
target_port port No default
protocol Protocol No default

PortTriggerRule

Defined in fuchsia.router.config/security.fidl

Port Triggering provides similar functionality to Port Forwarding. The difference is that it is the target device that enables the port forwarding functionality. The target device is not known in advance, and port forwarding is disabled. The first local device to send traffic to the trigger port becomes the target device, and enables port forwarding. WAN traffic comming to any of the incoming ports will be forwarded to the trigger port on the target device.

NameTypeDescriptionDefault
element Id No default
name string? No default
enabled bool No default
incoming_ports vector<PortRange> No default
protocol Protocol No default
trigger_port port No default

Ipv6PinHoleRule

Defined in fuchsia.router.config/security.fidl

IPv6 firewall pinholes create a hole in the IPv6 firewall. It will allow traffic from source_address, destined to the indicated ports to pass from WAN to LAN.

NameTypeDescriptionDefault
element Id No default
nickname string No default
enabled bool No default
source_address fuchsia.net/Ipv6Address No default
ports vector<PortRange> No default
protocol Protocol No default

DmzHost

Defined in fuchsia.router.config/security.fidl

DmzHost is a LAN host that receives all incoming tcp/udp packets that do not match any other rule.

NameTypeDescriptionDefault
element Id No default
enabled bool No default
wan_addr fuchsia.net/Ipv4Address No default
lan_addr fuchsia.net/Ipv4Address No default

Error

Defined in fuchsia.router.config/services.fidl

NameTypeDescriptionDefault
code ErrorCode No default
description string? No default

Channel

Defined in fuchsia.router.config/wireless.fidl

NameTypeDescriptionDefault
ch vector<ChannelNumber>[2]

[0] is primary channel, [1] (if provided) is secondary for HT/VHT.

No default
width ChannelWidth No default

Radio

Defined in fuchsia.router.config/wireless.fidl

NameTypeDescriptionDefault
element Id No default
phy uint32 No default
channel Channel No default

WlanNetwork

Defined in fuchsia.router.config/wireless.fidl

NameTypeDescriptionDefault
element Id No default
name string No default
psk string No default
radio_phys vector<Id> No default
enable_band_steering bool No default

Regulatory

Defined in fuchsia.router.config/wireless.fidl

NameTypeDescriptionDefault
element Id No default
county_code string No default

ENUMS

DnsPolicy

Type: uint32

Defined in fuchsia.router.config/dns.fidl

DnsPolicy is the DNS merge policy to use.

NameValueDescription
NOT_SET 0
STATIC 1

Can not be replaced by dynamically learned DNS configuration, will overwrite existing configuration.

REPLACEABLE 2

Can be replaced by dynamically learned DNS configuration, will not overwrite existing configuration.

MERGE 3

Will merge with existing configuration.

LifType

Type: uint32

Defined in fuchsia.router.config/routercfg.fidl

NameValueDescription
INVALID 0
WAN 1

WAN interfaces, by default, will not be allowed to start a DHCP server. The default is interface up, DHCP client enabled. IPv6 SLAAC.

LAN 2

LAN interface by default is up with the ports are up and bridged together, until an IP is statically configured. A DHCP server can be started or not.

LAG 3

LAG interface is a Link aggregation interface.

Protocol

Type: uint32

Defined in fuchsia.router.config/security.fidl

NameValueDescription
BOTH 0
TCP 1
UDP 2

FilterAction

Type: uint32

Defined in fuchsia.router.config/security.fidl

NameValueDescription
DROP 0
ALLOW 1

AclAction

Type: uint32

Defined in fuchsia.router.config/security.fidl

NameValueDescription
PERMIT 1

Allows traffic to pass.

DENY 2

Blocks traffic, dropping the packets.

REDIRECT 3

Redirects packets to the destination port.

AclType

Type: uint32

Defined in fuchsia.router.config/security.fidl

NameValueDescription
INGRESS 1

Ingress ACL is applied on the ingress port, before packet enters the forwarding path.

EGRESS 2

Egress ACL is applied on the egress port, after packet has passed the forwarding path.

ErrorCode

Type: uint32

Defined in fuchsia.router.config/services.fidl

NameValueDescription
INTERNAL 1
NOT_FOUND 2
NOT_SUPPORTED 3
INVALID_ARGS 4
ALREADY_EXISTS 5

WanConnection

Type: uint32

Defined in fuchsia.router.config/wan.fidl

NameValueDescription
DIRECT 1
PPPoE 2
PPTP 3
L2TP 4

WanAddressMethod

Type: uint32

Defined in fuchsia.router.config/wan.fidl

NameValueDescription
AUTOMATIC 1
MANUAL 2

WanIpV6ConnectionMode

Type: uint32

Defined in fuchsia.router.config/wan.fidl

NameValueDescription
STATIC 1
PASSTHROUGH 2
DELEGATION 3

ChannelWidth

Type: uint32

Defined in fuchsia.router.config/wireless.fidl

NameValueDescription
AUTO 0
WIDTH_20_MHZ 1
WIDTH_40_MHZ 2
WIDTH_80_MHZ 3
WIDTH_160_MHZ 4

TABLES

LanProperties

Defined in fuchsia.router.config/lan.fidl

LanProperties holds the configuration associated with a LAN interface.

OrdinalNameTypeDescription
1 address_v4 CidrAddress
2 enable_dhcp_server bool
3 dhcp_config DhcpServerConfig
4 address_v6 CidrAddress
5 enable_dns_forwarder bool
6 enable bool

DhcpServerOptions

Defined in fuchsia.router.config/lan.fidl

OrdinalNameTypeDescription
1 element Id
2 lease_time_sec uint32
3 default_gateway fuchsia.net/Ipv4Address
4 dns_server DnsSearch
5 enable bool

RoutingFeatures

Defined in fuchsia.router.config/route.fidl

OrdinalNameTypeDescription
1 rip bool
2 ospf bool

Device

Defined in fuchsia.router.config/routercfg.fidl

Device is comprised of a device topology and the device features. The device topology defines the WAN and LAN interfaces provisioned, indicating which physical ports are part of an interface, as well as the parameters of the interface. The device features define the device configuration, and the security and routing features configured.

OrdinalNameTypeDescription
1 version uint64
2 topology Topology
3 config DeviceConfig

Topology

Defined in fuchsia.router.config/routercfg.fidl

Topology allows indicating which ports are part of a LAN interface and which ports are part of a WAN interface. All ports part of a given LAN or WAN are bridged among themselves and an Switch Virtual Interface (SVI) is created for cpu to get packets (our current bridge). Typical consumer routers have two LIFs, a WAN and a LAN. These are L3 LIFs, with one port associated to the WAN side and 1 or more ports (including the WIFI one) associated to the LAN. The LAN ports are bridged together.

OrdinalNameTypeDescription
1 element Id
2 lifs vector<Lif>

Lif

Defined in fuchsia.router.config/routercfg.fidl

A logical interface (LIF) is an abstraction that represents an L3 interface (hence, you can assign an IP address to it, for example). The relationship between logical interfaces and ports are as follows:

  • A LIF can be associated with either a single physical port, multiple ports (bridge (SVI) or Link aggregation), or with no port at all (GRE interface, e.g.).
  • A single port can be associated with multiple LIFs (802.1q tagged port).
  • A LIF can change associations from one port to another (in the case of a port failure, e.g.)
OrdinalNameTypeDescription
1 element Id
2 type LifType
3 name string
4 port_ids vector<uint32>
5 vlan uint16
6 properties LifProperties

SystemConfig

Defined in fuchsia.router.config/routercfg.fidl

OrdinalNameTypeDescription
1 element Id
2 timezone string
3 daylight_savings_time_enabled bool
4 leds_enabled bool
5 hostname string

DeviceConfig

Defined in fuchsia.router.config/routercfg.fidl

OrdinalNameTypeDescription
1 system SystemConfig
2 dns_resolver DnsResolverConfig
3 dns_forwarder DnsForwarder
4 routing_features RoutingFeatures
5 routes vector<Route>
6 security_features SecurityFeatures
7 dmz_host DmzHost
8 port_trigger_rulesr vector<PortTriggerRule>
9 port_forwarding_rules vector<PortForwardingRule>
10 filtering_rules vector<FilterRule>
11 pin_hole_rules vector<Ipv6PinHoleRule>

SecurityFeatures

Defined in fuchsia.router.config/security.fidl

Security features define the features enabled or disabled on the router. For example, NAT, firewall, passthough for common protocols that need it.

OrdinalNameTypeDescription
1 PPTP_PASSTHRU bool
2 L2TP_PASSTHRU bool
3 IPSEC_PASSTHRU bool
4 RTSP_PASSTHRU bool
5 H323_PASSTHRU bool
6 SIP_PASSTHRU bool
7 ALLOW_MULTICAST bool
8 NAT bool
9 FIREWALL bool
10 V6_FIREWALL bool
11 UPNP bool
12 DROP_ICMP_ECHO bool

FlowSelector

Defined in fuchsia.router.config/security.fidl

FlowSelector is the set of packet selectors defining a traffic flow. a not specified selector represents a match all.

OrdinalNameTypeDescription
1 src_address CidrAddress
2 src_ports vector<PortRange>
3 dst_address CidrAddress
4 dst_ports vector<PortRange>
5 protocol Protocol

SystemAcl

Defined in fuchsia.router.config/security.fidl

SystemAcl describes an ACL installed at startup.

OrdinalNameTypeDescription
1 element Id
2 selector FlowSelector
3 ingress_port port
4 egress_port port
5 acl_type AclType
6 acl_action AclAction

CidrAddress

Defined in fuchsia.router.config/wan.fidl

OrdinalNameTypeDescription
1 address fuchsia.net/IpAddress
2 prefix_length uint8

Credentials

Defined in fuchsia.router.config/wan.fidl

OrdinalNameTypeDescription
1 user string
2 password string

Pppoe

Defined in fuchsia.router.config/wan.fidl

OrdinalNameTypeDescription
1 credentials Credentials

Pptp

Defined in fuchsia.router.config/wan.fidl

OrdinalNameTypeDescription
1 credentials Credentials
2 server fuchsia.net/IpAddress

L2tp

Defined in fuchsia.router.config/wan.fidl

OrdinalNameTypeDescription
1 credentials Credentials
2 server fuchsia.net/IpAddress

WanProperties

Defined in fuchsia.router.config/wan.fidl

WanProperties holds the configuration associated to a WAN interface. It holds the type of upstream connection and authentication credentials for that connection, the mechanism to use to obtain an IP address and control of the interface state.

OrdinalNameTypeDescription
1 connection_type WanConnection
2 connection_parameters ConnectionParameters
3 address_method WanAddressMethod
4 address_v4 CidrAddress
5 gateway_v4 fuchsia.net/IpAddress
6 connection_v6_mode WanIpV6ConnectionMode
7 address_v6 CidrAddress
8 gateway_v6 fuchsia.net/IpAddress
9 hostname string
10 clone_mac fuchsia.net/MacAddress
11 mtu uint32
12 enable bool
13 metric uint32

UNIONS

Event

Defined in fuchsia.router.config/event.fidl

Event defines the events the Router Manager will generate based on configuration state changes. The event contains only the object that has changed; for example, if a new forwarding rule is added the event only contains that route, not the full routing table.

NameTypeDescription
deleted_element Id
lif Lif
port Port
route Route
security_features SecurityFeatures
forwarding_rule PortForwardingRule
trigger_rule PortTriggerRule
filter_rule FilterRule
ipv6_pin_hole Ipv6PinHoleRule
dhz_host DmzHost
dhcp_options DhcpServerOptions
dhcp_reservation DhcpReservation
dns_resolver DnsResolverConfig
dns_forwarder DnsForwarder
system_config SystemConfig

LifProperties

Defined in fuchsia.router.config/routercfg.fidl

NameTypeDescription
wan WanProperties
lan LanProperties

ConnectionParameters

Defined in fuchsia.router.config/wan.fidl

NameTypeDescription
pppoe Pppoe
pptp Pptp
l2tp L2tp

ChannelNumber

Defined in fuchsia.router.config/wireless.fidl

NameTypeDescription
number uint32
auto_band Band

BITS

Band

Type: uint8

NameValueDescription
BAND_2400_MHZ 1
BAND_5000_MHZ 2

TYPE ALIASES

NameValueDescription
port uint16