You are on page 1of 19

BGP

AS BGP Router(config)#router bgp


<AS >
Router(config-router)#neighbor < IP >
remote-as < AS >
BGP Router(config-
router)#network < > [mask < >]
mask < >
Show
BGP Router#show running-config | section bgp
BGP Router#show ip bgp summary
BGP Router#show ip route bgp
BGP Router#show ip
bgp

>
*
r BGP
BGP
i IBGP
s / BGP

BGP
BGP EGP
EGP
BGP EGP EGP VLSM

BGP
BGP

BGP BGPv4 BGPv4+


BGPv4 IPv4 BGPv4+ AFI

BGPv4+ TLV
AFI
Cisco IPv4 AFI BGPv4+
IPv4 AFI
BGPv4+ Router(config-router)#no bgp default ipv4-
unicast
IPv4 AFI BGPv4+ BGP
address-family <AFI> AFI

BGP TCP 179


BGP TCP
TCP BGP /

BGP
AS
Internet
AS AS AS AS
BGP

Internet

BGP

AS

AS
Internet AS
AS
16 0 65535
AS 32 0 4294967295

0
1 64511 AS IANA IP

64512 65535 AS
AS AS
BGP AS Internet IPv4
15
AS IGP
AS
IGP
IGP IS-IS
IGP OSPF 3

BGP
IGP BGP AS
IGP

BGP AS AS

AS BGP

BGP Peer
BGP BGP Speaker

BGP
BGP
BGP BGP
BGP
network
IGP BGP

redistribute IGP /
BGP
aggregate-address BGP
/
BGP MED

BGP ECMP

BGP
Open

Keepalive

60s 180s Hold Time


Down
Update
/
TLV
BGP

Notification
AS
/ Down
IGP Hello
BGP
BGP

BGP Idle -> Connect -> Active -> Open Sent ->
Open Confirm -> Established
BGP
Idle
TCP Connect
Open Open Sent
Active
Connect
Keepalive Open Confirm
Notification
Down Idle
Keepalive Established
Cisco
BGP
BGP TCP

BGP IP
BGP IP neighbor
IP
BGP IP
IP
IBGP
BGP IP IP
Router(config-router)#neighbor < IP> update-source
< >
Router(config-router)#neighbor < IP>
shutdown

BGP ID
ID Router(config-router)#bgp router-id <
ID>

EBGP IBGP
EBGP
AS
AS IGP

EBGP BGP TTL 1


EBGP
EBGP
Router(config-router)#neighbor < IP>
ebgp-multihop [TTL ]
TTL 255
IBGP
AS
EBGP AS

TTL 255
IGP

Down

AS IBGP

CPU

Router(config-router)#neighbor
< > peer-group
Router(config-
router)#neighbor < IP> peer-group <
>

TCP Router(config-router)#bgp
listen range <IP > peer-group <
>
AS
Router(config-router)#neighbor <
> remote-as < AS >
BGP

Router#show ip bgp neighbors


BGP
EIGRP

BGP
Router#show ip bgp < > mask < >

BGP
Router#show ip bgp
neighbors < IP> advertised-routes
Router#show ip bgp
neighbors < IP> received
Router(config-
router)#neighbor < IP> soft-reconfiguration
inbound

BGP

network BGP

BGP 0.0.0.0
network BGP
BGP

BGP 0.0.0.0
EBGP IBGP

BGP 0.0.0.0 EBGP


BGP 0.0.0.0 IBGP

next-hop-self

IBGP
IBGP
EBGP BGP EBGP
IBGP
IBGP EBGP IBGP

EBGP
EBGP AS Path
AS AS AS Path
AS
AS Path AS
Router(config-router)#neighbor <
IP > allowas-in [ ]
[ ] AS AS Path

prefix-list
prefix-list
Router(config-router)#neighbor < IP> prefix-list <
> in|out

BGP
BGP

|--|<--> R1 <--> R2 <--> R3 <-->|--|


R1 R2 R3 OSPF R1 R3 BGP
R1 R3 IBGP
R3 R1 R3 BGP
OSPF R2 R2
R1 OSPF
R1 R1
R3

BGP Full-Mesh
BGP
BGP IGP
IGP BGP

DMVPN GRE

IP
MPLS

IBGP BGP
BGP IBGP IGP

IGP
BGP
BGP Router(config-
router)#no synchronization

Cisco BGP

BGP Down
BGP
BGP

Router#clear ip bgp * soft [in|out]


in BGP
out BGP
in out BGP
BGP
Router#clear ip bgp *

BGP
AS MA ICMP

BGP /

network BGP BGP

network

BGP 0.0.0.0
MED 0
Router(config-
router)#no auto-summary
/
/ BGP /

/ Router(config-router)#aggregate-
address < > < > [summary-only]
BGP /
summary-only
/ BGP 0.0.0.0
MED 0
suppress-
map <route-map > route-map
permit
/ AS Path
as-set
/ /
AS AS Path /

AS AS Path
AS show AS

/ Atomic Aggregate
Aggregator /
/ 30s
Router(config-router)#bgp
aggregate-timer 0
/ Null 0
/ network BGP
/

BGP
MED 0

BGP Router(config-
router)#default-information originate
BGP
MED
BGP Router(config-
router)#neighbor < IP> default-originate

BGP IGP EBGP


