BGP & MPLS Lab Workbook: Practical Configuration Guide

Listen to this Post

Featured Image
This article covers BGP (Border Gateway Protocol) and MPLS (Multiprotocol Label Switching) configurations, essential for advanced networking. Below are verified commands and steps for setting up BGP and MPLS in a lab environment.

Module 1 – BGP Configuration

Basic BGP Setup

To configure eBGP between two routers (R1 and R2):

R1(config) router bgp 65001 
R1(config-router) neighbor 192.168.1.2 remote-as 65002 
R1(config-router) network 10.0.0.0 mask 255.255.255.0 
R2(config) router bgp 65002 
R2(config-router) neighbor 192.168.1.1 remote-as 65001 
R2(config-router) network 20.0.0.0 mask 255.255.255.0 

BGP Route Filtering

Use prefix-lists and route-maps to filter routes:

R1(config) ip prefix-list ALLOW_ROUTES seq 10 permit 10.0.0.0/24 
R1(config) route-map FILTER_BGP permit 10 
R1(config-route-map) match ip address prefix-list ALLOW_ROUTES 
R1(config-router) neighbor 192.168.1.2 route-map FILTER_BGP out 

Verification Commands

show ip bgp summary 
show ip bgp neighbors 
show ip route bgp 

Module 2 – Configuring MPLS Unicast Routing

Enabling MPLS on Interfaces

R1(config) mpls ip 
R1(config) interface GigabitEthernet0/0 
R1(config-if) mpls ip 

Configuring LDP (Label Distribution Protocol)

R1(config) mpls ldp router-id Loopback0 force 
R1(config) mpls label protocol ldp 

MPLS VPN Setup

R1(config) vrf definition VPN_A 
R1(config-vrf) rd 100:1 
R1(config-vrf) route-target both 100:1 
R1(config) interface GigabitEthernet0/1 
R1(config-if) vrf forwarding VPN_A 

Verification Commands

show mpls interfaces 
show mpls ldp neighbor 
show mpls forwarding-table 

You Should Know:

  • BGP is used for inter-domain routing (Internet).
  • MPLS improves packet forwarding efficiency.
  • LDP dynamically assigns labels in MPLS networks.
  • Route filtering prevents unwanted route advertisements.

What Undercode Say:

Mastering BGP and MPLS is crucial for network engineers. Practice these commands in a lab (GNS3/EVE-NG) before production use. Always verify routes and labels to avoid misconfigurations.

Expected Output:

R1 show ip bgp 
BGP table version is 3, local router ID is 192.168.1.1 
Status codes: s suppressed, d damped, h history,  valid, > best, i - internal 
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

<blockquote>
  10.0.0.0/24 0.0.0.0 0 32768 i 
  20.0.0.0/24 192.168.1.2 0 0 65002 i 
  
R1 show mpls forwarding-table 
Local Outgoing Prefix Bytes Label Outgoing Next Hop 
Label Label or Tunnel Id Switched interface 
16 Pop Label 10.0.0.0/24 0 Gi0/0 192.168.1.2 

Prediction:

MPLS and BGP will remain critical in SDN (Software-Defined Networking) and 5G networks, requiring deeper automation with Python/Ansible.

URLs:

IT/Security Reporter URL:

Reported By: Https: – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram