Difference between revisions of "Cisco BGP"

From HackerNet
Jump to: navigation, search
Line 28: Line 28:
 
  router bgp [ASN]
 
  router bgp [ASN]
 
  no auto-summary
 
  no auto-summary
 +
router-id [loopback-adress]
 +
Best practice
 +
ip bgp community new-format
 
iBGP eller eBGP
 
iBGP eller eBGP
 
  neighbor [ip-address] remote-as [ASN]
 
  neighbor [ip-address] remote-as [ASN]
Loopback
+
Loopback. When configuring iBGP always use loopbacks (advertised by your IGP) for peering.
 
  neighbor [ip-address] update-source [interface]
 
  neighbor [ip-address] update-source [interface]
 
eBGP om det ej är directly connected, t.ex. loopback
 
eBGP om det ej är directly connected, t.ex. loopback
 
  neighbor [ip-address] ebgp-multihop 2
 
  neighbor [ip-address] ebgp-multihop 2
 
  neighbor [ip-address] next-hop-self
 
  neighbor [ip-address] next-hop-self
 +
Description
 +
neighbor [ip-address] description peer with SP X
 
MD5
 
MD5
 
  neighbor [ip-address] password cisco  
 
  neighbor [ip-address] password cisco  
Granne
+
Nätverk som ska annonseras
 
  network [ip-address] mask [subnet-mask]
 
  network [ip-address] mask [subnet-mask]
 +
Standard och extended
 +
neighbor [ip-address] send-community both
 
Preference
 
Preference
 
  bgp default local-preference 100
 
  bgp default local-preference 100

Revision as of 14:21, 20 November 2015

Border Gateway Protocol (RFC 4271) är ett path vector routing protokoll. Det kommunicerar på TCP port 179 så routing måste vara på plats, man kan nästan se det som ett L4-protokoll. BGP kan få många vägar till samma destination. Bästa vägen väljs utifrån en algoritm. http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

States

TCP

Idle State

ConnectRetry timer 120 sekunder

Active State

BGP speaker försöker nå peer med TCP

Connect State

TCP session established

BGP

OpenSent State

BGP version, AS number, hold time, BGP ID
Börja skicka keepalives

OpenConfirm State

Response recieved

Established State

Skicka uppdateringar
Neighbor up

Konfiguration

router bgp [ASN]
no auto-summary
router-id [loopback-adress]

Best practice

ip bgp community new-format

iBGP eller eBGP

neighbor [ip-address] remote-as [ASN]

Loopback. When configuring iBGP always use loopbacks (advertised by your IGP) for peering.

neighbor [ip-address] update-source [interface]

eBGP om det ej är directly connected, t.ex. loopback

neighbor [ip-address] ebgp-multihop 2
neighbor [ip-address] next-hop-self

Description

neighbor [ip-address] description peer with SP X

MD5

neighbor [ip-address] password cisco 

Nätverk som ska annonseras

network [ip-address] mask [subnet-mask]

Standard och extended

neighbor [ip-address] send-community both

Preference

bgp default local-preference 100

Synchronization is enabled by default in Cisco IOS Software Release prior to 12.2(8)T.

no synchronization

Timers

tim bg 10 30 20

För att byta från NLRI-format till AFI-format i konfigurationen

bgp upgrade-cli

Dampening

route-map selective_dampening permit 10
set dampening 5 1900 2000 10

5=half-life, 1900=reuse-limit, 2000=suppress-limit, 10 max-suppress-limit

router bgp [ASN]
bgp dampening route-map selective_dampening

Route flap

show ip bgp flap-statistics

Show

show ip bgp summary
show ip bgp neighbor
show ip bgp rib-failure

Reset

clear ip bgp *
clear ip bgp <address> soft