<a id="network-bridge"></a>

# Bridge network

As one of the possible network configuration types under LXD, LXD supports creating and managing network bridges.

<!-- Include start bridge intro -->

A network bridge creates a virtual L2 Ethernet switch that instance NICs can connect to, making it possible for them to communicate with each other and the host.
LXD bridges can leverage underlying native Linux bridges and Open vSwitch.

<!-- Include end bridge intro -->

The `bridge` network type allows to create an L2 bridge that connects the instances that use it together into a single network L2 segment.
Bridges created by LXD are managed, which means that in addition to creating the bridge interface itself, LXD also sets up a local `dnsmasq` process to provide DHCP, IPv6 route announcements and DNS services to the network.
By default, it also performs NAT for the bridge.

See [How to configure your firewall](https://canonical.com/lxd/docs/default/howto/network_bridge_firewalld/index.html.md#network-bridge-firewall) for instructions on how to configure your firewall to work with LXD bridge networks.

<!-- Include start MAC identifier note -->

#### NOTE
Static DHCP assignments depend on the client using its MAC address as the DHCP identifier.
This method prevents conflicting leases when copying an instance, and thus makes statically assigned leases work properly.

<!-- Include end MAC identifier note -->

## IPv6 prefix size

If you’re using IPv6 for your bridge network, you should use a prefix size of 64.

Larger subnets (i.e., using a prefix smaller than 64) should work properly too, but they aren’t typically that useful for .

Smaller subnets are in theory possible (when using stateful DHCPv6 for IPv6 allocation), but they aren’t properly supported by `dnsmasq` and might cause problems.
If you must create a smaller subnet, use static allocation or another standalone router advertisement daemon.

<a id="network-bridge-options"></a>

## Configuration options

The following configuration key namespaces are currently supported for the `bridge` network type:

- `bgp` (BGP peer configuration)
- `bridge` (L2 interface configuration)
- `dns` (DNS server and resolution configuration)
- `fan` (configuration specific to the Ubuntu FAN overlay)
- `ipv4` (L3 IPv4 configuration)
- `ipv6` (L3 IPv6 configuration)
- `maas` (MAAS network identification)
- `security` (network ACL configuration)
- `raw` (raw configuration file content)
- `tunnel` (cross-host tunneling configuration)
- `user` (free-form key/value for user metadata)

#### NOTE
LXD uses the [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) where network subnet information is required, for example, `192.0.2.0/24` or `2001:db8::/32`. This does not apply to cases where a single address is required, for example, local/remote addresses of tunnels, NAT addresses or specific addresses to apply to an instance.

The following configuration options are available for the `bridge` network type:

<!-- Include content from [../metadata.txt](../metadata.txt) -->

<a id="network-bridge-network-conf:bgp.ipv4.nexthop"></a>
`bgp.ipv4.nexthop`

Override the IPv4 next-hop for advertised prefixes

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bgp.ipv4.nexthop)

| **Key:**       | `bgp.ipv4.nexthop`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Default:**   | local address        |
| **Condition:** | BGP server           |
| **Scope:**     | local                |

<a id="network-bridge-network-conf:bgp.ipv6.nexthop"></a>
`bgp.ipv6.nexthop`

Override the IPv6 next-hop for advertised prefixes

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bgp.ipv6.nexthop)

| **Key:**       | `bgp.ipv6.nexthop`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Default:**   | local address        |
| **Condition:** | BGP server           |
| **Scope:**     | local                |

<a id="network-bridge-network-conf:bgp.peers.NAME.address"></a>
`bgp.peers.NAME.address`

Peer address (IPv4 or IPv6)

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bgp.peers.NAME.address)

| **Key:**       | `bgp.peers.NAME.address`   |
|----------------|----------------------------|
| **Type:**      | string                     |
| **Condition:** | BGP server                 |
| **Scope:**     | global                     |

<a id="network-bridge-network-conf:bgp.peers.NAME.asn"></a>
`bgp.peers.NAME.asn`

Peer AS number

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bgp.peers.NAME.asn)

