BGP

From StarOS Community Wiki
Revision as of 17:38, 6 July 2009 by Knolan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BGP is oriented toward the largest scale, such as the entire Internet. It might be used by an ISP who has multiple attachment points to the Internet from different upstream providers.


To use BGP to peer on the Internet you must have an AS Number and a public IP Subnet assigned to you.

BGP can be as simple as you want to make it.

[code] Current configuration: ! hostname b2100 password 1234 ! router bgp 15947

bgp router-id 84.203.192.22
bgp log-neighbor-changes
bgp always-compare-med
bgp bestpath med confed
network 194.0.76.0/22



neighbor 84.203.192.21 remote-as 31458
neighbor 84.203.192.21 description Transit to Smart Telecom
neighbor 84.203.192.21 soft-reconfiguration inbound
neighbor 84.203.192.21 prefix-list AS-Transit-Provider-in in
neighbor 84.203.192.21 prefix-list AS-CCB-Smart-out out
neighbor 84.203.192.21 route-map Smart-Transit-in in
neighbor 84.203.192.21 route-map Smart-transit-out out
neighbor 91.142.224.177 remote-as 42090
neighbor 91.142.224.177 description Peer to Rapid Broadband
neighbor 91.142.224.177 soft-reconfiguration inbound
neighbor 91.142.224.177 prefix-list AS-Transit-Provider-in in
neighbor 91.142.224.177 prefix-list AS-CCB-RapidBB-out out
neighbor 91.142.224.177 route-map Rapid-Transit-in in
neighbor 91.142.224.177 route-map Rapid-Transit-out out
neighbor 91.142.224.179 remote-as 41736
neighbor 91.142.224.179 description Peer to Nova Networks
neighbor 91.142.224.179 shutdown
neighbor 91.142.224.179 soft-reconfiguration inbound
neighbor 91.142.224.179 prefix-list AS-NovaNet-in in
neighbor 91.142.224.179 prefix-list AS-CCB-peer-out out
neighbor 91.142.224.179 route-map Nova-peer-in in
neighbor 91.142.224.179 route-map Airport-peer-out out
neighbor 194.0.76.149 remote-as 15947
neighbor 194.0.76.149 description Link to B2100
neighbor 194.0.76.149 soft-reconfiguration inbound
neighbor 194.0.76.149 prefix-list AS-ALL-in in
neighbor 194.0.76.149 prefix-list AS-ALL-out out
neighbor 194.0.76.149 route-map ALL-in in
neighbor 194.0.76.149 route-map ALL-out out
neighbor 194.0.77.58 remote-as 15405
neighbor 194.0.77.58 description Customer East Cork Broadband
neighbor 194.0.77.58 soft-reconfiguration inbound
neighbor 194.0.77.58 prefix-list AS-ECBB-in in
neighbor 194.0.77.58 prefix-list AS-Customer-out out
neighbor 194.0.77.58 route-map ECBB-cust-in in
neighbor 194.0.77.58 route-map Customer-out out
neighbor 195.28.164.125 remote-as 23456
neighbor 195.28.164.125 description Test to Quagga
neighbor 195.28.164.125 ebgp-multihop 255
neighbor 195.28.164.125 timers 120 3600
neighbor 195.28.164.125 soft-reconfiguration inbound
neighbor 195.28.164.125 prefix-list AS-Quagga-in in
neighbor 195.28.164.125 prefix-list AS-CCB-out out
neighbor 195.28.164.125 route-map Quagga-test-in in
neighbor 195.28.164.125 route-map Quagga-test-out out

