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

# Physical network

<!-- Include start physical intro -->

The `physical` network type connects to an existing physical network, which can be a network interface or a bridge, and serves as an uplink network for OVN.

<!-- Include end physical intro -->

This network type allows to specify presets to use when connecting OVN networks to a parent interface or to allow an instance to use a physical interface as a NIC.
In this case, the instance NICs can simply set the `network`option to the network they connect to without knowing any of the underlying configuration details.

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

## Configuration options

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

- `bgp` (BGP peer configuration)
- `dns` (DNS server and resolution configuration)
- `ipv4` (L3 IPv4 configuration)
- `ipv6` (L3 IPv6 configuration)
- `ovn` (OVN 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 `physical` network type:

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

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

Peer address for use by `ovn` downstream networks

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

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

The address can be IPv4 or IPv6.

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

Peer AS number for use by `ovn` downstream networks

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

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

<a id="network-physical-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-physical-network-conf:bgp.peers.NAME.holdtime)

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

Specify the peer session hold time in seconds.

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

Peer session password for use by `ovn` downstream networks

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#network-physical-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-physical-network-conf:dns.nameservers"></a>
`dns.nameservers`

DNS server IPs on physical network

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

| **Key:**       | `dns.nameservers`   |
|----------------|---------------------|
| **Type:**      | string              |
| **Condition:** | standard mode       |
| **Scope:**     | global              |

Specify a list of DNS server IPs.

<a id="network-physical-network-conf:gvrp"></a>
`gvrp`

Whether to use GARP VLAN Registration Protocol

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

| **Key:**     | `gvrp`   |
|--------------|----------|
| **Type:**    | bool     |
| **Default:** | `false`  |
| **Scope:**   | global   |

This option specifies whether to register the VLAN using the GARP VLAN Registration Protocol.

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

IPv4 address for the gateway and network

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

| **Key:**       | `ipv4.gateway`   |
|----------------|------------------|
| **Type:**      | string           |
| **Condition:** | standard mode    |
| **Scope:**     | global           |

Use CIDR notation.

<a id="network-physical-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-physical-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-physical-network-conf:ipv4.routes"></a>
`ipv4.routes`

Additional IPv4 CIDR subnets

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

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

Specify a comma-separated list of IPv4 CIDR subnets that can be used with child OVN network forwarders, load-balancers and [`ipv4.routes.external`](https://canonical.com/lxd/docs/latest/reference/devices_nic/index.html.md#device-nic-ovn-device-conf:ipv4.routes.external) setting.

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

Whether to allow IPv4 routes on multiple networks/NICs

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

| **Key:**       | `ipv4.routes.anycast`   |
|----------------|-------------------------|
| **Type:**      | bool                    |
| **Default:**   | `false`                 |
| **Condition:** | IPv4 address            |
| **Scope:**     | global                  |

If set to `true`, this option allows the overlapping routes to be used on multiple networks/NICs at the same time.

<a id="network-physical-network-conf:ipv6.gateway"></a>
`ipv6.gateway`

IPv6 address for the gateway and network

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

| **Key:**       | `ipv6.gateway`   |
|----------------|------------------|
| **Type:**      | string           |
| **Condition:** | standard mode    |
| **Scope:**     | global           |

Use CIDR notation.

<a id="network-physical-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-physical-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-physical-network-conf:ipv6.routes"></a>
`ipv6.routes`

Additional IPv6 CIDR subnets

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

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

Specify a comma-separated list of IPv6 CIDR subnets that can be used with child OVN network forwarders, load-balancers and [`ipv6.routes.external`](https://canonical.com/lxd/docs/latest/reference/devices_nic/index.html.md#device-nic-ovn-device-conf:ipv6.routes.external) setting.

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

Whether to allow IPv6 routes on multiple networks/NICs

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

| **Key:**       | `ipv6.routes.anycast`   |
|----------------|-------------------------|
| **Type:**      | bool                    |
| **Default:**   | `false`                 |
| **Condition:** | IPv6 address            |
| **Scope:**     | global                  |

If set to `true`, this option allows the overlapping routes to be used on multiple networks/NICs at the same time.

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

MTU of the new interface

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

| **Key:**    | `mtu`   |
|-------------|---------|
| **Type:**   | integer |
| **Scope:**  | global  |

<a id="network-physical-network-conf:ovn.ingress_mode"></a>
`ovn.ingress_mode`

How OVN NIC external IPs are advertised on uplink network

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

| **Key:**       | `ovn.ingress_mode`   |
|----------------|----------------------|
| **Type:**      | string               |
| **Default:**   | `l2proxy`            |
| **Condition:** | standard mode        |
| **Scope:**     | global               |

Possible values are `l2proxy` (proxy ARP/NDP) and `routed`.

<a id="network-physical-network-conf:parent"></a>
`parent`

Existing interface to use for network

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

| **Key:**    | `parent`   |
|-------------|------------|
| **Type:**   | string     |
| **Scope:**  | local      |

<a id="network-physical-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-physical-network-conf:user.*)

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

<a id="network-physical-network-conf:vlan"></a>
`vlan`

VLAN ID to attach to

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

| **Key:**    | `vlan`   |
|-------------|----------|
| **Type:**   | integer  |
| **Scope:**  | global   |

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

## Supported features

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

- [How to configure LXD as a BGP server](https://canonical.com/lxd/docs/latest/howto/network_bgp/index.html.md#network-bgp)