| **Key:**       | `bgp.peers.NAME.asn`   |
|----------------|------------------------|
| **Type:**      | integer                |
| **Condition:** | BGP server             |
| **Scope:**     | global                 |

<a id="network-bridge-network-conf:bgp.peers.NAME.holdtime"></a>
`bgp.peers.NAME.holdtime`

Peer session hold time

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bgp.peers.NAME.holdtime)

| **Key:**       | `bgp.peers.NAME.holdtime`   |
|----------------|-----------------------------|
| **Type:**      | integer                     |
| **Default:**   | `180`                       |
| **Condition:** | BGP server                  |
| **Required:**  | no                          |
| **Scope:**     | global                      |

Specify the hold time in seconds.

<a id="network-bridge-network-conf:bgp.peers.NAME.password"></a>
`bgp.peers.NAME.password`

Peer session password

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bgp.peers.NAME.password)

| **Key:**       | `bgp.peers.NAME.password`   |
|----------------|-----------------------------|
| **Type:**      | string                      |
| **Default:**   | (no password)               |
| **Condition:** | BGP server                  |
| **Required:**  | no                          |
| **Scope:**     | global                      |

<a id="network-bridge-network-conf:bridge.driver"></a>
`bridge.driver`

Bridge driver

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bridge.driver)

| **Key:**     | `bridge.driver`   |
|--------------|-------------------|
| **Type:**    | string            |
| **Default:** | `native`          |
| **Scope:**   | global            |

Possible values are `native` and `openvswitch`.

<a id="network-bridge-network-conf:bridge.external_interfaces"></a>
`bridge.external_interfaces`

Unconfigured network interfaces to include in the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bridge.external_interfaces)

| **Key:**    | `bridge.external_interfaces`   |
|-------------|--------------------------------|
| **Type:**   | string                         |
| **Scope:**  | local                          |

Specify a comma-separated list of unconfigured network interfaces to include in the bridge.

<a id="network-bridge-network-conf:bridge.hwaddr"></a>
`bridge.hwaddr`

MAC address for the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bridge.hwaddr)

| **Key:**    | `bridge.hwaddr`   |
|-------------|-------------------|
| **Type:**   | string            |
| **Scope:**  | global            |

<a id="network-bridge-network-conf:bridge.mode"></a>
`bridge.mode`

Bridge operation mode

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bridge.mode)

| **Key:**     | `bridge.mode`   |
|--------------|-----------------|
| **Type:**    | string          |
| **Default:** | `standard`      |
| **Scope:**   | global          |

Possible values are `standard` and `fan`.

<a id="network-bridge-network-conf:bridge.mtu"></a>
`bridge.mtu`

Bridge MTU

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:bridge.mtu)

| **Key:**     | `bridge.mtu`                                                                                                                           |
|--------------|----------------------------------------------------------------------------------------------------------------------------------------|
| **Type:**    | integer                                                                                                                                |
| **Default:** | `1500` if `bridge.mode=standard`, `1480` if `bridge.mode=fan` and `fan.type=ipip`, or `1450` if `bridge.mode=fan` and `fan.type=vxlan` |
| **Scope:**   | global                                                                                                                                 |

The default value varies depending on whether the bridge uses a tunnel or a fan setup.

<a id="network-bridge-network-conf:dns.domain"></a>
`dns.domain`

Domain to advertise to DHCP clients and use for DNS resolution

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:dns.domain)

| **Key:**     | `dns.domain`   |
|--------------|----------------|
| **Type:**    | string         |
| **Default:** | `lxd`          |
| **Scope:**   | global         |

<a id="network-bridge-network-conf:dns.mode"></a>
`dns.mode`

DNS registration mode

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:dns.mode)

| **Key:**     | `dns.mode`   |
|--------------|--------------|
| **Type:**    | string       |
| **Default:** | `managed`    |
| **Scope:**   | global       |

Possible values are `none` for no DNS record, `managed` for LXD-generated static records, and `dynamic` for client-generated records.

<a id="network-bridge-network-conf:dns.search"></a>
`dns.search`

Full domain search list

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:dns.search)

| **Key:**     | `dns.search`       |
|--------------|--------------------|
| **Type:**    | string             |
| **Default:** | `dns.domain` value |
| **Scope:**   | global             |

Specify a comma-separated list of domains.

<a id="network-bridge-network-conf:dns.zone.forward"></a>
`dns.zone.forward`

DNS zone names for forward DNS records

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:dns.zone.forward)

| **Key:**    | `dns.zone.forward`   |
|-------------|----------------------|
| **Type:**   | string               |
| **Scope:**  | global               |

Specify a comma-separated list of DNS zone names.

<a id="network-bridge-network-conf:dns.zone.reverse.ipv4"></a>
`dns.zone.reverse.ipv4`

DNS zone name for IPv4 reverse DNS records

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:dns.zone.reverse.ipv4)

| **Key:**    | `dns.zone.reverse.ipv4`   |
|-------------|---------------------------|
| **Type:**   | string                    |
| **Scope:**  | global                    |

<a id="network-bridge-network-conf:dns.zone.reverse.ipv6"></a>
`dns.zone.reverse.ipv6`

DNS zone name for IPv6 reverse DNS records

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:dns.zone.reverse.ipv6)

| **Key:**    | `dns.zone.reverse.ipv6`   |
|-------------|---------------------------|
| **Type:**   | string                    |
| **Scope:**  | global                    |

<a id="network-bridge-network-conf:fan.overlay_subnet"></a>
`fan.overlay_subnet`

Subnet to use as the overlay for the FAN

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:fan.overlay_subnet)

| **Key:**       | `fan.overlay_subnet`   |
|----------------|------------------------|
| **Type:**      | string                 |
| **Default:**   | `240.0.0.0/8`          |
| **Condition:** | fan mode               |
| **Scope:**     | global                 |

Use CIDR notation.

<a id="network-bridge-network-conf:fan.type"></a>
`fan.type`

Tunneling type for the FAN

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:fan.type)

| **Key:**       | `fan.type`   |
|----------------|--------------|
| **Type:**      | string       |
| **Default:**   | `vxlan`      |
| **Condition:** | fan mode     |
| **Scope:**     | global       |

Possible values are `vxlan` and `ipip`.

<a id="network-bridge-network-conf:fan.underlay_subnet"></a>
`fan.underlay_subnet`

Subnet to use as the underlay for the FAN

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:fan.underlay_subnet)

| **Key:**       | `fan.underlay_subnet`             |
|----------------|-----------------------------------|
| **Type:**      | string                            |
| **Default:**   | initial value on creation: `auto` |
| **Condition:** | fan mode                          |
| **Scope:**     | global                            |

Use CIDR notation.

You can set the option to `auto` to use the default gateway subnet.

<a id="network-bridge-network-conf:ipv4.address"></a>
`ipv4.address`

IPv4 address for the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.address)

| **Key:**       | `ipv4.address`                    |
|----------------|-----------------------------------|
| **Type:**      | string                            |
| **Default:**   | initial value on creation: `auto` |
| **Condition:** | standard mode                     |
| **Scope:**     | global                            |

Use CIDR notation.

You can set the option to `none` to turn off IPv4, or to `auto` to generate a new random unused subnet.

<a id="network-bridge-network-conf:ipv4.dhcp"></a>
`ipv4.dhcp`

Whether to allocate IPv4 addresses using DHCP

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.dhcp)

| **Key:**       | `ipv4.dhcp`   |
|----------------|---------------|
| **Type:**      | bool          |
| **Default:**   | `true`        |
| **Condition:** | IPv4 address  |
| **Scope:**     | global        |

<a id="network-bridge-network-conf:ipv4.dhcp.expiry"></a>
`ipv4.dhcp.expiry`

When to expire DHCP leases

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.dhcp.expiry)

| **Key:**       | `ipv4.dhcp.expiry`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Default:**   | `1h`                 |
| **Condition:** | IPv4 DHCP            |
| **Scope:**     | global               |

<a id="network-bridge-network-conf:ipv4.dhcp.gateway"></a>
`ipv4.dhcp.gateway`

Address of the gateway for the IPv4 subnet

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.dhcp.gateway)