! access-list vtylist permit 127.0.0.1/32 access-list vtylist deny any ! ip prefix-list AS-ALL-in seq 10 permit any ip prefix-list AS-ALL-out seq 10 permit any ip prefix-list AS-CCB-RapidBB-out seq 10 permit 194.0.76.0/22 ip prefix-list AS-CCB-RapidBB-out seq 15 permit 194.0.78.0/23 ip prefix-list AS-CCB-RapidBB-out seq 20 permit 194.0.77.0/24 ip prefix-list AS-CCB-RapidBB-out seq 25 permit 194.0.76.0/24 ip prefix-list AS-CCB-RapidBB-out seq 30 permit 195.2.226.0/23 ip prefix-list AS-CCB-RapidBB-out seq 31 permit 195.2.226.0/24 ip prefix-list AS-CCB-RapidBB-out seq 32 permit 195.2.227.0/24 ip prefix-list AS-CCB-RapidBB-out seq 40 permit 91.198.244.0/24 ip prefix-list AS-CCB-RapidBB-out seq 50 deny any ip prefix-list AS-CCB-Smart-out seq 10 permit 194.0.76.0/22 ip prefix-list AS-CCB-Smart-out seq 30 permit 195.2.226.0/23 ip prefix-list AS-CCB-Smart-out seq 31 permit 195.2.226.0/24 ip prefix-list AS-CCB-Smart-out seq 32 permit 195.2.227.0/24 ip prefix-list AS-CCB-Smart-out seq 40 permit 91.198.244.0/24 ip prefix-list AS-CCB-Smart-out seq 50 deny any ip prefix-list AS-CCB-out seq 10 permit 194.0.76.0/22 ip prefix-list AS-CCB-out seq 20 permit 84.203.210.0/23 ip prefix-list AS-CCB-out seq 30 permit 195.2.226.0/23 ip prefix-list AS-CCB-out seq 31 permit 195.2.226.0/24 ip prefix-list AS-CCB-out seq 32 permit 195.2.227.0/24 ip prefix-list AS-CCB-out seq 40 permit 91.198.244.0/24 ip prefix-list AS-CCB-out seq 50 deny any ip prefix-list AS-CCB-peer-out seq 10 permit 194.0.76.0/22 ip prefix-list AS-CCB-peer-out seq 30 permit 195.2.226.0/23 ip prefix-list AS-CCB-peer-out seq 31 permit 195.2.226.0/24 ip prefix-list AS-CCB-peer-out seq 32 permit 195.2.227.0/24 ip prefix-list AS-CCB-peer-out seq 40 permit 91.198.244.0/24 ip prefix-list AS-CCB-peer-out seq 50 deny any ip prefix-list AS-Customer-nodefault-out seq 10 deny 0.0.0.0/0 ip prefix-list AS-Customer-nodefault-out seq 20 permit any ip prefix-list AS-Customer-onlydefault-out seq 10 permit 0.0.0.0/0 ip prefix-list AS-Customer-onlydefault-out seq 20 deny any ip prefix-list AS-Customer-out seq 10 permit any ip prefix-list AS-ECBB-in seq 10 permit 195.2.226.0/23 ip prefix-list AS-ECBB-in seq 11 permit 195.2.226.0/24 ip prefix-list AS-ECBB-in seq 12 permit 195.2.227.0/24 ip prefix-list AS-ECBB-in seq 20 permit 91.198.244.0/24 ip prefix-list AS-ECBB-in seq 30 deny any ip prefix-list AS-NovaNet-in seq 10 permit 91.142.110.0/20 ip prefix-list AS-NovaNet-in seq 20 deny any ip prefix-list AS-Quagga-in seq 10 deny any ip prefix-list AS-RapidBB-in seq 10 permit 91.142.224.0/20 ip prefix-list AS-RapidBB-in seq 20 permit 92.60.192.0/20 ip prefix-list AS-RapidBB-in seq 40 permit any ip prefix-list AS-Transit-Provider-in seq 5 permit any ! ip as-path access-list 1 permit .* ip as-path access-list 2 permit ^$ ip as-path access-list 3 permit ^15405$ ip as-path access-list 3 permit ^15947$ ip as-path access-list 3 permit ^$ ip as-path access-list 15405 permit ^15405$ ip as-path access-list 15947 permit ^15947$ ip as-path access-list 23456 permit ^23456$ ip as-path access-list 31458 permit ^31458$ ip as-path access-list 41736 permit ^41736$ ip as-path access-list 42090 permit ^42090$ ! route-map Nova-peer-in permit 10

match as-path 41736
set local-preference 100

! route-map Rapid-peer-in permit 10

match as-path 1
set local-preference 80

! route-map ECBB-cust-in permit 10

match as-path 15405
set local-preference 120

! route-map Quagga-test-in permit 10

match as-path 23456
set local-preference 10

! route-map Smart-transit-out permit 10

match as-path 3

! route-map Quagga-test-out permit 10

match as-path 3

! route-map Airport-peer-out permit 10

match as-path 3

! route-map Customer-out permit 10

match as-path 1

! route-map Transit-Provider-in permit 10

match as-path 1
set local-preference 80

! route-map ALL-in permit 10

match as-path 1

! route-map ALL-out permit 10

match as-path 1

! route-map Rapid-Transit-out permit 10

match as-path 3

! route-map Rapid-Transit-in permit 10

match as-path 1
set local-preference 80

! route-map Smart-Transit-in permit 10

match as-path 1
set local-preference 80

! line vty

access-class vtylist

! end [/code]