Interdomain routing with BGP4 C BGP. A new approach to BGP simulation. (1/2)

Similar documents
Modeling the Routing of an ISP

BGP Routing and BGP Policy. BGP Routing. Agenda. BGP Routing Information Base. L47 - BGP Routing. L47 - BGP Routing

Modeling the Routing of an ISP with C-BGP

IBGP scaling: Route reflectors and confederations

Getting Familiar with the C-BGP Simulator

BGP Attributes and Policy Control

BGP Attributes and Policy Control

BGP Attributes and Policy Control

Communication Networks

C-BGP User s Guide (version )

This appendix contains supplementary Border Gateway Protocol (BGP) information and covers the following topics:

Interdomain routing with BGP4 Part 4/5

internet technologies and standards

Inter-Domain Routing: BGP II

Outline. Organization of the global Internet. BGP basics Routing policies The Border Gateway Protocol How to prefer some routes over others

Modelling Inter-Domain Routing

Connecting to a Service Provider Using External BGP

Inter-Domain Routing: BGP II

CS BGP v4. Fall 2014

BGP Scaling (RR & Peer Group)

BGP Protocol & Configuration. Scalable Infrastructure Workshop AfNOG2008

BGP Attributes and Path Selection

IOS Implementation of the ibgp PE CE Feature

Configuring BGP. Cisco s BGP Implementation

TELE 301 Network Management

Internet inter-as routing: BGP

EE 122: Inter-domain routing Border Gateway Protocol (BGP)

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

BGP. Autonomous system (AS) BGP version 4

Border Gateway Protocol (an introduction) Karst Koymans. Tuesday, March 8, 2016

Module 6 Implementing BGP

Cisco CISCO Configuring BGP on Cisco Routers Exam. Practice Test. Version

Symbols. Numerics I N D E X

Border Gateway Protocol

Routing Between Autonomous Systems (Example: BGP4) RFC 1771

LACNIC XIII. Using BGP for Traffic Engineering in an ISP

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

BGP. Autonomous system (AS) BGP version 4

Configuring BGP on Cisco Routers Volume 1

MPLS VPN Route Target Rewrite

Advanced Computer Networks

BGP Attributes (C) Herbert Haas 2005/03/11 1

BGP. Autonomous system (AS) BGP version 4

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

Border Gateway Protocol (an introduction) Karst Koymans. Monday, March 10, 2014

BGP Commands: M through N

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

Chapter 13 Configuring BGP4

CertifyMe. CertifyMe

Configuring Advanced BGP

BGP Diverse Path Using a Diverse-Path Route Reflector

Connecting to a Service Provider Using External BGP

Multihoming with BGP and NAT

BGP. Border Gateway Protocol (an introduction) Karst Koymans. Informatics Institute University of Amsterdam. (version 17.3, 2017/12/04 13:20:08)

Multiprotocol BGP (MBGP)

PART III. Implementing Inter-Network Relationships with BGP

Implementing BGP. BGP Functional Overview. Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) that allows you to create loop-free

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

BGP. Border Gateway Protocol A short introduction. Karst Koymans. Informatics Institute University of Amsterdam. (version 18.3, 2018/12/03 13:53:22)

Examination. ANSWERS IP routning på Internet och andra sammansatta nät, DD2491 IP routing in the Internet and other complex networks, DD2491

BGP Multihoming ISP/IXP Workshops

How BGP Routers Use the Multi Exit Discriminator for Best Path Selection

CS4450. Computer Networks: Architecture and Protocols. Lecture 15 BGP. Spring 2018 Rachit Agarwal

Internet Interconnection Structure

BGP Attributes and Policy Control. BGP Attributes. BGP Attributes. Agenda. What Is an Attribute? AS-Path. ISP/IXP Workshops.

Chapter 17 BGP4 Commands

Internet Routing : Fundamentals of Computer Networks Bill Nace

BGP and the Internet. Why Multihome? Why Multihome? Why Multihome? Why Multihome? Why Multihome? Redundancy. Reliability

BGP Route Reflector Commands

Q&As. CCIP Configuring BGP on Cisco Routers (BGP) Pass Cisco Exam with 100% Guarantee

Lecture 4: Intradomain Routing. CS 598: Advanced Internetworking Matthew Caesar February 1, 2011

BGP Graceful Shutdown

6.829 BGP Recitation. Rob Beverly September 29, Addressing and Assignment

Border Gateway Protocol - BGP

Configuring Internal BGP Features

Module 8 Multihoming Strategies Lab

Graph abstraction: costs. Graph abstraction 10/26/2018. Interplay between routing and forwarding

Interdomain Routing Reading: Sections P&D 4.3.{3,4}

Configuring a BGP Route Server

BGP on IOS: Getting Started

BGP Enhancements for IPv6. ISP Training Workshops

BGP Configuration. BGP Overview. Introduction to BGP. Formats of BGP Messages. Header

prefix filtering netkit-lab-bgp-1

CS 268: Computer Networking. Next Lecture: Interdomain Routing

MPLS VPN C H A P T E R S U P P L E M E N T. BGP Advertising IPv4 Prefixes with a Label

Internet Routing Basics

CS 457 Networking and the Internet. The Global Internet (Then) The Global Internet (And Now) 10/4/16. Fall 2016

BGP. Attributes 2005/03/11. (C) Herbert Haas

Exam : Title : BGP + MPLS Exam (BGP + MPLS)

BGP101. Howard C. Berkowitz. (703)

Introduction to BGP. ISP Workshops. Last updated 30 October 2013

Dynamics of Hot-Potato Routing in IP Networks

BGP Attributes and Policy Control. BGP Attributes. Agenda. What Is an Attribute? AS-Path. AS-Path loop detection. BGP Attributes

DE-CIX Academy: BGP Introduction. Notice of Liability. BGP Configuration Examples. Network Diagram for all examples. Links and Examples

ISP Border Definition. Alexander Azimov

Configuring BGP community 43 Configuring a BGP route reflector 44 Configuring a BGP confederation 44 Configuring BGP GR 45 Enabling Guard route

LARGE SCALE IP ROUTING LECTURE BY SEBASTIAN GRAF

CS 640: Introduction to Computer Networks. Intra-domain routing. Inter-domain Routing: Hierarchy. Aditya Akella

State of routing research

Transcription:

Interdomain routing with BGP4 C BGP A new approach to BGP simulation http://cbgp.info.ucl.ac.be/ (1/2) Bruno Quoitin (bqu@info.ucl.ac.be) Université Catholique de Louvain Computer Science and Engineering Dept. 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.1

Day 1 Introduction & Internals 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.2

Agenda Introduction How does it work? Internals topology representation simulator's principle BGP details How do we use it? Scripting setting up the topology setting up BGP routers policies Hands on... 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.3

Motivations Main interests: Traffic Engineering study effects of manipulating BGP attributes investigate changes in BGP protocol Requirements Policy Routing (no protocol dynamics) Large timescale aspects (10 ths of minutes,hours) Scalability & efficiency: topologies with same order of magnitude as Internet 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.4

Motivations Why a new simulator? Traditional simulators do not scale Javasim/SSFNet Packet level simulation Granularity is too high 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.5

History Development started in December 2002 under the ATRIUM project and now continued under the TOTEM project. First version (1.0.0) simplified BGP decision process (local pref, aspath, tie break) AS level: one router per AS 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.6

History Latest version (1.1.17) complete decision process route reflectors versatile filters intradomain routing various MED behaviours command line Announced version (1.1.18) integration within TOTEM toolbox support for XML topologies 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.7

New approach Assumptions: BGP sessions rely on TCP Outcome of BGP decision process does not rely on time Consequences: Transmission lines never fail => simulator only preserves BGP messages ordering on each transmission line Deterministic BGP decision process 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.8

How does it work? Conceptual view start/stop setup topology DB [nodes, links,...] read script / CLI setup Router configs DB [peerings,...] read scheduler [queue of events] setup, read routers states DB [RIBs, sessions...] update 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.9