| **Key:**       | `ipv4.dhcp.gateway`   |
|----------------|-----------------------|
| **Type:**      | string                |
| **Default:**   | IPv4 address          |
| **Condition:** | IPv4 DHCP             |
| **Scope:**     | global                |

<a id="network-bridge-network-conf:ipv4.dhcp.ranges"></a>
`ipv4.dhcp.ranges`

IPv4 ranges to use for DHCP

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.dhcp.ranges)

| **Key:**       | `ipv4.dhcp.ranges`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Default:**   | all addresses        |
| **Condition:** | IPv4 DHCP            |
| **Scope:**     | global               |

Specify a comma-separated list of IPv4 ranges in FIRST-LAST format.

<a id="network-bridge-network-conf:ipv4.firewall"></a>
`ipv4.firewall`

Whether to generate filtering firewall rules for this network

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.firewall)

| **Key:**       | `ipv4.firewall`   |
|----------------|-------------------|
| **Type:**      | bool              |
| **Default:**   | `true`            |
| **Condition:** | IPv4 address      |
| **Scope:**     | global            |

<a id="network-bridge-network-conf:ipv4.nat"></a>
`ipv4.nat`

Whether to use NAT for IPv4

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.nat)

| **Key:**       | `ipv4.nat`                                                                     |
|----------------|--------------------------------------------------------------------------------|
| **Type:**      | bool                                                                           |
| **Default:**   | `false` (initial value on creation if `ipv4.address` is set to `auto`: `true`) |
| **Condition:** | IPv4 address                                                                   |
| **Scope:**     | global                                                                         |

<a id="network-bridge-network-conf:ipv4.nat.address"></a>
`ipv4.nat.address`

Source address used for outbound traffic from the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.nat.address)

| **Key:**       | `ipv4.nat.address`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Condition:** | IPv4 address         |
| **Scope:**     | global               |

<a id="network-bridge-network-conf:ipv4.nat.order"></a>
`ipv4.nat.order`

Where to add the required NAT rules

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.nat.order)

| **Key:**       | `ipv4.nat.order`   |
|----------------|--------------------|
| **Type:**      | string             |
| **Default:**   | `before`           |
| **Condition:** | IPv4 address       |
| **Scope:**     | global             |

Set this option to `before` to add the NAT rules before any pre-existing rules, or to `after` to add them after the pre-existing rules.

<a id="network-bridge-network-conf:ipv4.ovn.ranges"></a>
`ipv4.ovn.ranges`

IPv4 ranges to use for child OVN network routers

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.ovn.ranges)

| **Key:**    | `ipv4.ovn.ranges`   |
|-------------|---------------------|
| **Type:**   | string              |
| **Scope:**  | global              |

Specify a comma-separated list of IPv4 ranges in FIRST-LAST format.

<a id="network-bridge-network-conf:ipv4.routes"></a>
`ipv4.routes`

Additional IPv4 CIDR subnets to route to the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.routes)

| **Key:**       | `ipv4.routes`   |
|----------------|-----------------|
| **Type:**      | string          |
| **Condition:** | IPv4 address    |
| **Scope:**     | global          |

Specify a comma-separated list of IPv4 CIDR subnets.

<a id="network-bridge-network-conf:ipv4.routing"></a>
`ipv4.routing`

Whether to route IPv4 traffic in and out of the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv4.routing)

| **Key:**       | `ipv4.routing`   |
|----------------|------------------|
| **Type:**      | bool             |
| **Default:**   | `true`           |
| **Condition:** | IPv4 address     |
| **Scope:**     | global           |

<a id="network-bridge-network-conf:ipv6.address"></a>
`ipv6.address`

IPv6 address for the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.address)

| **Key:**       | `ipv6.address`                    |
|----------------|-----------------------------------|
| **Type:**      | string                            |
| **Default:**   | initial value on creation: `auto` |
| **Condition:** | standard mode                     |
| **Scope:**     | global                            |

Use CIDR notation.

You can set the option to `none` to turn off IPv6, or to `auto` to generate a new random unused subnet.

<a id="network-bridge-network-conf:ipv6.dhcp"></a>
`ipv6.dhcp`

Whether to provide additional network configuration over DHCP

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.dhcp)

| **Key:**       | `ipv6.dhcp`   |
|----------------|---------------|
| **Type:**      | bool          |
| **Default:**   | `true`        |
| **Condition:** | IPv6 address  |
| **Scope:**     | global        |

<a id="network-bridge-network-conf:ipv6.dhcp.expiry"></a>
`ipv6.dhcp.expiry`

When to expire DHCP leases

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.dhcp.expiry)

| **Key:**       | `ipv6.dhcp.expiry`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Default:**   | `1h`                 |
| **Condition:** | IPv6 DHCP            |
| **Scope:**     | global               |

<a id="network-bridge-network-conf:ipv6.dhcp.ranges"></a>
`ipv6.dhcp.ranges`

IPv6 ranges to use for DHCP

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.dhcp.ranges)

| **Key:**       | `ipv6.dhcp.ranges`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Default:**   | all addresses        |
| **Condition:** | IPv6 stateful DHCP   |
| **Scope:**     | global               |

Specify a comma-separated list of IPv6 ranges in FIRST-LAST format.

<a id="network-bridge-network-conf:ipv6.dhcp.stateful"></a>
`ipv6.dhcp.stateful`

Whether to allocate IPv6 addresses using DHCP

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.dhcp.stateful)

| **Key:**       | `ipv6.dhcp.stateful`   |
|----------------|------------------------|
| **Type:**      | bool                   |
| **Default:**   | `false`                |
| **Condition:** | IPv6 DHCP              |
| **Scope:**     | global                 |

<a id="network-bridge-network-conf:ipv6.firewall"></a>
`ipv6.firewall`

Whether to generate filtering firewall rules for this network

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.firewall)

| **Key:**       | `ipv6.firewall`   |
|----------------|-------------------|
| **Type:**      | bool              |
| **Default:**   | `true`            |
| **Condition:** | IPv6 DHCP         |
| **Scope:**     | global            |

<a id="network-bridge-network-conf:ipv6.nat"></a>
`ipv6.nat`

Whether to use NAT for IPv6

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.nat)

| **Key:**       | `ipv6.nat`                                                                     |
|----------------|--------------------------------------------------------------------------------|
| **Type:**      | bool                                                                           |
| **Default:**   | `false` (initial value on creation if `ipv6.address` is set to `auto`: `true`) |
| **Condition:** | IPv6 address                                                                   |
| **Scope:**     | global                                                                         |

<a id="network-bridge-network-conf:ipv6.nat.address"></a>
`ipv6.nat.address`

Source address used for outbound traffic from the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.nat.address)

| **Key:**       | `ipv6.nat.address`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Condition:** | IPv6 address         |
| **Scope:**     | global               |

<a id="network-bridge-network-conf:ipv6.nat.order"></a>
`ipv6.nat.order`

Where to add the required NAT rules

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.nat.order)

| **Key:**       | `ipv6.nat.order`   |
|----------------|--------------------|
| **Type:**      | string             |
| **Default:**   | `before`           |
| **Condition:** | IPv6 address       |
| **Scope:**     | global             |

Set this option to `before` to add the NAT rules before any pre-existing rules, or to `after` to add them after the pre-existing rules.

<a id="network-bridge-network-conf:ipv6.ovn.ranges"></a>
`ipv6.ovn.ranges`

IPv6 ranges to use for child OVN network routers

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.ovn.ranges)

| **Key:**    | `ipv6.ovn.ranges`   |
|-------------|---------------------|
| **Type:**   | string              |
| **Scope:**  | global              |

Specify a comma-separated list of IPv6 ranges in FIRST-LAST format.

<a id="network-bridge-network-conf:ipv6.routes"></a>
`ipv6.routes`

Additional IPv6 CIDR subnets to route to the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.routes)

| **Key:**       | `ipv6.routes`   |
|----------------|-----------------|
| **Type:**      | string          |
| **Condition:** | IPv6 address    |
| **Scope:**     | global          |

Specify a comma-separated list of IPv6 CIDR subnets.

<a id="network-bridge-network-conf:ipv6.routing"></a>
`ipv6.routing`

