(TLCN) BGP

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 36

TM HIU V GIAO THC NH TUYN

BORDER GATEWAY PROTOCOL

GVHD:
Th.S Hunh Nguyn Chnh SVTH: Dng Cao i Ngha Hong nh ng 08110197 08110221

NI DUNG
I. KHI NIM II. HOT NG CA BGP
III. CU HNH BGP

IV. BGP NNG CAO


V. DEMO

NI DUNG
I. KHI NIM
II. HOT NG CA BGP
III. CU HNH BGP

IV. BGP NNG CAO


V. DEMO

I. KHI NIM Border Gateway Protocol (BGP): l mt giao thc


nh tuyn lin min c s dng trao i thng tin trn Internet. S dng cng 179 v giao thc TCP Chia 2 dng:
iBGP eBGP

I. KHI NIM KHI NIM LIN QUAN


Autonomous System BGP Speaker Peer eBGP iBGP Inter-AS Rooting Intra-AS Routing

NI DUNG
I. KHI NIM II. HOT NG CA BGP
III. CU HNH BGP

IV. BGP NNG CAO


V. DEMO

II. Hot ng ca BGP


Open Message
Octets 16 2 1 1 2 2 4 1 Variable

Marker

Length

Type

Version

AS

Hold Time

BGP ID

Optional Length

Optional

Update Message
Octets
16 2 1 2 Variable 2 Variable Variable

Marker

Length

Type

Unfeasible Routes length

Withdrawn Routes

Attribute Length

Attributes

NLRI

Notification Message
Octets 16 2 1 1 1 Variable

Marker

Length

Type

Error Code

Error Sub-code

Diagnostic Data

Keepalive Message
Octets 16 2 1

Marker

Length

Type

II.1. HEADER
Open Message
Octets 16 2 1 1 2 2 4 1 Variable

Marker

Length

Type

Version

AS

Hold Time

BGP ID

Optional Length

Optional

Update Message
Octets
16 2 1 2 Variable 2 Variable Variable

Marker

Length

Type

Unfeasible Routes length

Withdrawn Routes

Attribute Length

Attributes

NLRI

Notification Message
Octets 16 2 1 1 1 Variable

Marker

Length

Type

Error Code

Error Sub-code

Diagnostic Data

Keepalive Message
Octets 16 2 1

Marker

Length

Type

II.2. OPEN Message Cu trc:


16 2 1 1 2 2 4 1 Variable

Marker

Length

Type

Version

AS

Hold Time

BGP ID

Optional Length

Optional

Type

Length

Value

II.3. UPDATE Message Cu trc:


16 Marker 2 Length 1 Type 2 Unfeasible Route Length Variable Withdraw Routes 2 Total Path Attributes Length Variable Attributes Variable Network Layer Reachability Infomation

10

II.3. UPDATE Message Attribute

11

II.3. UPDATE Message Network Layer Reachability Information (NLRI)


IP Address Subnet Mask
10.1.1.0 255.255.255.0 192.24.160.0 255.255.224.0

NLRI (Length,prefix)
24, 10.1.1.0 19, 192.24.160.0

13

II.4. KEEPALIVE Message Cu trc


16 Marker 2 Length 1 Type

14

II.5. NOTIFICATION Message Cu trc


16 2 1 1 1 Variable

Marker

Length

Type

Error Code

Error Sub-code

Diagnostic Data

15

II.6 NEIGHBOR NEGOTIATION

18

II.7 ROUTE SELECTION Route in BGP

19

II.7 ROUTE SELECTION Loi b tuyn ng nu next-hop khng ng. Weight cao hn. Local-preference cao hn. u tin cc route to bi router ang xt. AS-path ngn hn ( so snh chiu di). Origin nh hn ( IGP<EGP<unknown).

20

II.7 ROUTE SELECTION MED nh hn. u tin route hc t eBGP hn iBGP. u tin route i n BGP next-hop c IGP nh nht.

u tin route c qung b vi router ID nh nht.

21

II.7 ROUTE SELECTION Route Filter


