# Código fonte Wiki de Implementing Mikrotik MPLS vpls setup for three offices

Última modificação por Jean Franco em 2022/10/30 16:50
Exportar
Office Formats
Exportar como PDF Exportar como ODT Exportar como RTF
Other Formats

Select the pages to export:

select all/ none

Legend:
  Created Page
  Modified Extension Page
  Clean Extension Page

Exportar como HTML

Show last authors

author | version | line-number | content
--- | --- | --- | ---
|  | 1 | [[image:mpls.png]]
|  | 2 |
|  | 3 | This lab demonstrates how to connect mutiple branch offices to the HQ on Mikrotik routerOS, using MPLS with VPLS. One of the requirements that service providers get is to provide transparent connectivity between offices. MPLS forwarding allows service providers to speed up packet forwarding on their networks. The use of Virtual Private LAN Service (VPLS) removes the need for the encapsulation of ethernet frame forwarding in IP, thereby further increasing the efficiency of ethernet frame forwarding. This LAB requires that there should be no hops between all branches.
|  | 4 |
|  | 5 | === Scope of work ===
|  | 6 |
|  | 7 | * All networks depicted in network diagram will be configured and advertised on the core and all PE routers using OSPF to provide full convergence and reachability among provider edge routers.
|  | 8 | * Loopback interfaces will be created on the core and all PE routers for LDP connection.
|  | 9 | * On PE routers, no IP addresses will be assigned to interfaces connecting to the customers.
|  | 10 |
|  | 11 | === Implementation ===
|  | 12 |
|  | 13 | ==== On the core router: IP address assignment ====
|  | 14 |
|  | 15 | First of all, create a loopback interface and assign an IP to it:
|  | 16 |
|  | 17 | /interface bridge add name=lobridge
|  | 18 |
|  | 19 | /ip address add address=4.4.4.2/32 interface=lobridge
|  | 20 |
|  | 21 | Then, assign IP addresses to interfaces connecting to PE routers:
|  | 22 |
|  | 23 | /ip address add address=1.1.1.1/24 interface=ether1 comment=”connection-to-NY”
|  | 24 |
|  | 25 | /ip address add address=2.2.2.1/24 interface=ether2 comment=”connection-to-CA”
|  | 26 |
|  | 27 | /ip address add address=3.3.3.1/24 interface=ether3 comment=”connection-to-TX”
|  | 28 |
|  | 29 | ==== On the core router: OSPF advertisement ====
|  | 30 |
|  | 31 | /routing ospf instance set redistribute-connected=as-type-1
|  | 32 |
|  | 33 | /routing ospf network add area=backbone network=1.1.1.0/24
|  | 34 |
|  | 35 | /routing ospf network add area=backbone network=2.2.2.0/24
|  | 36 |
|  | 37 | /routing ospf network add area=backbone network=3.3.3.0/24
|  | 38 |
|  | 39 | /routing ospf network add area=backbone network=4.4.4.2/32
|  | 40 |
|  | 41 | === On NY PE: IP address assignment ===
|  | 42 |
|  | 43 | /interface bridge add name=lobridge
|  | 44 |
|  | 45 | /ip address add address=4.4.4.1/32 interface=lobridge
|  | 46 |
|  | 47 | Then, assign IP addresses to interfaces connecting to PE routers:
|  | 48 |
|  | 49 | /ip address add address=1.1.1.2/24 interface=ether1 comment=”connection-to-Core”
|  | 50 |
|  | 51 | ==== On the NY PE: OSPF advertisement ====
|  | 52 |
|  | 53 | /routing ospf instance set redistribute-connected=as-type-1
|  | 54 |
|  | 55 | /routing ospf network add area=backbone network=1.1.1.0/24
|  | 56 |
|  | 57 | /routing ospf network add area=backbone network=4.4.4.1/32
|  | 58 |
|  | 59 | === On CA PE: IP address assignment ===
|  | 60 |
|  | 61 | /interface bridge add name=lobridge
|  | 62 |
|  | 63 | /ip address add address=4.4.4.3/32 interface=lobridge
|  | 64 |
|  | 65 | Then, assign IP addresses to interfaces connecting to PE routers:
|  | 66 |
|  | 67 | /ip address add address=2.2.2.2/24 interface=ether1 comment=”connection-to-Core”
|  | 68 |
|  | 69 | === On CA PE: OSPF advertisement ===
|  | 70 |
|  | 71 | /routing ospf instance set redistribute-connected=as-type-1
|  | 72 |
|  | 73 | /routing ospf network add area=backbone network=2.2.2.0/24
|  | 74 |
|  | 75 | /routing ospf network add area=backbone network=4.4.4.3/32
|  | 76 |
|  | 77 | === On TX PE: IP address assignment ===
|  | 78 |
|  | 79 | /interface bridge add name=lobridge
|  | 80 |
|  | 81 | /ip address add address=4.4.4.4/32 interface=lobridge
|  | 82 |
|  | 83 | Then, assign IP addresses to interfaces connecting to PE routers:
|  | 84 |
|  | 85 | /ip address add address=3.3.3.2/24 interface=ether1 comment=”connection-to-Core”
|  | 86 |
|  | 87 | === On TX PE: OSPF advertisement ===
|  | 88 |
|  | 89 | /routing ospf instance set redistribute-connected=as-type-1
|  | 90 |
|  | 91 | /routing ospf network add area=backbone network=3.3.3.0/24
|  | 92 |
|  | 93 | /routing ospf network add area=backbone network=4.4.4.4/32
|  | 94 |
|  | 95 | At this point, we should have reachability to all loopback IPs from all PE routers. Next, we will enable MPLS label distribution protocol (LDP) on the core and all PE routers and add participating interfaces. LDP transport address will be set to the loopback address configured on each router. The reason for this is because we do not want interface status to affect LDP neighbor relationship. Also, because we do not want change in addressing should not affect mpls setup.
|  | 96 |
|  | 97 | You may also like: [[How to configure Cisco l2tpv3 to connect two offices using GNS3>>url:https://www.timigate.com/2018/05/how-to-cisco-l2tpv3-to-connect-two-offices-using-gns3.html]]
|  | 98 |
|  | 99 |
|  | 100 | === MPLS LDP configuration on the core ===
|  | 101 |
|  | 102 | /mpls interface
|  | 103 |
|  | 104 | set [ find default=yes ] interface=ether1
|  | 105 |
|  | 106 | add interface=ether2
|  | 107 |
|  | 108 | add interface=ether3
|  | 109 |
|  | 110 |
|  | 111 | /mpls ldp set enabled=yes lsr-id=4.4.4.2 transport-address=4.4.4.2
|  | 112 |
|  | 113 |
|  | 114 | /mpls ldp interface
|  | 115 |
|  | 116 | add interface=ether1
|  | 117 |
|  | 118 | add interface=ether2
|  | 119 |
|  | 120 | add interface=ether3
|  | 121 |
|  | 122 |
|  | 123 | /mpls ldp neighbor
|  | 124 |
|  | 125 | add transport=4.4.4.1
|  | 126 |
|  | 127 | add transport=4.4.4.3
|  | 128 |
|  | 129 | add transport=4.4.4.4
|  | 130 |
|  | 131 | === MPLS LDP configuration on the NY PE ===
|  | 132 |
|  | 133 | /mpls interface
|  | 134 |
|  | 135 | set [ find default=yes ] interface=ether1
|  | 136 |
|  | 137 |
|  | 138 | /mpls ldp set enabled=yes lsr-id=4.4.4.1 transport-address=4.4.4.1
|  | 139 |
|  | 140 |
|  | 141 | /mpls ldp interface
|  | 142 |
|  | 143 | add interface=ether1
|  | 144 |
|  | 145 |
|  | 146 | /mpls ldp neighbor
|  | 147 |
|  | 148 | add transport=4.4.4.2
|  | 149 |
|  | 150 | === MPLS LDP configuration on the CA PE ===
|  | 151 |
|  | 152 | /mpls interface
|  | 153 |
|  | 154 | set [ find default=yes ] interface=ether1
|  | 155 |
|  | 156 |
|  | 157 | /mpls ldp set enabled=yes lsr-id=4.4.4.3 transport-address=4.4.4.3
|  | 158 |
|  | 159 |
|  | 160 | /mpls ldp interface
|  | 161 |
|  | 162 | add interface=ether1
|  | 163 |
|  | 164 |
|  | 165 | /mpls ldp neighbor
|  | 166 |
|  | 167 | add transport=4.4.4.2
|  | 168 |
|  | 169 | === MPLS LDP configuration on the TX PE ===
|  | 170 |
|  | 171 | /mpls interface
|  | 172 |
|  | 173 | set [ find default=yes ] interface=ether1
|  | 174 |
|  | 175 |
|  | 176 | /mpls ldp set enabled=yes lsr-id=4.4.4.4 transport-address=4.4.4.4
|  | 177 |
|  | 178 |
|  | 179 | /mpls ldp interface
|  | 180 |
|  | 181 | add interface=ether1
|  | 182 |
|  | 183 |
|  | 184 | /mpls ldp neighbor
|  | 185 |
|  | 186 | add transport=4.4.4.2
|  | 187 |
|  | 188 | At this point, we have a fully configured MPLS cloud. Next, we implement VPLS mapping to connect branches together. On each PE router, there will be two VPLS mapping to reach two other locations.
|  | 189 |
|  | 190 | === VPLS configuration on NY PE ===
|  | 191 |
|  | 192 | interface vpls
|  | 193 |
|  | 194 | add comment=”NYtoCA” disabled=no l2mtu=1500 name=”NYtoCA” remote-peer=4.4.4.3 vpls-id=10
|  | 195 |
|  | 196 | add comment=”NYtoTX” disabled=no l2mtu=1500 name=”NYtoTX” remote-peer=4.4.4.4 vpls-id=10
|  | 197 |
|  | 198 | /interface bridge add name=NY-Bridge
|  | 199 |
|  | 200 | /interface bridge port add bridge=NY-Bridge interface=ether2
|  | 201 |
|  | 202 | /interface bridge port add bridge=NY-Bridge interface=NYtoCA
|  | 203 |
|  | 204 | /interface bridge port add bridge=NY-Bridge interface=NYtoTX
|  | 205 |
|  | 206 | === VPLS configuration on CA PE ===
|  | 207 |
|  | 208 | interface vpls
|  | 209 |
|  | 210 | add comment=”NYtoCA” disabled=no l2mtu=1500 name=”CAtoNY” remote-peer=4.4.4.1 vpls-id=10
|  | 211 |
|  | 212 | add comment=”NYtoTX” disabled=no l2mtu=1500 name=”CAtoTX” remote-peer=4.4.4.4 vpls-id=10
|  | 213 |
|  | 214 | /interface bridge add name=CA-Bridge
|  | 215 |
|  | 216 | /interface bridge port add bridge=CA-Bridge interface=ether2
|  | 217 |
|  | 218 | /interface bridge port add bridge=CA-Bridge interface=CAtoNY
|  | 219 |
|  | 220 | /interface bridge port add bridge=CA-Bridge interface=CAtoTX
|  | 221 |
|  | 222 | === VPLS configuration on TX PE ===
|  | 223 |
|  | 224 | interface vpls
|  | 225 |
|  | 226 | add comment=”TXtoNY” disabled=no l2mtu=1500 name=”TXtoNY” remote-peer=4.4.4.1 vpls-id=10
|  | 227 |
|  | 228 | add comment=”TXtoCA” disabled=no l2mtu=1500 name=”TXtoCA” remote-peer=4.4.4.3 vpls-id=10
|  | 229 |
|  | 230 | /interface bridge add name=TX-Bridge
|  | 231 |
|  | 232 | /interface bridge port add bridge=TX-Bridge interface=ether2
|  | 233 |
|  | 234 | /interface bridge port add bridge=TX-Bridge interface=TXtoNY
|  | 235 |
|  | 236 | /interface bridge port add bridge=TX-Bridge interface=TXtoTXtoCA
|  | 237 |
|  | 238 |
|  | 239 |

# Aplicações

# Dicas

Se você está iniciando com XWiki, veja o Guia para Iniciantes.

Maila Networks
XWiki Debian 14.4.1