Whether to route IPv6 traffic in and out of the bridge

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:ipv6.routing)

| **Key:**       | `ipv6.routing`   |
|----------------|------------------|
| **Type:**      | bool             |
| **Condition:** | IPv6 address     |
| **Scope:**     | global           |

<a id="network-bridge-network-conf:maas.subnet.ipv4"></a>
`maas.subnet.ipv4`

MAAS IPv4 subnet to register instances in

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:maas.subnet.ipv4)

| **Key:**       | `maas.subnet.ipv4`                                    |
|----------------|-------------------------------------------------------|
| **Type:**      | string                                                |
| **Condition:** | IPv4 address; using the `network` property on the NIC |
| **Scope:**     | global                                                |

<a id="network-bridge-network-conf:maas.subnet.ipv6"></a>
`maas.subnet.ipv6`

MAAS IPv6 subnet to register instances in

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:maas.subnet.ipv6)

| **Key:**       | `maas.subnet.ipv6`                                    |
|----------------|-------------------------------------------------------|
| **Type:**      | string                                                |
| **Condition:** | IPv6 address; using the `network` property on the NIC |
| **Scope:**     | global                                                |

<a id="network-bridge-network-conf:raw.dnsmasq"></a>
`raw.dnsmasq`

Additional `dnsmasq` configuration to append to the configuration file

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:raw.dnsmasq)

| **Key:**    | `raw.dnsmasq`   |
|-------------|-----------------|
| **Type:**   | string          |
| **Scope:**  | global          |

<a id="network-bridge-network-conf:security.acls"></a>
`security.acls`

Network ACLs to apply to NICs connected to this network

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:security.acls)

| **Key:**    | `security.acls`   |
|-------------|-------------------|
| **Type:**   | string            |
| **Scope:**  | global            |

Specify a comma-separated list of network ACLs.

Also see [Bridge limitations](https://canonical.com/lxd/docs/default/howto/network_acls/index.html.md#network-acls-bridge-limitations).

<a id="network-bridge-network-conf:security.acls.default.egress.action"></a>
`security.acls.default.egress.action`

Default action to use for egress traffic

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:security.acls.default.egress.action)

| **Key:**       | `security.acls.default.egress.action`   |
|----------------|-----------------------------------------|
| **Type:**      | string                                  |
| **Condition:** | `security.acls`                         |
| **Scope:**     | global                                  |

The specified action is used for all egress traffic that doesn’t match any ACL rule.

<a id="network-bridge-network-conf:security.acls.default.egress.logged"></a>
`security.acls.default.egress.logged`

Whether to log egress traffic that doesn’t match any ACL rule

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:security.acls.default.egress.logged)

| **Key:**       | `security.acls.default.egress.logged`   |
|----------------|-----------------------------------------|
| **Type:**      | bool                                    |
| **Condition:** | `security.acls`                         |
| **Scope:**     | global                                  |

<a id="network-bridge-network-conf:security.acls.default.ingress.action"></a>
`security.acls.default.ingress.action`

Default action to use for ingress traffic

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:security.acls.default.ingress.action)

| **Key:**       | `security.acls.default.ingress.action`   |
|----------------|------------------------------------------|
| **Type:**      | string                                   |
| **Condition:** | `security.acls`                          |
| **Scope:**     | global                                   |

The specified action is used for all ingress traffic that doesn’t match any ACL rule.

<a id="network-bridge-network-conf:security.acls.default.ingress.logged"></a>
`security.acls.default.ingress.logged`

Whether to log ingress traffic that doesn’t match any ACL rule

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:security.acls.default.ingress.logged)

| **Key:**       | `security.acls.default.ingress.logged`   |
|----------------|------------------------------------------|
| **Type:**      | bool                                     |
| **Condition:** | `security.acls`                          |
| **Scope:**     | global                                   |

<a id="network-bridge-network-conf:tunnel.NAME.group"></a>
`tunnel.NAME.group`

Multicast address for `vxlan`

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.group)

| **Key:**       | `tunnel.NAME.group`   |
|----------------|-----------------------|
| **Type:**      | string                |
| **Condition:** | `vxlan`               |

This address is used if [`tunnel.NAME.local`](#network-bridge-network-conf:tunnel.NAME.local) and [`tunnel.NAME.remote`](#network-bridge-network-conf:tunnel.NAME.remote) aren’t set.

<a id="network-bridge-network-conf:tunnel.NAME.id"></a>
`tunnel.NAME.id`

Specific tunnel ID to use for the `vxlan` tunnel

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.id)

| **Key:**       | `tunnel.NAME.id`   |
|----------------|--------------------|
| **Type:**      | integer            |
| **Condition:** | `vxlan`            |

<a id="network-bridge-network-conf:tunnel.NAME.interface"></a>
`tunnel.NAME.interface`

Specific host interface to use for the tunnel

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.interface)

| **Key:**       | `tunnel.NAME.interface`   |
|----------------|---------------------------|
| **Type:**      | string                    |
| **Condition:** | `vxlan`                   |

<a id="network-bridge-network-conf:tunnel.NAME.local"></a>
`tunnel.NAME.local`

Local address for the tunnel

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.local)

| **Key:**       | `tunnel.NAME.local`                |
|----------------|------------------------------------|
| **Type:**      | string                             |
| **Condition:** | `gre` or `vxlan`                   |
| **Required:**  | not required for multicast `vxlan` |

<a id="network-bridge-network-conf:tunnel.NAME.port"></a>
`tunnel.NAME.port`

Specific port to use for the `vxlan` tunnel

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.port)

| **Key:**       | `tunnel.NAME.port`   |
|----------------|----------------------|
| **Type:**      | integer              |
| **Default:**   | `0`                  |
| **Condition:** | `vxlan`              |

<a id="network-bridge-network-conf:tunnel.NAME.protocol"></a>
`tunnel.NAME.protocol`

Tunneling protocol

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.protocol)

| **Key:**       | `tunnel.NAME.protocol`   |
|----------------|--------------------------|
| **Type:**      | string                   |
| **Condition:** | standard mode            |

Possible values are `vxlan` and `gre`.

<a id="network-bridge-network-conf:tunnel.NAME.remote"></a>
`tunnel.NAME.remote`

Remote address for the tunnel

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.remote)

| **Key:**       | `tunnel.NAME.remote`               |
|----------------|------------------------------------|
| **Type:**      | string                             |
| **Condition:** | `gre` or `vxlan`                   |
| **Required:**  | not required for multicast `vxlan` |

<a id="network-bridge-network-conf:tunnel.NAME.ttl"></a>
`tunnel.NAME.ttl`

Specific TTL to use for multicast routing topologies

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:tunnel.NAME.ttl)

| **Key:**       | `tunnel.NAME.ttl`   |
|----------------|---------------------|
| **Type:**      | string              |
| **Default:**   | `1`                 |
| **Condition:** | `vxlan`             |

<a id="network-bridge-network-conf:user.*"></a>
`user.*`

User-provided free-form key/value pairs

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-bridge-network-conf:user.*)

| **Key:**    | `user.*`   |
|-------------|------------|
| **Type:**   | string     |
| **Scope:**  | global     |

<a id="network-bridge-features"></a>

## Supported features

The following features are supported for the `bridge` network type:

- [How to configure network ACLs](https://canonical.com/lxd/docs/default/howto/network_acls/index.html.md#network-acls)
- [How to configure network forwards](https://canonical.com/lxd/docs/default/howto/network_forwards/index.html.md#network-forwards)
- [How to configure network zones](https://canonical.com/lxd/docs/default/howto/network_zones/index.html.md#network-zones)
- [How to configure LXD as a BGP server](https://canonical.com/lxd/docs/default/howto/network_bgp/index.html.md#network-bgp)
- [How to integrate with `systemd-resolved`](https://canonical.com/lxd/docs/default/howto/network_bridge_resolved/index.html.md#network-bridge-resolved)

## Firewall issues

See [How to configure your firewall](https://canonical.com/lxd/docs/default/howto/network_bridge_firewalld/index.html.md#network-bridge-firewall) for instructions on how to troubleshoot firewall issues.
