Difference between revisions of "BGP configuration example"

From Teltonika Networks Wiki
 
Line 40: Line 40:
  
 
On popped up window select these options:
 
On popped up window select these options:
[[File:BGP peer config v1.png|none|border|left|class=tlt-border]]
+
[[File:BGP peer config v1.png|none|border|left|class=tlt-border|800x800px]]
  
 
&emsp;1. <b>Enable</b> - on
 
&emsp;1. <b>Enable</b> - on
Line 48: Line 48:
 
&emsp;3. <b>Remote address</b> - 10.10.10.20 (RUT2 WAN IP)
 
&emsp;3. <b>Remote address</b> - 10.10.10.20 (RUT2 WAN IP)
 
==RUT2 BGP Configuration==
 
==RUT2 BGP Configuration==
For RUT2 configuration is very similar all we need to do is just change <b>BGP router ID</b> to <b>10.10.10.20</b>, <b>Network</b> to <b>192.168.2.0/24</b> on <b>BGP Instance</b> and <b>Remote address</b> to <b>10.10.10.10</b> on <b>Peer Configuration</b>.
+
For RUT2, the configuration is very similar, all we need to do is just change the <b>BGP router ID</b> to <b>10.10.10.20</b>, <b>Network</b> to <b>192.168.2.0/24</b> on the <b>BGP Instance</b>, and the <b>Remote address</b> to <b>10.10.10.10</b> on the <b>Peer Configuration</b>.
  
 
<b>BGP Instance</b> should look like this:
 
<b>BGP Instance</b> should look like this:
Line 61: Line 61:
 
Now we can reach only routers by them self to reach their whole network we need to edit Firewalls <b>WAN</b> Zone to add <b>lan</b> on <b>forward to destination zones</b> field.
 
Now we can reach only routers by them self to reach their whole network we need to edit Firewalls <b>WAN</b> Zone to add <b>lan</b> on <b>forward to destination zones</b> field.
  
On both routers navgate to <b>Network -> Firewall -> General Settings -> Zones</b> and press edit on <b>wan</b> zone.
+
On both routers navigate to <b>Network -> Firewall -> General Settings -> Zones</b> and press edit on <b>wan</b> zone.
  
[[File:BGP Firewall edit.png|none|border|left|class=tlt-border]]
+
[[File:BGP Firewall edit.png|none|border|left|class=tlt-border|1100x1100px]]
  
On popped up window add <b>lan</b> on <b>Allow forward to destination zones</b> field.
+
On popped up window add <b>lan</b> on <b>Allow forward to destination zones</b> field and press
  
[[File:BGP Firewall WAN zone .png|none|border|left|class=tlt-border]]
+
[[File:BGP Firewall WAN zone .png|none|border|left|class=tlt-border|900x900px]]
  
 
=Testing the setup=
 
=Testing the setup=
If you have followed the steps correctly, configuration should be complete. Here are the results you can expect to receive:
+
If you have followed the steps correctly, the configuration should be complete. Here are the results you can expect to receive:
  
 
PC1 to PC2:
 
PC1 to PC2:
Line 90: Line 90:
 
=See also=
 
=See also=
 
<ul>
 
<ul>
<li></li>
 
 
<li>[[Routing]]</li>
 
<li>[[Routing]]</li>
 +
<li>[[Firewall traffic rules]]</li>
 
</ul>
 
</ul>
 
  
 
=External links=
 
=External links=
  
 
https://frrouting.org/ - additional information about FRRouting that our device routing is based on.
 
https://frrouting.org/ - additional information about FRRouting that our device routing is based on.

Latest revision as of 09:18, 10 April 2024

The information on this page is updated in accordance with the 00.07.06.10 firmware version .

Introduction

BGP, or Border Gateway Protocol, is a fundamental routing protocol used in large-scale networks, particularly the internet, to exchange routing and reachability information among autonomous systems (ASes). This article provides a guide on how to configure iBGP or internal Border Gateway routing which uses one autonomous system on our two routers.

Configuration overview and prerequisites

Prerequisites:

  • Routers must be connected through WAN-WAN connection
  • At least two end devices (PCs, Laptops) to configure the routers and test the set up
  • Both routers must be on "Advanced mode"
Networking rutos manual webui basic advanced mode 75.gif

Topology

IBGP topology.png

iBGP Configuration

RUT1 BGP Configuration

Navigate to Network -> Routing -> Dynamic routes -> BGP. Enable "BGP - Global Settings" and "vty".

BGP enable.png

On BGP Instance tab configure it like this:

BGP routing instance.png

 1. Enable - on

 2. AS - 65000 (it must be the same on both routers)

 3. BGP router ID - 10.10.10.10 (RUT1 WAN IP)

 4. Network - 192.168.1.0/24 (RUT1 LAN subnet)

 5. Redistribution options - Connected routes

Go to BGP peers tab and add new instance. For Name write any name you desire and press Add.

BGP peers v1.png

On popped up window select these options:

BGP peer config v1.png

 1. Enable - on

 2. AS - 65000 (it must be the same on both routers)

 3. Remote address - 10.10.10.20 (RUT2 WAN IP)

RUT2 BGP Configuration

For RUT2, the configuration is very similar, all we need to do is just change the BGP router ID to 10.10.10.20, Network to 192.168.2.0/24 on the BGP Instance, and the Remote address to 10.10.10.10 on the Peer Configuration.

BGP Instance should look like this:

BGP instance RUT2.png

And Peer Configuration like this:

RUT2 BGP peer.png

Firewall Zones

Now we can reach only routers by them self to reach their whole network we need to edit Firewalls WAN Zone to add lan on forward to destination zones field.

On both routers navigate to Network -> Firewall -> General Settings -> Zones and press edit on wan zone.

BGP Firewall edit.png

On popped up window add lan on Allow forward to destination zones field and press

BGP Firewall WAN zone .png

Testing the setup

If you have followed the steps correctly, the configuration should be complete. Here are the results you can expect to receive:

PC1 to PC2:

Pinging 192.168.2.10 from 192.168.1.10 with 32 bytes of data:
Reply from 192.168.2.10: bytes=32 time=3ms TTL=62
Reply from 192.168.2.10: bytes=32 time=5ms TTL=62
Reply from 192.168.2.10: bytes=32 time=5ms TTL=62
Reply from 192.168.2.10: bytes=32 time=3ms TTL=62

PC2 to PC1:

Pinging 192.168.1.10 from 192.168.2.10 with 32 bytes of data:
Reply from 192.168.1.10: bytes=32 time=9ms TTL=124
Reply from 192.168.1.10: bytes=32 time=3ms TTL=124
Reply from 192.168.1.10: bytes=32 time=5ms TTL=124
Reply from 192.168.1.10: bytes=32 time=5ms TTL=124

See also

External links

https://frrouting.org/ - additional information about FRRouting that our device routing is based on.