« Mikrotik : Tunnel GRE » : différence entre les versions

De www.yakakliker.org
Aucun résumé des modifications
Aucun résumé des modifications
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 35 : Ligne 35 :
[[Catégorie:Mikrotik]]
[[Catégorie:Mikrotik]]
[[Catégorie:VPN]]
[[Catégorie:VPN]]
‎<html>
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('yakakliker', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Café',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a>
‎</html>

Dernière version du 19 février 2025 à 15:01

We have two sites, Site1 with local network range 10.1.101.0/24 and Site2 with local network range 10.1.202.0/24.

The first step is to create GRE tunnels. A router on site 1:

/interface gre add name=myGre remote-address=192.168.90.1 local-address=192.168.80.1

A router on site 2:

/interface gre add name=myGre remote-address=192.168.80.1 local-address=192.168.90.1

As you can see tunnel configuration is quite simple.

In this example, a keepalive is not configured, so tunnel interface will have a running flag even if remote tunnel end is not reachable

Now we just need to set up tunnel addresses and proper routing. A router on site 1:

/ip address add address=172.16.1.1/30 interface=myGre

/ip route add dst-address=10.1.202.0/24 gateway=172.16.1.2

A router on site 2:

/ip address add address=172.16.1.2/30 interface=myGre

/ip route add dst-address=10.1.101.0/24 gateway=172.16.1.1

At this point, both sites have Layer 3 connectivity over the GRE tunnel.


Liens

https://help.mikrotik.com/docs/display/ROS/GRE


compteur web gratuit sans pub