IBGP IGP
Router(config-router)#bgp redistribute-internal

BGP
BGP
BGP
AS Path AS
Next Hop
Origin
BGP
Local Preference
Atomic Aggregate
...

Community
Aggregator
...

MED
Cisco Metric
...
BGP route-map route-map
BGP
route-map
permit
route-map
Router(config-router)#neighbor < IP> route-map <route-
map > in|out

BGP
BGP
1. Weight
Weight Cisco
Weight
Weight 0 65535
BGP Weight 0
BGP Weight 32768
BGP Weight
Router(config-router)#neighbor < IP> weight
< >
route-map Router(config-route-map)#set
weight < >
2. Local Preference
IBGP Local
Preference EBGP Local
Preference
Local Preference 0 4294967295
Local Preference 100
Local Preference Router(config-
router)#bgp default local-preference < >
Local Preference AS
EBGP Local Preference

route-map Router(config-route-map)#set local-


preference < >
3. Next Hop 0.0.0.0

4. AS Path AS
EBGP AS Path
AS
AS Path AS AS

AS Path
AS AS
AS AS
AS Path AS
AS
AS
route-map AS Path AS
Router(config-route-map)#set as-path prepend <AS
> <AS > ...
AS Path ACL
AS Path
AS Path ACL ACL
Router(config)#ip as-path access-list <AS
Path ACL > permit|deny < >
AS Path ACL Router(config-
router)#neighbor < IP > filter-list <AS
Path ACL > in|out
AS AS EBGP AS
AS Path BGP
AS Path AS AS
Router(config-router)#neighbor < IP
> as-override
5. Origin IGP i > EGP e >
Incomplete ?

IGP network aggregate-address

EGP EGP

Incomplete /
route-map Router(config-route-map)#set
origin igp|incomplete|egp <EGP AS >
6. MED
AS AS
AS MED AS
MED AS AS Path
MED Router(config-
router)#bgp always-compare-med
MED 0 MED AS
MED AS
EBGP MED
MED Router(config-
router)#bgp bestpath med missing-as-worst
network BGP
MED
MED 0 4294967295
Cisco MED BGP
route-map Router(config-route-map)#set metric
< >
7. EBGP
7
8. BGP IGP
9. 8

Router(config-router)#maximum-
secondary-paths [eibgp|ibgp] < >
eibgp ibgp EBGP
ibgp
IBGP
eibgp

Router(config-router)#bgp additional-paths select


best < > % < >

Router(config-router)#neighbor <
IP> additional-paths send %

Router(config-router)#neighbor < IP> advertise


additional-paths best < > %
< >
8

Router(config-router)#neighbor <
IP> additional-paths receive %

Router(config-router)#bgp additional-paths select


best < > % < >

10. Uptime
11. ID
12. Cluster List Cluster List Cluster ID
Cluster List
13. IP
BGP

RR
IBGP
RR AS EBGP
Full-Mesh
IBGP EBGP
RR IBGP RR

EBGP RR IBGP RR
EBGP IBGP

IBGP IBGP

IBGP IBGP

IBGP
Router(config-router)#neighbor < IP>
route-reflector-client
RR
RR
RR RR IBGP RR
EBGP IBGP
RR RR
RR EBGP
RR
Cluster List
AS Path
RR IBGP
RR IBGP RR
Cluster ID Cluster List
RR Cluster ID
Cluster ID ID
Cluster ID Router(config-
router)#bgp cluster-id <Cluster ID>
RR Cluster ID

Originator ID ID
RR IBGP BGP

RR Originator ID BGP
Originator ID ID
Originator ID Originator ID

BGP RR RR

Confederation
AS AS AS
IBGP
AS EBGP
AS
EBGP AS
AS
EBGP ASBR
RR BGP

BGP AS AS

BGP bgp confederation identifier <AS


> AS
BGP AS
AS
ASBR AS bgp
confederation peers <AS > AS
AS
Community

IGP tag
32

xx:yy
xx yy 16
Router(config)#ip bgp-
community new-format
route-map Router(config-route-map)#set
community < >

no-advertise
no-export EBGP
EBGP
local-as EBGP EBGP

MPLS VPN RT

Router(config-
router)#neighbor < IP> send-
community both|extended|standard
both extended
standard
community-list route-map

BGP
MD5 HMAC
Router(config-
router)#neighbor < IP> password < >
BGP AS
BGP AS
BGP AS
AS
Router(config-router)#neighbor < IP >
local-as < AS >

BGP
Router(config-router)#bgp additional-paths select
backup %
Router(config-router)#neighbor < IP> advertise
diverse-path backup %

BGP4+ IPv4 IPv6 AFI IPv6


route-map IPv6
IPv4 IPv6 AFI
Router(config-router)#neighbor < IPv4 > remote-
as < AS > % IPv4 BGP
Router(config-router)#address-family ipv6 unicast %
IPv6 AFI
Router(config-router-af)#neighbor < IPv4
> activate % IPv4 BGP
Router(config)#route-map <route-map > %
route-map
Router(config-route-map)#set ipv6 next-hop <IPv6 >
% IPv6
Router(config-router-af)#neighbor < IPv4
> route-map <route-map > out % IPv4 BGP
route-map

BGP4+ IPv4 IPv4 TCP IPv6


IPv6 TCP

You might also like