Saturday, May 28, 2022
HomeNetworkingCreating MPLS/VPN Labs With netsim-tools « ipSpace.internet weblog

Creating MPLS/VPN Labs With netsim-tools « ipSpace.internet weblog


Two week in the past I described the best way to create a easy VRF Lite lab with netsim-tools VRF configuration module. Including MPLS/VPN to the combination and making a full-blown MPLS/VPN lab is a chunk of cake. On this weblog publish we’ll construct a easy topology with two VRFs (purple and blue) and two PE-routers:

Lab topology

Nodes

We’ll want six nodes within the lab. 4 of them will probably be Linux hosts, the 2 PE-routers will probably be Arista EOS gadgets. We’ll need to allow these configuration modules on the PE-routers:

  • vrf for apparent causes
  • bgp as a result of it’s wanted to move VPNv4 tackle household updates between PE-routers
  • mpls to get LDP and BGP VPNv4 tackle household
  • ospf as a result of we’re constructing an IBGP design and want one thing to propagate loopback interface addresses.

Lab topology – nodes

defaults.machine: eos

nodes:
  pe1:
    module: [ vrf,ospf,bgp,mpls ]
  pe2:
    module: [ vrf,ospf,bgp,mpls ]
  h1:
    machine: linux
  h2:
    machine: linux
  h3:
    machine: linux
  h4:
    machine: linux

We’ll use two VRFs, and let the software routinely assign route distinguishers and route targets.

Lab topology – VRF definitions

vrfs:
  purple:
  blue:

There are 5 hyperlinks in our lab, 4 of them belong to VRFs, the fifth one connects PE1 and PE2:

Lab topology – hyperlinks

hyperlinks:
- pe1: { vrf: purple }
  h1:
- pe2: { vrf: purple } 
  h2:
- pe1: { vrf: blue }
  h3:
- pe2: { vrf: blue }
  h4:
- pe1-pe2

Module Parameters

All we’d like now’s a sprinkle of unicorn mud module parameters:

  • BGP AS quantity is ready to 65000
  • LDP and VPNv4 are enabled inside the MPLS module

Lab topology – module parameters

bgp.as: 65000
mpls.ldp: True
mpls.vpn: True

And that’s it. Save the topology file into an empty listing, execute netlab up and also you’ll have a full-blown MPLS/VPN lab.

Pattern Configuration

Don’t belief me? Listed below are just a few printouts:

BGP desk for VRF purple on PE1

pe1#present ip bgp vrf purple
BGP routing desk data for VRF purple
Router identifier 10.0.0.1, native AS quantity 65000
Route standing codes: s - suppressed, * - legitimate, > - lively, E - ECMP head, e - ECMP
                    S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast
                    % - Pending BGP convergence
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI Origin Validation codes: V - legitimate, I - invalid, U - unknown
AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster Listing, LL Nexthop - Hyperlink Native Nexthop

          Community                Subsequent Hop              Metric  AIGP       LocPref Weight  Path
 * >      172.16.0.0/24          -                     -       -          -       0       i
 * >      172.16.1.0/24          10.0.0.2              0       -          100     0       i

IP routing desk for VRF purple on PE1

pe1#present ip route vrf purple | start Gateway
Gateway of final resort will not be set

 C        172.16.0.0/24 is immediately linked, Ethernet1
 B I      172.16.1.0/24 [200/0] through 10.0.0.2/32, LDP tunnel index 1, label 100000
                                   through 10.1.0.2, Ethernet3, label imp-null(3)

LFIB on PE1

pe1#present mpls lfib route
MPLS forwarding desk (Label [metric] Vias) - 3 routes
MPLS next-hop decision permit default route: False
...
 B3    100000   [0]
                through I, ipv4, vrf blue
 B3    100001   [0]
                through I, ipv4, vrf purple
 L     116384   [1], 10.0.0.2/32
                through M, 10.1.0.2, pop
                 payload autoDecide, ttlMode uniform, apply egress-acl
                 interface Ethernet3

Lastly, listed below are the related components of PE1 configuration as generated by netsim-tools launch 1.2.1:

PE1 configuration

vrf occasion blue
   rd 65000:2
!
vrf occasion purple
   rd 65000:1
!
!
interface Ethernet1
   description pe1 -> [h1] [stub]
   vrf purple
   ip tackle 172.16.0.1/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet2
   description pe1 -> [h3] [stub]
   vrf blue
   ip tackle 172.16.2.1/24
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Ethernet3
   description pe1 -> pe2
   ip tackle 10.1.0.1/30
   mpls ldp interface
   ip ospf community point-to-point
   ip ospf space 0.0.0.0
!
interface Loopback0
   ip tackle 10.0.0.1/32
   mpls ldp interface
   ip ospf space 0.0.0.0
!
ip routing
ip routing vrf blue
ip routing vrf purple
!
mpls ip
!
mpls ldp
   router-id 10.0.0.1
   transport-address interface Loopback0
   interface disabled default
   no shutdown
!
router bgp 65000
   router-id 10.0.0.1
   bgp advertise-inactive
   neighbor 10.0.0.2 remote-as 65000
   neighbor 10.0.0.2 next-hop-self
   neighbor 10.0.0.2 update-source Loopback0
   neighbor 10.0.0.2 description pe2
   neighbor 10.0.0.2 send-community normal prolonged
   !
   address-family ipv4
      neighbor 10.0.0.2 activate
      community 10.0.0.1/32
   !
   address-family vpn-ipv4
      neighbor 10.0.0.2 activate
   !
   vrf blue
      rd 65000:2
      route-target import vpn-ipv4 65000:2
      route-target export vpn-ipv4 65000:2
      router-id 10.0.0.1
      redistribute linked
      redistribute ospf
   !
   vrf purple
      rd 65000:1
      route-target import vpn-ipv4 65000:1
      route-target export vpn-ipv4 65000:1
      router-id 10.0.0.1
      redistribute linked
      redistribute ospf
!
router ospf 1
   router-id 10.0.0.1
   max-lsa 12000
!
router ospf 100 vrf purple
   router-id 10.0.0.1
   interface unnumbered hey masks tx 0.0.0.0
   passive-interface Ethernet1
   redistribute bgp
   max-lsa 12000
!
router ospf 101 vrf blue
   router-id 10.0.0.1
   interface unnumbered hey masks tx 0.0.0.0
   passive-interface Ethernet2
   redistribute bgp
   max-lsa 12000

Construct Your Personal

You’ll discover the lab topology file on GitHub. To make use of it:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments