Skip to content

Paresh-Rai/BGP_Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Overview

This repository showcases a simple lab to practice BGP path selection for both inbound and outbound traffic. The lab uses a scenario where one ISP has a higher bandwidth link compared to the other, requiring BGP tuning to influence traffic. Local Preference and AS Path Prepending are used in this lab. The IP 4.4.4.4 is used as an example Internet resource.


Lab Setup

  • Pnetlabs
  • 4 Cisco routers

Loopbacks:

Router Loopback
R1 1.1.1.1/32
ISP2 2.2.2.2/32
ISP3 3.3.3.3/32
Internet 4.4.4.4/32

Links:

Link Network
R1–ISP2 10.0.12.0/30
R1–ISP3 10.0.13.0/30
ISP2–Internet 10.0.24.0/30
ISP3–Internet 10.0.34.0/30

Lab Topology

Lab Topology


Before BGP Tuning

Before BGP tuning BGP before

  • Without BGP tuning, the link via ISP2 is selected because it has the lower Router ID, which is used as the tiebreaker when other attributes are equal.

BGP Configurations

  • Outbound Traffic: Local Preference is used to influence R1's exit path. Weight could also be used.
  • Inbound Traffic: AS Path Prepending is used to influence traffic arriving at R1. MED could also be used.

Steps:

  1. A route-map for ISP3 is created and assigned a Local Preference of 200.
  2. A route-map for ISP2 is optionally assigned a Local Preference of 100.
  3. The route-maps are applied to the respective BGP neighbors.
  4. A route-map for AS Path Prepending is created, adding 65001 65001 to the path for ISP2.
  5. The AS Path prepend route-map is applied to ISP2.

BGP config


After BGP Tuning

BGP after R1 BGP after Internet Router

  • After tuning, the link via ISP3 is now preferred for both inbound and outbound traffic at R1.
  • Show commands (show ip bgp, show run | begin bgp) confirm the route-maps are applied and working as intended.

About

Simple BGP lab consisting of 4 routers to experience influencing inbound and outbound BGP path selection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors