Route Policy Language. Set Object

Similar documents
BGP Attributes and Policy Control

BGP Attributes and Policy Control

BGP Attributes and Policy Control

BGP Route Reflector Commands

BGP Attributes and Path Selection

BGP Support for 4-byte ASN

Module 6 Implementing BGP

Deploy MPLS L3 VPN. APNIC Technical Workshop October 23 to 25, Selangor, Malaysia Hosted by:

Implementing DCI VXLAN Layer 3 Gateway

BGP Support for Next-Hop Address Tracking

Configuring a BGP Route Server

IOS Implementation of the ibgp PE CE Feature

APNIC elearning: BGP Basics. 30 September :00 PM AEST Brisbane (UTC+10) Revision: 2.0

Configuring IPv6 Provider Edge over MPLS (6PE)

IOS XR 2016/7/1. IOS XR Routers

H3C BGP Configuration Examples

BGP Enhancements for IPv6. ISP Training Workshops

SDN Workshop. Contact: WSDN01_v0.1

MultiVRF Deployment Example

LAB1: BGP IPv4. BGP: Initial Config. Disclaimer

Contents. BGP commands 1

Brocade Vyatta Network OS Routing Policies Configuration Guide, 5.2R1

BGP Best External. Finding Feature Information

Configure Segment Routing for BGP

BGP FlowSpec Route-reflector Support

BGP Support for Next-Hop Address Tracking

Brocade 5600 vrouter Routing Policies Configuration Guide

BGP Persistence. Restrictions for BGP Persistence. Information About BGP Persistence

Protecting an EBGP peer when memory usage reaches level 2 threshold 66 Configuring a large-scale BGP network 67 Configuring BGP community 67

Connecting to a Service Provider Using External BGP

Route Leaking in MPLS/VPN Networks

BGP Nonstop Routing was made a default feature.

32-bit ASNs. Philip Smith. AfNOG rd April 1st May Abuja, Nigeria

BGP Support for the L2VPN Address Family

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

ibgp Multipath Load Sharing

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

BGP Policy Lab - Partial Routing

Adapted from the Synchronization example in g/case/studies/icsbgp4.html

BGP can also be used for carrying routing information for IPv6 prefix over IPv6 networks.

BGP Link Bandwidth. Finding Feature Information. Prerequisites for BGP Link Bandwidth

BGP Event-Based VPN Import

BGP on IOS: Getting Started

Page1. Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE

Connecting to a Service Provider Using External BGP

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

Example: Conditionally Generating Static Routes

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

Multiprotocol BGP Extensions for IP Multicast Commands

ibgp Multipath Load Sharing

Network Configuration Example

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

Rev External BGP

MPLS VPN Route Target Rewrite

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

ISP Border Definition. Alexander Azimov

Border Gateway Protocol - BGP

Contents. Introduction. Prerequisites. Requirements. Components Used

APNIC elearning: MPLS L3 VPN

BGP Link Bandwidth. Finding Feature Information. Prerequisites for BGP Link Bandwidth

BGP Support for the L2VPN Address Family

Configuration and Management of Networks 2012

IBGP scaling: Route reflectors and confederations

Table of Contents 1 BGP Configuration 1-1

INTRODUCTION TO CISCO IOS XR

BGP Commands: M through N

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

internet technologies and standards

South America Workshop WALC 2006 (Quito, Ecuador July 06)

Configuration prerequisites 45 Configuring BGP community 45 Configuring a BGP route reflector 46 Configuring a BGP confederation 46 Configuring BGP

BGP Additional Paths. Finding Feature Information. Information About BGP Additional Paths. Problem That Additional Paths Can Solve

BGP mvpn BGP safi IPv4

BGP Cost Community. Prerequisites for the BGP Cost Community Feature

From the given configuration taken from RTA and graphic, which network will be filtered from being propagated to RTC from RTA?

Border Gateway Protocol

Internetwork Expert s CCNP Bootcamp. Border Gateway Protocol (BGP) What Is BGP?

IRS16: 4 byte ASN. Version: 1.0 Date: April 22, 2008 Cisco Systems 2008 Cisco, Inc. All rights reserved. Cisco Systems Japan

Table of Contents. BGP Configuration 1

Configuring Internal BGP Features

R&E ROUTING SECURITY BEST PRACTICES. Grover Browning Karl Newell

