Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

If the gateway configuration does not have explicitly configured table to be resolved in, then it is considered, that gateway should be resolved in the "main" table.


Examples

Simple VRF-Lite setup

Lets consider setup where we need two customer VRFs that require access to the internet:

Code Block
languageros
/ip address
add address=172.16.1.2/24 interface=public
add address=192.168.1.1/24 interface=ether1
add address=192.168.2.1/24 interface=ether2

/ip route
add gateway=172.16.1.1

# add VRF configuration
/ip vrf
add name=cust_a interface=ether1 place-before 0
add name=cust_b interface=ether2 place-before 0

# add vrf routes
/ip route
add gateway=172.16.1.1@main routing-table=cust_a
add gateway=172.16.1.1@main routing-table=cust_b


The simplest MPLS VPN setup

...

Code Block
languageros
/interface bridge add name=lobridge 
/ip address add address=10.1.1.2/24 interface=ether1 
/ip address add address=10.2.2.2/24 interface=ether2 
/ip address add address=10.5.5.2/32 interface=lobridge 
/ip route vrf add disabled=no routing-mark=cust-one route-distinguisher=1.1.1.1:111 \ 
export-route-targets=1.1.1.1:111 import-route-targets=1.1.1.1:111 name=cust-one interfaces=ether1 
/mpls ldp setadd enabled=yes transport-address=10.5.5.2 
/mpls ldp interface add interface=ether2 
/routing bgp instancetemplate set default as=65000 
/routing bgp instance vrf add instance=default routing-mark=cust-one redistribute-connected=yes =65000 
/routing bgp vpn 
add vrf=cust-one redistribute=connected \
  route-distinguisher=1.1.1.1:111 \
  import-route-targets=1.1.1.1:111 \
  export-route-targets=1.1.1.1:111 \
  label-allocation-policy=per-vrf
/routing bgp peerconnection 
add template=default remote-.address=10.5.5.3 remote-as=65000 address-families=vpnv4 \ 
update-source=lobridge local.address=10.5.5.2
# add route to the remote BGP peer's loopback address 
/ip route add dst-address=10.5.5.3/32 gateway=10.2.2.3

...