Internals (1) Topology database Topology represented as a graph node = router, identified by a single IP address edge = physical link Graph implementation radix tree contains all nodes: O(1) adjacencies maintained in sorted heaps: O(n) Edge attributes delay (informal) metric (for intradomain routing) Current limitation: single link between nodes 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.10

Internals (2) Example: topological view 10.0.0.2 10 AS1 5 10.0.0.1 10.0.0.4 5 5 10.0.0.3 physical link ibgp session 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.11

Internals (3) Example: content of topology database network (radix-tree) 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 adjacencies (sorted heap) 10.0.0.2, 10 10.0.0.3, 5......... 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.12

Internals (4) Routers configs database List of BGP neighbors (sorted heap) Per peer input/output filters Routers states database Routing table (radix trees) STATIC routes IGP routes (computed) BGP routes (filled by BGP decision process) BGP sessions Adj RIBs, Loc RIBs (radix trees) 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.13

Internals (5) Example: routers configs/states databases network 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 Routing table (radix-tree)......... BGP neighbors: (sorted heap) 10.0.0.2 [filters, Adj-RIB-in, Adj-RIB-out] 10.0.0.3 [...] 10.0.0.4 [...] Loc-RIB (radix-tree).................. 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.14

Internals (6) Scheduler Single linear global queue Holds messages (with src, dst and next hop) Sequential processing of messages by a single thread Messages are propagated hop by hop until they reach their final destination 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.15

Internals (7) Simulator's FIFO queue source router send msg PUSH new msg FIFO queue POP msg Deliver msg to next-hop router... UPDATE [192.168.1/24] src=10.0.0.3 dst=10.0.0.4 next-hop=10.0.0.4 UPDATE [192.168.0/24] src=10.0.0.1 dst=10.0.0.2 next-hop=10.0.0.2 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.16

Internals (8) Structure of a router (simplified) Adj-RIB-in Input filter Decision Process Output filter Adj-RIB-out yes BGP peer? yes dst=local? no no drop Loc-RIB RT Forwarding:? route no popped drop push msg msg 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.17 yes

Internals (9) Decision process (simplified) 0). ignores routes with unreachable next hop 1). prefer routes with highest LOCAL PREF 2). prefer routes with shortest AS PATH... i). prefer ebgp routes over ibgp routes... j). prefer routes with nearest IGP next hop... n). prefer routes with smallest IP address 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.18

Internals (10) Per peer filters sequence of rules (predicates, actions) predicates: match prefix, community actions: local pref, communities, as path prepending,... Peer 1 Input filter: (predicates, actions) (predicates, actions)... Adj-RIB-in Decision process Adj-RIB-out Output filter: (predicates, actions) (predicates, actions)... Peer 1 Peer 2 Input filter: (predicates, actions) (predicates, actions)... Adj-RIB-in Loc-RIB Adj-RIB-out Output filter: (predicates, actions) (predicates, actions)... Peer 2 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.19

Internals (11) Filtering one route filter(route) foreach (rule R=(predicate, actions)) if (R.predicate matches ROUTE) for (i= 0; i < size(r.actions); i++) if (R.action[i] == ACCEPT) return ACCEPT; elsif (R.action[i] == DENY) { return DENY; else apply(r.action[i], ROUTE); return ACCEPT; 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.20

Internals (12) Example: running simulation FIFO queue <empty> AS2 2.1 AS1 1.1 Loc-RIB: 192.168/16, local AS4 4.1 AS3 3.1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.21

Internals (13) Example: running simulation FIFO queue 192.168/16 [AS1] src=1.1 dst=2.1 AS2 2.1 AS1 1.1 Loc-RIB: 192.168/16, local 192.168/16 [AS1] src=1.1 dst=3.1 AS3 3.1 AS4 4.1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.22

Internals (14) Example: running simulation FIFO queue 192.168/16 [AS1] AS2 2.1 Loc-RIB: 192.168/16, [AS1] AS1 1.1 Loc-RIB: 192.168/16, local AS4 4.1 AS3 3.1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.23

Internals (15) Example: running simulation FIFO queue AS2 2.1 Loc-RIB: 192.168/16, [AS1] 192.168/16 [AS2 AS1] src=2.1 dst=3.1 AS1 1.1 Loc-RIB: 192.168/16, local AS4 4.1 AS3 3.1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.24

Internals (16) Example: running simulation FIFO queue AS2 2.1 Loc-RIB: 192.168/16, [AS1] AS1 1.1 Loc-RIB: 192.168/16, local 192.168/16 [AS1] AS4 4.1 AS3 3.1 Loc-RIB: 192.168/16, [AS1] 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.25

Internals (17) Example: running simulation FIFO queue AS2 2.1 Loc-RIB: 192.168/16, [AS1] AS1 1.1 Loc-RIB: 192.168/16, local AS3 3.1 Loc-RIB: 192.168/16, [AS1] 192.168/16 [AS2 AS1] src=3.1 dst=4.1 AS4 4.1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.26

Internals (18) Example: running simulation FIFO queue AS2 2.1 Loc-RIB: 192.168/16, [AS1] 192.168/16 [AS2 AS1} AS1 1.1 Loc-RIB: 192.168/16, local AS4 4.1 Loc-RIB: 192.168/16, AS2 AS1 AS3 3.1 Loc-RIB: 192.168/16, [AS1] 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.27

Internals (19) Example: running simulation FIFO queue AS2 2.1 Loc-RIB: 192.168/16, [AS1] AS1 1.1 Loc-RIB: 192.168/16, local AS3 3.1 Loc-RIB: 192.168/16, [AS1] AS4 4.1 Loc-RIB: 192.168/16, [AS2 AS1] 192.168/16 [AS4 AS2 AS1] src=4.1 dst=3.1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.28

Internals (20) Example: running simulation FIFO queue AS2 2.1 Loc-RIB: 192.168/16, [AS1] AS1 1.1 Loc-RIB: 192.168/16, local AS4 4.1 192.168/16 [AS3 AS1} Loc-RIB: 192.168/16, [AS2 AS1] AS3 3.1 Loc-RIB: 192.168/16, [AS1] 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.29

Internals (21) Example: running simulation FIFO queue <empty> AS2 2.1 Loc-RIB: 192.168/16, [AS1] AS1 1.1 Loc-RIB: 192.168/16, local AS4 4.1 Loc-RIB: 192.168/16, [AS2 AS1] AS3 3.1 Loc-RIB: 192.168/16, [AS1] 192.168/16 [AS4 AS2 AS1} 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.30

Scripting (1) How do we setup a C BGP simulation? through scripting file / interactive CISCO like syntax A few main steps: create nodes and links configure static routes configure IGP setup BGP routers (peerings, filters, etc) run simulation... 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.31

Scripting (2) CISCO like syntax sequence of keywords and parameters Console cbgp> net add node 10.0.0.1 cbgp> bgp add router 1 10.0.0.1 cbgp> bgp router 10.0.0.1 cbgp-router> add network 192.168/16 cbgp-router> add peer 1 10.0.0.2 cbgp-router> peer 10.0.0.2 up cbgp-router> exit cbgp> bgp router 10.0.0.1 show rib 192.168/16 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.32

Scripting (3) Classes of commands net... commands related to topology and IP routing bgp... commands related to BGP sim... commands related to the simulator miscelaneous additional commands 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.33

Network commands (1) net add node IPaddr net add link IPaddr1 IPaddr2 Delay net link IPaddr1 IPaddr2 igp weight Weight net node IPaddr route add Prefix Nh Metric net node IPaddr spf prefix Prefix 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.34

Network commands (2) net node IPaddr show rt Prefix net node IPaddr1 record route IPaddr2 and more... 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.35

Network commands (3) Example Console net add node 10.0.0.1 net add node 10.0.0.2 net add link 10.0.0.1 10.0.0.2 10 10 10.0.0.1 10.0.0.2 Routing table: Routing table: 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.36

Network commands (4) Example Console net add node 10.0.0.1 net add node 10.0.0.2 net add link 10.0.0.1 10.0.0.2 10 net node 10.0.0.1 spf-prefix 10/8 net node 10.0.0.2 spf-prefix 10/8 10 10.0.0.1 10.0.0.2 Routing table: 10.0.0.2 IGP Routing table: 10.0.0.1 IGP 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.37

Network commands (5) Example Console 20.0.0.1 Routing table: 10.0.0.2/32 STATIC Domain 2 net add node 10.0.0.1 net add node 10.0.0.2 net add node 20.0.0.1 net add link 10.0.0.1 10.0.0.2 10 net add link 10.0.0.2 20.0.0.1 5 net node 10.0.0.1 spf-prefix 10/8 net node 10.0.0.2 spf-prefix 10/8 net node 10.0.0.2 route add 20.0.0.1/32 20.0.0.1 5 net node 20.0.0.1 route add 10.0.0.2/32 10.0.0.2 5 10 10.0.0.1 10.0.0.2 Routing table: 10.0.0.2/32 IGP Domain 1 Routing table: 10.0.0.1/32 IGP 20.0.0.1/32 STATIC 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.38

Network commands (6) Example Console 20.0.0.1 Routing table: 10.0.0.2/32 IGP Domain 2 net options igp-inter on net add node 10.0.0.1 net add node 10.0.0.2 net add node 20.0.0.1 net add link 10.0.0.1 10.0.0.2 10 net add link 10.0.0.2 20.0.0.1 5 net node 10.0.0.1 spf-prefix 10/8 net node 10.0.0.2 spf-prefix 10/8 10 10.0.0.1 10.0.0.2 Routing table: 10.0.0.2/32 IGP 20.0.0.1/32 IGP Domain 1 Routing table: 10.0.0.1/32 IGP 20.0.0.1/32 IGP 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.39

BGP commands (1) bgp add router ASnum IPaddr bgp router IPaddr add network Network bgp router IPaddr1 add peer ASnum IPaddr2 bgp router IPaddr1 peer IPaddr2 up bgp router IPaddr1 peer IPaddr2 next hop self 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.40

BGP commands (2) bgp router IPaddr1 show rib IPaddr2 Prefix/* bgp router IPaddr1 show rib in Peer * IPaddr2 Prefix * bgp router IPaddr record route Prefix bgp router IPaddr1 peer IPaddr2 next hop self rr client virtual recv Message 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.41

BGP commands (3) Example (ibgp) Console bgp add router 1 10.0.0.1 bgp router 10.0.0.1 add peer 1 10.0.0.2 peer 10.0.0.2 up AS1 10 AS1 10.0.0.1 10.0.0.2 Routing table: 10.0.0.2 IGP AS 1 ibgp session Routing table: 10.0.0.1 IGP bgp add router 1 10.0.0.2 bgp router 10.0.0.2 add peer 1 10.0.0.1 peer 10.0.0.1 up sim run 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.42

Example (ebgp) Console bgp router 10.0.0.2 add network 10.0.0/24 add peer 2 20.0.0.1 peer 20.0.0.1 up bgp router 20.0.0.1 add network 20.0.0/24 add peer 1 10.0.0.2 peer 10.0.0.2 up sim run BGP commands (4) 20.0.0.1 10 10.0.0.1 10.0.0.2 Routing table: 10.0.0.2/32 IGP ibgp! missing route! (20.0.0/24) Routing table: 10.0.0.2/32 STATIC 20.0.0/24 BGP ebgp AS 2 AS 1 Routing table: 10.0.0.1/32 IGP 20.0.0.1/32 STATIC 20.0.0/24 BGP 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.43

Next hop self Console BGP commands (5) bgp router 10.0.0.2 add network 10.0.0/24 add peer 2 20.0.0.1 peer 20.0.0.1 next-hop-self peer 20.0.0.1 up bgp router 20.0.0.1 add network 20.0.0/24 add peer 1 10.0.0.2 peer 10.0.0.2 up sim run 20.0.0.1 10 10.0.0.1 10.0.0.2 Routing table: 10.0.0.2/32 IGP 20.0.0/24 BGP ibgp Routing table: 10.0.0.2/32 STATIC 20.0.0/24 BGP ebgp AS 2 AS 1 Routing table: 10.0.0.1/32 IGP 20.0.0.1/32 STATIC 20.0.0/24 BGP Use peer 20.0.0.1 next-hop-self 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.44

BGP commands (6) without Next hop self Console bgp router 10.0.0.2 add network 10.0.0/24 add peer 2 20.0.0.1 peer 20.0.0.1 up bgp router 20.0.0.1 add network 20.0.0/24 add peer 1 10.0.0.2 peer 10.0.0.2 up sim run 20.0.0.1 10 10.0.0.1 10.0.0.2 Routing table: 10.0.0.2/32 IGP 20.0.0.1/32 IGP 20.0.0/24 BGP ibgp Routing table: 10.0.0.2/32 IGP 10.0.0/24 BGP ebgp Routing table: 10.0.0.1/32 IGP 20.0.0.1/32 IGP 20.0.0/24 BGP Use net options igp-inter on AS 2 AS 1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.45

Miscellaneous commands sim run include Script example: include /workspace/scripts/toto.cli print Message example: print Hello World\n # This is a comment 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.46

Policies (1) bgp router IPaddr1 peer IPaddr2 filter [in out] add rule insert rule Index remove rule Index where a rule is composed of match logical combination of predicates actions comma separated list of actions 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.47

Policies (2) Supported match predicates any match all routes community is Community match routes that contain given community (specified as X or X:Y) prefix is Prefix match routes for exact given prefix prefix in Prefix match routes contained in given prefix 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.48

Policies (3) Not yet implemented regular expressions on AS Path less specific prefixes 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.49

Policies (4) Supported actions accept accept the route deny deny the route as path prepend Amount prepend the route's as path Amount times community add Community add the given community to the route community strip Community remove all the route's communities 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.50

Policies (5) Supported actions (cont') local pref Pref change the route's local pref metric Med internal change the route's multi exit discriminator (absolute value or based on IGP) red community add prepend Amount Target add a redistribution community that requests prepending Amount times towards Target red community add ignore Target add a redistribution community that requests ignoring Target 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.51

Policies (6) Example Prefer routes received from neighbor 2.0.0.1 bgp router 1.0.0.1 add peer 2 2.0.0.1 peer 2.0.0.1 filter in add-rule match any action local-pref 120 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.52

Policies (7) Example Deny routes towards martian prefix 192.168/16 bgp router 1.0.0.1 add peer 2 2.0.0.1 peer 2.0.0.1 filter out add-rule match prefix is 192.168/16 action deny 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.53

C BGP results (1) Different means displaying routing table of one router displaying Adj RIB in and Loc RIB of one BGP router traceing route from one router to another traceing AS path from one router to a prefix recording BGP messages exchanged during the simulation 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.54

C BGP results (2) Routing table of one node cbgp> net node 1.0.0.1 show rt * 4.0.0.0/8 4.0.0.1 0 BGP 4.0.0.1/32 4.0.0.1 5 STATIC 5.0.0.0/8 5.0.0.2 0 BGP 5.0.0.2/32 5.0.0.2 5 STATIC cbgp> net node 1.0.0.1 show rt 5/8 5.0.0.0/8 5.0.0.2 0 BGP cbgp> net node 1.0.0.1 show rt 5.0.0.2 5.0.0.2/32 5.0.0.2 5 STATIC 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.55

C BGP results (3) Loc RIB of one router cbgp> bgp router 1.0.0.1 show rib * i> 1.0.0.0/8 1.0.0.1 0 0 null i *> 4.0.0.0/8 4.0.0.1 0 4294967295 4 i *> 5.0.0.0/8 5.0.0.2 0 4294967295 5 i cbgp> bgp router 1.0.0.1 show rib 5/8 *> 5.0.0.0/8 5.0.0.2 0 4294967295 5 i cbgp> bgp router 1.0.0.1 show rib 5.0.0.2 *> 5.0.0.0/8 5.0.0.2 0 4294967295 5 i 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.56

C BGP results (4) Adj RIB in of one router cbgp> bgp router 1.0.0.1 show rib-in 4.0.0.1 * * 2.0.0.0/8 4.0.0.1 0 4294967295 4 2 i *> 4.0.0.0/8 4.0.0.1 0 4294967295 4 i * 6.0.0.0/8 4.0.0.1 0 4294967295 4 2 6 i 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.57

C BGP results (5) Traceing route cbgp> net node 1.0.0.1 record-route 5.0.0.2 1.0.0.1 5.0.0.2 SUCCESS 1.0.0.1 5.0.0.2 cbgp> net node 1.0.0.1 record-route 6.0.0.2 1.0.0.1 6.0.0.2 SUCCESS 1.0.0.1 2.0.0.1 6.0.0.1 6.0.0.2 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.58

C BGP results (6) Traceing AS path cbgp> bgp router 1.0.0.1 record-route 5/8 1.0.0.1 5.0.0.0/8 SUCCESS 1 5 cbgp> bgp router 1.0.0.1 record-route 6/8 1.0.0.1 6.0.0.0/8 SUCCESS 1 2 6 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.59

C BGP results (7) Recording BGP messages use bgp options msg monitor File... 6.0.0.2 BGP4 114.00 W 6.0.0.1 6 5.0.0.0/8 5.0.0.2 BGP4 127.00 A 5.0.0.1 5 6.0.0.0/8 3 6 IGP 5.0.0.1 0 1.0.0.1 BGP4 147.00 A 5.0.0.2 5 6.0.0.0/8 5 3 6 IGP 5.0.0.2 0 5.0.0.1 BGP4 147.00 W 5.0.0.2 5 6.0.0.0/8... 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.60

Route reflectors (1) Goal Decrease number of ibgp sessions Decrease information known by BGP routers Affect routing choices How to setup RRs? Only change sessions with RR clients 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.61

Route reflectors (2) Example Console bgp router 1.0.0.1 add peer 1 1.0.0.2 add peer 1 1.0.0.3 peer 1.0.0.2 rr-client peer 1.0.0.3 rr-client peer 1.0.0.2 up peer 1.0.0.3 up RR 1.0.0.1 client client 1.0.0.2 1.0.0.3 AS1 Only change sessions with RR-clients 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.62

Route reflectors (3) Multiple RRs 1.0.0.1 1.0.0.4 Console bgp router 1.0.0.1 add peer 1 1.0.0.2 add peer 1 1.0.0.3 add peer 1 1.0.0.4 peer 1.0.0.2 rr-client peer 1.0.0.3 rr-client peer 1.0.0.2 up peer 1.0.0.3 up peer 1.0.0.4 up client 1.0.0.2 RR AS1 RR client 1.0.0.3 Full mesh of ibgp sessions between RRs Default cluster ID based on IP address (change with set cluster id) 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.63

Hands on... (1) Installation download from http://cbgp.info.ucl.ac.be/ libgds 1.1.5 cbgp 1.1.17 tar xvzf libgds 1.1.5.tar.gz cd libgds 1.1.5./configure; make; sudo make install cd.. tar xvzf cbgp 1.1.17.tar.gz cd cbgp 1.1.17./configure; make 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.64

Hands on... (2) Exercises Ex1: Write a C BGP script that models basetopo 1 (next slide) Ex2: Based on the topo of Ex1, show the inbound and outbound paths passing on each access link of AS6 Ex3: Try to balance the inbound/outbound paths on each access link of AS6 using local pref and as path prepending 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.65

base topo 1 2004, B. Quoitin Interdomain Routing with BGP4, 25 26 Nov. 2004 1.66