Operation Manual BGP. Table of Contents

Internet Routing Protocols Lecture 01 & 02

IPv6 Module 1c ibgp. Prerequisites: IPv6 Module 1a (OSPF) or IPv6 Module 1b (ISIS).

InterAS Option B. Information About InterAS. InterAS and ASBR

H3C S5830V2 & S5820V2 Switch Series

RealCiscoLAB.com. Chapter 6 Lab 6-1, Configuring BGP with Default Routing. Configure BGP to exchange routing information with two ISPs.

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

PennNet and MAGPI. Shumon Huque University of Pennsylvania April 1st 2009

BGP Scaling Techniques

BGP Diverse Path Using a Diverse-Path Route Reflector

Configure L2VPN Autodiscovery and Signaling

HPE FlexFabric 5940 Switch Series

Configuring Advanced BGP

Multiprotocol BGP (MBGP)

IPv6 Switching: Provider Edge Router over MPLS

Ravi Chandra cisco Systems Cisco Systems Confidential

Junos OS Multiple Instances for Label Distribution Protocol Feature Guide Release 11.4 Published: Copyright 2011, Juniper Networks, Inc.

HP FlexFabric 5930 Switch Series

Chapter 20 IPv6 BGP Unicast Address Family Commands

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

Transcription:

Route Policy Language as-path-set name [set elements] end-set Set Object Route Policy Object route-policy name [policy statements] community-set name [set elements] end-set AS Path Set Community Set extcommunity-set name [set elements] end-set Extended Community Set Prefix Set prefix-set name [set elements] end-set Route Distinguisher Set rd-set name [set elements] end-set

route-policy mypolicy if med eq 50 and destination in (10.0.0.0/8) then set local-preference 50 else pass this will pass all other prefixes without changes. Otherwise they would be dropped by the implicit drop and not appear in the BGP table. Use in case you dont want to drop any prefixes, but you do want to modify some of them endif route-policy mypolicy if med eq 100 and (destination in (10.0.0.0/8) or as-path in (500)) then

prefix-set sitebprefixes 2001:db8:b:10::/64, 2001:db8:b:11::/64 end-set route-policy SiteA-in-R1 if destination in sitebprefixes then set local-preference 150 pass not explicitly needed here as any set statement will grant a pass. Just for consistency. else set local-preference 200 pass endif route-policy SiteA-in-R1 if destination in (2001:db8:b:10::/64,2001:db8:b:11::/64) then set local-preference 150 pass else set local-preference 200 pass endif

route-policy allow_all pass router bgp 64500 neighbor 10.1.1.1 remote-as 65000 address-family ipv4 unicast route-policy mypolicy_in in route-policy mypolicy_out out

BGP AS 64501 Set weight 40,000 Set local pref 200 Set communities 65000:100 and 65000:200 BGP AS 64500 ISP-1 :1 EDGE :5 :5 IBGP :3 AS path prepend, 5x Set weight 60,000 Set local pref 300 Set communities 65000:100 and 65000:200 ISP-2

prefix-set neighbors 2001:db8:1:5::1, 2001:db8:3:5::3 end-set route-policy parameters($weight, $localpref) set weight $weight set local-preference $localpref route-policy communities set community (65000:100) additive set community (65000:200) additive route-policy ebgp_neighbor($neighbors, $weight, $localpref) if next-hop in $neighbors then apply parameters($weight, $localpref) apply communities else apply parameters(32000, 100) set community (100:100) set community (100:200) endif

route-policy ISP_1_in apply ebgp_neighbor(neighbors, 40000, 200) route-policy ISP_2_in apply ebgp_neighbor(neighbors, 60000, 300) route-policy ISP_1_out pass route-policy ISP_2_out if as-path in (ios-regex '^$') then prepend as-path 64501 5 endif The BGP part router bgp 64501 bgp router-id 5.5.5.5 address-family ipv6 unicast network 2001:db8::5:5:5:5/128 network 2001:db8:a:10::/64 network 2001:db8:a:11::/64 neighbor 2001:db8:1:5::1 remote-as 64500 keychain EBGP address-family ipv6 unicast route-policy ISP_1_in in route-policy ISP_1_out out neighbor 2001:db8:3:5::3 remote-as 64500 address-family ipv6 unicast route-policy ISP_2_in in route-policy ISP_2_out out

