cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
471
Views
0
Helpful
0
Replies

BGP Configuration with Public and Private ASN

md_s_mannan
Level 1
Level 1

I was working on the following case.

Case:

# I'm working in a router that has a 4 byte public ASN, 2 byte private ASN, and 2 public /24 IP blocks those has to be advertised.

Script for the Case:

Step 01: Build prefix list to be advertised and imported
========================================================
ip prefix-list IP1-EXPORT-TO-ISP seq 5 permit Y.Y.Y.Y/24                                                          (PUBLIC IP)
ip prefix-list IP2-EXPORT-TO-ISP seq 5 permit Z.Z.Z.Z/24                                                           (PUBLIC IP)
 
ip prefix-list IMPORT-FROM-ISP seq 5 permit 0.0.0.0/0
 
 
Step 02: Build Route Map based on which, IP and AS blocks will be filtered to be export/import
==============================================================================================
route-map PATH_PREPEND permit 10
set as-path prepend AAAAAA AAAAAA AAAAAA                                                                            (PUBLIC ASN)
 
route-map PATH_PREPEND_LOCAL permit 10
set as-path prepend BBBBB BBBBB BBBBB                                                                                   (PRIVATE ASN)
 
route-map IP_IMPORT permit 10
match ip address prefix-list IMPORT-FROM-ISP
set local-preference 200
 
route-map IP1_EXPORT permit 10
match ip address prefix-list IP1-EXPORT-TO-ISP
set origin igp
 
route-map IP2_EXPORT permit 10
match ip address prefix-list IP2-EXPORT-TO-ISP
set origin igp
 
 
Step 03: BGP CONFIGURATION
==========================
router bgp AAAAAA
 
aggregate-address Y.Y.Y.Y 255.255.255.0
aggregate-address Z.Z.Z.Z 255.255.255.0
 
neighbor Q.Q.Q.1 remote-as CCCCC                                                                                      (BGP: PUBLIC)
neighbor Q.Q.Q.1 description 2Public
neighbor Q.Q.Q.1 ebgp-multihop 5
neighbor Q.Q.Q.1 version 4
neighbor Q.Q.Q.1 timers 10 30
neighbor Q.Q.Q.1 soft-reconfiguration inbound
neighbor Q.Q.Q.1 route-map IP1-EXPORT out
neighbor Q.Q.Q.1 route-map IP2-EXPORT out
neighbor Q.Q.Q.1 route-map IP_IMPORT in
neighbor Q.Q.Q.1 route-map PATH_PREPEND out
 
neighbor R.R.R.1 remote-as DDDDD                                                                                        (BGP: PRIVATE)
neighbor R.R.R.1 local-as BBBBB
neighbor R.R.R.1 description 2Private
neighbor R.R.R.1 ebgp-multihop 5
neighbor R.R.R.1 version 4
neighbor R.R.R.1 timers 10 30
neighbor R.R.R.1 soft-reconfiguration inbound
neighbor R.R.R.1 route-map IP1-EXPORT out
neighbor R.R.R.1 route-map IP2-EXPORT out
neighbor R.R.R.1 route-map IP_IMPORT in
neighbor R.R.R.1 route-map PATH_PREPEND_LOCAL out
 
 
My question is, if the configuration is OK/sufficient. or need to add/modify things here.
 
Thanks in advance.
 
//
Mannan
0 Replies 0