# BGP

Configuring BGP to exchange information about the availability of networks.

---

SafeUTM 13 implements support for BGP (Border Gateway Protocol), which is the main dynamic routing protocol used on the Internet.

---

#### Setting up your autonomous system

1\. Enter your AS number in the **AS Number** field and click **Save**:  
[![1. BGP.png](https://docs.safedns.com/uploads/images/gallery/2022-09/scaled-1680-/OqTXsq4cCZnkrVrP-1-bgp.png)](https://docs.safedns.com/uploads/images/gallery/2022-09/OqTXsq4cCZnkrVrP-1-bgp.png)

2\. Move the switch of the **BGP** section to the **enabled** position;  
3\. SafeUTM will populate the **Router ID** field automatically if the BGP section switch is on.

---

#### Configuring BGP neighbors

1\. To add a BGP neighbor, click **Add** in the upper right corner;  
2\. Fill in the following fields:

- **Title** - any value;
- **IP address** - BGP neighbor IP address;
- **AS number** - Neighbor's BGP AS number;
- **Incoming networks** - a filter in which you need to select the network from which you want to receive information. If the **Any** object is selected, then filtering will be disabled and all networks from the BGP neighbor will be accepted. Preset filters object **Default route** matches filter **0.0.0.0/0**;
- **Announced networks** - a filter in which you need to select the network about which you want to send information. If **Any** object is selected, then filtering will be disabled and information about all known UTM routes will be transmitted (redistribute static, connected, OSPF ). Preset filters object **Default route** matches filter **0.0.0.0/0**;
- **AS-Path Prepend** - the higher the value, the less priority the channel becomes;
- **Local Preference** - determines the path priority for traffic to exit. The larger the value, the less priority the channel becomes;
- **MED** - determines the path priority for traffic ingress. The lower the value, the more priority the path.  
    [![2. BGP.png](https://docs.safedns.com/uploads/images/gallery/2022-09/scaled-1680-/OAwosOSCaiJyyaSI-2-bgp.png)](https://docs.safedns.com/uploads/images/gallery/2022-09/OAwosOSCaiJyyaSI-2-bgp.png)

<p class="callout info">For **Incoming networks** and **Announced networks**, the **Any** object cannot be set simultaneously with other filters.  
</p>

If there is no required object for filtering, then you can create it by selecting **Create a new object** in the **Incoming networks** or **Announced networks** field:

- **Title** - any value;
- **Value** - subnet value in the format: subnet/subnet mask, for example 192.168.100.0/24.  
    [![3. BGP.png](https://docs.safedns.com/uploads/images/gallery/2022-09/scaled-1680-/FKFrSAkOg0hS2plC-3-bgp.png)](https://docs.safedns.com/uploads/images/gallery/2022-09/FKFrSAkOg0hS2plC-3-bgp.png)