Skip to content

Instantly share code, notes, and snippets.

@macros
Created September 26, 2012 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macros/3791374 to your computer and use it in GitHub Desktop.
Save macros/3791374 to your computer and use it in GitHub Desktop.
bgp samples
!
! Zebra configuration saved from vty
! 2012/03/15 02:25:13
!
hostname bgpd
log file /var/log/quagga/bgpd.log
log stdout
!
router bgp 31377
bgp router-id 17.16.0.1
network 172.16.0.0/24
neighbor cogent peer-group
neighbor cogent remote-as 174
neighbor cogent soft-reconfiguration inbound
neighbor cogent prefix-list self-export out
neighbor cogent route-map rm-cogent in
neighbor 149.1.1.1 peer-group cogent
!
ip prefix-list self-export seq 5 permit 172.16.0.0/24
ip prefix-list self-export seq 10 deny any
!
ip community-list standard cogent-customers-eu permit 174:21101
ip community-list standard cogent-germany permit 174:22005
!
route-map rm-cogent permit 10
match community cogent-germany
set local-preference 110
!
route-map rm-cogent permit 20
match community cogent-customers-eu
set local-preference 110
!
line vty
!
log "/var/log/bird.log" all;
router id 172.16.0.1;
define myas = 31377;
protocol static static_ebgp {
import all;
route 172.16.0.0/24 reject;
}
filter ebgp_in {
if (174,21101) ~ bgp_community then {
bgp_local_pref 110;
accept;
}
if (174,22005) ~ bgp_community then {
bgp_local_pref 110;
accept;
}
else reject;
}
protocol device {
scan time 10;
}
protocol kernel {
export all;
}
protocol bgp ebgp_cogent {
local as myas;
description "cogent";
neighbor 149.1.1.1 as 174;
import filter ebgp_in;
export where proto = "static_ebgp";
default bgp_local_pref 50;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment