Please enable JavaScript.
Coggle requires JavaScript to display documents.
BGP( Border Gateway Protocol) - Coggle Diagram
BGP( Border Gateway Protocol)
Các loại BGP message
Update message: update all routes can be reached through it NLRI and Attributes
Notification message: sent when an error
Open Message: TCP connection: port 179
Keepalive message (60s): holdtime = 180s
Operate
Active
Open sent: parameters BGP
Connect: khi đã thiết lập kết nối (bắt tay 3 bước) (TCP port 179)
Opent confirm: agreement on the parameters
Idle: chưa có kết nối
Established
Mức độ ưu tiên attribute
lowest MED(metric)
locally generated route (network or aggregate routes): ưu tiên các tuyến học từ chính nó (next-hop 0.0.0.0) hơn là từ các con Router khác
ORIGIN (ưu tiên i(network) hơn ?(redistribute in BGP))
ưu tiên EBGP(AD=20) hơn IBGP(AD=200)
lowest AS_PATH: As-path prepend
ưu tiên neighbor qua IGP gần nhất
highest LOCAL_PREF: local AS
ưu tiên EBGP lâu đời nhất
highest weight(CISCO): local router
lowest neighbor router ID
lowest neighbor router IP
BGP là giao thức định tuyến ngoại vùng: EGP(exterior gateway protocol)
routing giữa các AS khác nhau: EBGP
routing giữa các router trong cùng AS: IBGP
giao thức định tuyến duy nhất sử dụng TCP protocol 179
là 1 giao thức PATH VECTOR
là giao thức định tuyến policy-based cho phép control tracffic sử dụng multiple BGP attribute
4 loại kết nối redundancy (dư thừa)
dual-homed
multihomed
single-homed
dual-multihomed
4 loại kết nối đường dẫn: circuit emulation, MPLS, static route, BGP
Các loại bảng
BGP table:
chứa multiple path to destination
chứa BGP attributes
list network learned
IP routing table
list of the best path to destination networks
Neighbor table
list of BGP neighbors
Path attributes
Optional(Các hãng chưa chắc biết)
Transitive (transit giữa các AS)
AGGREGATOR
COMMUNITY
Nontransitive (chỉ được transit trong 1 AS)
ORIGINATOR_ID
Clusterlist
MULTI_EXIT_DISC
Well-known(Các hãng đều biết)
Mandatory (bắt buộc)
ORIGIN
NEXT_HOP
AS_PATH
Discretionary (không bắt buộc)
LOCAL_PREF
ATOMIC_AGGREGATE
BGP Synchronization
Enable: learned IBGP routes waits until IGP propagated then advertises to external peers
Disable: learned IBGP routes propagated to an External neighbor
default: disabled
Đăng kí AS với IANA
ARIN (American Registry for Internet Numbers)
LACNIC ( latin American and Caribbean Int Add Regis)
APNIC (Asia Pacific Network Information Numbers)
RIPE (Reseaux IP Europeans)
AfiNIC (Africa)
So sánh EBGP và IBGP
IBGP (AD=200)
cùng AS
không cần kết nối trực tiếp mà kết nối qua IGP (chỉ cần ping được tới nhau) thường sử dụng Loopback
EBGP (AD=20) khác AS
kết nối trực tiếp
Trước khi kết nối BGP phải thiết lập phiên TCP (three-way handshake)
Manipulate
Access-list, prefix list
route-map...[permit | deny] ...
match...
set...
neighbor...route-map....[in | out]
Outgoing routes
filter-lists
prefix-lists
route-map
Incomming traffic
filter-lists
route-map
prefix-lists
Policies changes
Soft reset: remains established
Command: clear ip bgp {* | nneighbor-address| [soft out]
Hard reset: transition established to idle Command: clear ip bgp {* | neighbor-address}
Route refresh:
Loopback
EBGP Dual-homed: static để loopback ping được nhau
Command: neighbor...update-source loopback
Command: neighbor...ebgp-multihop
IBGP: các neighbor chỉ cần ping được đến nhau do đó sử dụng địa chỉ loopback để lên neighbor
Command: neighbor...update-source loopback
IBGP: sử dụng neighbor...next-hop-self