RP/0/0/CPU0:EDGE#show bgp ipv6 unicast Thu Jan 22 03:01:24.991 UTC BGP router identifier 5.5.5.5, local AS number 64501 BGP generic scan interval 60 secs BGP table state: Active Table ID: 0xe0800000 RD version: 181 BGP main routing table version 181 BGP scan interval 60 secs Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path * 2001:db8::1:1:1:1/128 2001:db8:1:5::1 0 200 40000 64500 i *> 2001:db8:3:5::3 300 60000 64500 i * 2001:db8::2:2:2:2/128 2001:db8:1:5::1 200 40000 64500 i *> 2001:db8:3:5::3 300 60000 64500 i * 2001:db8::3:3:3:3/128 2001:db8:1:5::1 200 40000 64500 i *> 2001:db8:3:5::3 0 300 60000 64500 i * 2001:db8::4:4:4:4/128 2001:db8:1:5::1 200 40000 64500 i *> 2001:db8:3:5::3 300 60000 64500 i (output omitted) Processed 19 prefixes, 35 paths RP/0/0/CPU0:EDGE#

RP/0/0/CPU0:EDGE#show bgp ipv6 unicast 2001:db8::1:1:1:1/128 Thu Jan 22 03:04:48.177 UTC BGP routing table entry for 2001:db8::1:1:1:1/128 Versions: Process brib/rib SendTblVer Speaker 176 176 Last Modified: Jan 22 02:15:53.551 for 00:48:54 Paths: (2 available, best #2) Not advertised to any peer Path #1: Received by speaker 0 Not advertised to any peer 64500 2001:db8:1:5::1 from 2001:db8:1:5::1 (1.1.1.1) Origin IGP, metric 0, localpref 200, weight 40000, valid, external, import suspect Received Path ID 0, Local Path ID 0, version 0 Community: 65000:100 65000:200 Origin-AS validity: not-found Path #2: Received by speaker 0 Not advertised to any peer 64500 2001:db8:3:5::3 from 2001:db8:3:5::3 (3.3.3.3) Origin IGP, localpref 300, weight 60000, valid, external, best, group-best, import-candidate, import suspect Received Path ID 0, Local Path ID 1, version 176 Community: 65000:100 65000:200 Origin-AS validity: not-found

RP/0/0/CPU0:ISP-2#show bgp ipv6 unicast dfa-regex 64501 Thu Jan 22 03:07:56.082 UTC BGP router identifier 3.3.3.3, local AS number 64500 BGP generic scan interval 60 secs BGP table state: Active Table ID: 0xe0800000 RD version: 106 BGP main routing table version 106 BGP scan interval 60 secs Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *>i2001:db8::5:5:5:5/128 2001:db8::1:1:1:1 0 100 0 64501 i * 2001:db8:3:5::5 0 0 64501 64501 64501 64501 64501 64501 i *>i2001:db8:a:10::/64 2001:db8::1:1:1:1 0 100 0 64501 i * 2001:db8:3:5::5 0 0 64501 64501 64501 64501 64501 64501 i *>i2001:db8:a:11::/64 2001:db8::1:1:1:1 0 100 0 64501 i * 2001:db8:3:5::5 0 0 64501 64501 64501 64501 64501 64501 i Processed 3 prefixes, 6 paths

RP/0/0/CPU0:R7#edit? as-path-set edit an as-path-set community-set edit a community-set extcommunity-set edit an extended-community-set policy-global edit policy-global definitions prefix-set edit a prefix-set rd-set edit a rd-set route-policy edit a route-policy tag-set edit a tag-set RP/0/0/CPU0:R7#edit route-policy setorigin? emacs to use Emacs editor nano to use nano editor vim to use Vim editor <cr> RP/0/0/CPU0:R7#edit route-policy setorigin vim (at this point we get a VI based editor with the policy, then we save and exit) Wed Jan 21 23:34:05.095 UTC [OK] "/dev/shmem/rpl_edit.778520" 4 lines, 53 characters written Proceed with commit (yes/no/cancel)? [cancel]: yes Parsing.cy 53 bytes parsed in 1 sec (51)bytes/sec Committing. Prepared commit in 0 sec ~ 1 items committed in 1 sec (0)items/sec Updating. Updated Commit database in 1 sec