Bao gm: Ingress Filtering. Egress Filtering. K thut: Route map. Distribute list. Prefix list.

22

II.7 ROUTE SELECTION Route map


Dng qun l c ch chn route. Gm cc command match v set. Cu hnh:
R(config)#route-map [name] {permit|deny} [sequence-number] R(config)#neighbor [peer-address] route-map [name] [in|out]

V d:
R2(config)#route-map FILTER1 deny 10 R2(config-route-map)#match ip address 1 R2(config-router)#neighbor 3.3.3.3 route-map FILTER1 out
23

II.7 ROUTE SELECTION Distribute List


Filter da vo ACL Cu hnh:
neighbor [peer-address] distribute-list [access-list-number] [in|out]

V d:
R2(config)#access-list 1 deny 192.168.24.0 0.0.0.255 R2(config)#access-list 1 permit any R2(config)#router bgp 200 R2(config-router)#neighbor 3.3.3.3 distribute-list 1 out

24

II.7 ROUTE SELECTION Prefix List


Xut hin IOS 12. C th kt hp vi route map. Cu hnh:
Ip prefix-list [name] [seq seq-value] {permit | deny} network/subnet mask [ge ge-value] [le le-value] neighbor peer-address prefix-list [name] {in | out}

V d:
ip prefix-list name deny 0.0.0.0/0 le 32

25

NI DUNG
I. KHI NIM II. HOT NG CA BGP
III. CU HNH BGP

IV. BGP NNG CAO


V. DEMO

26

III. CU HNH BGP


Enable BGP trn thit b
Router(config)#router bgp <AS-Number>

Add cc Router to Peers Relationship


Router(config)#neighbor <address> remote-as <AS-Number>

Cu hnh eBGP v iBGP


Router(config)#neighbor <address> update-source <interface>

27

III. CU HNH BGP


eBGP Multihop
Router(config)#neighbor <address> ebgp-multihop [ttl]

Injecting Route
Router(config)#network <address> mask <SubnetMask>

Thm s lng ln route


Router(config)#redistribute protocol process-id

Qung b route ca 1 BGP Speaker khng chy IGP


Router(config)#redistribute connected

28

NI DUNG
I. KHI NIM II. HOT NG CA BGP
III. CU HNH BGP

IV. BGP NNG CAO


V. DEMO

29

IV. BGP NNG CAO Route Reflector

30

IV. BGP NNG CAO Route Reflector:


Nhc im: To ra im cht ti reflector. Cu hnh cho Reflector:
neighbor [peer-address] route-reflector-client

Nu trong AS c nhiu reflector:


bgp cluster-id [cluster-ID]

31

IV. BGP NNG CAO Confederation:

32

IV. BGP NNG CAO Confederation:


Chia AS ln thnh cc AS con d dng full mesh. AS con s dng private AS(64512 n 65534). Cu hnh:
router bgp <mini-AS Number> bgp confederation identifier <confederation-ID>. bgp confederation peers <AS-number>

33

IV. BGP NNG CAO Community:


L mt nhm cc a ch c cng thuc tnh. Cc community ph bin:
NO_EXPORT. NO_ADVERTISE. LOCAL_AS. INTERNET.

Cu hnh:
R2(config)#route-map COMMUNITY1 permit 10 R2(config-route-map)#match ip address 1 R2(config-route-map)#set community 200

34

IV. BGP NNG CAO Community


Qung b community ti peers:
neighbor [peer-address] send-community

To community list xt filter(dng route map):


ip community-list [number] {permit|deny} [community-number]

Cn li ch vic dng route map: match community [number].

35

IV. BGP NNG CAO Next hop


neighbor [peer-address] next-hop-self

36

IV. BGP NNG CAO Route Aggregation


Route aggregation hay summarization l tin trnh qung b 1 route thay v nhiu route. N gip gim bt route trong bng nh tuyn. Cu hnh:
no auto-summary aggregate-address [address mask] aggregate-address address mask summary-only

37

LOGO

LOGO

39

You might also like