Download bgp header

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Wake-on-LAN wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Network tap wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Net bias wikipedia , lookup

Computer network wikipedia , lookup

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

TCP congestion control wikipedia , lookup

Airborne Networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

Deep packet inspection wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Internet protocol suite wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Peering wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Routing wikipedia , lookup

Transcript
Border Gateway
Protocol (BGP)
•
•
•
•
2
CORE, PEERs
Autonomous Systems
BGP Basic Operations
The BGP Routing Process
Default routes
• Default routes => partial information
• Routers/hosts with default routes rely on other
routers to complete the picture.
• In general routing information should be:
– Consistent, I.e., if packet is sent off in one direction
then another direction should not be more optimal
– Complete, I.e., should be able to reach all destinations
3
Core
• A small set of routers that have consistent &
complete information about all destinations.
• Outlying routers can have partial information
provided they point default routes to the core
– Partial info allows site administrators to make local
routing changes independently.
• Initially, core routers were under a central
authority and were synchronized for consistency
=> single backbone.
• Internet quickly outgrew single backbone
(ARPANET + NSFNET). Core architecture does
not scale well.
4
Peers
• Initially NSFNET had only one connection to
ARPANET (router in Pittsburg) => only one route
between the two.
• Addition of multiple interconnections => multiple
possible routes => need for dynamic routing
decision
• Single core replaced by a network of peer
backbones => more scalable
– Today there are over 30 backbones!
• The routing protocol used by cores & peers was
called Gateway-Gateway Protocol (GGP).
Replaced by EGP and now by BGP-4.
5
Why Exterior Gateway Protocol?
• Interior protocol is limited by—propagation
delay, traffic overhead
• Hidden network
6
Autonomous Systems – definition
• Any set of routers sharing
similar routing policies and
operating within a single
administrative domain.
• Each AS has an identifying
number, assigned by an Internet
registry or a service provider,
between 1 and 65,535.
• 65,512 through 65,535 are
reserved for private use
7
Autonomous Systems-types
• Traffic types: Local = traffic originating or
terminating at AS. Transit = non-local traffic
• AS types:
– Stub AS => only single connection to one other AS =>
it carries only local traffic.
– Multihomed AS: Connected to multiple AS, but does
not allow transit traffic
– Transit AS: carries transit traffic under policy
restrictions
8
Exterior Gateway Protocol (EGP)
• A mechanism that allows non-core routers to learn
routes from core routers so that they can choose
optimal backbone routes
• A mechanism for non-core routers to inform core
routers about hidden networks
• Autonomous System (AS) has the responsibility
of advertising reachability info to other ASs.
– One or more routers may be designated per AS.
– Important that info propagates to core routers
9
EGP weaknesses
• EGP does not interpret the distance metrics in
routing update messages => cannot be compute
shorter of two routes
• As a result it restricts the topology to a (possibly
non-optimal) tree structure, with the core as the
root
– Rapid growth => many networks may be temporarily
unreachable
– Only one path to destination => no load sharing
10
BGP Overview
• BGP is the Internet.
• Without BGP, the Internet could not be as
large as it is.
• BGP is slower than all of the IGPs, but it is
also more scalable
11
BGP - Why use it?
• Scalability
– Internet has more than 110,000 routes and is
still growing
• Secure routing information
– Routers from other Autonomous Systems (AS)
cannot be trusted
– Tight filters (policies) are required
– Authentication is desirable
12
BGP - Why use it? (cont.)
Exterior Routing
•Considerer 3 companies: X, Y AND Z. They have their networks connected
to each other (for whatever reason) – X is connected to Y, and Y is connected
to both, X and Z.
•Company X is running EIGRP on its routers, Y is running RIP and Z is
running OSPF.
•Company Y’s router that connects to X’s network is performing two-way
redistribution between EIGRP and RIP, Y’s router that connects to Z is
performing two-way redistribution between OSPF and RIP.
13
BGP - Why use it? (cont.)
Consider this requirement: Z has decided that they no longer want to communicate
with X (they don’t want to accept routes from X), but they still want to
communicate with Y. How can Z configure the router that connects to Y so that it
will not accept any routes coming from X?
Possible non scalable solution:
Z could put a distribute list on its routers that blocks all of the networks
assigned to X. Problems with this approach?
How does Z know which networks belong to X?
What if X is an ISP with 200+ networks assigned to it?
14
Z would have to write a 200+ line access list to apply to the
distribute list – and what if after Z performs this configuration, X gets
another network assigned to it…..
BGP - Why use it? (cont.)
•With BGP companies X, Y, and Z each have an AS number
assigned to them.
•When Company Z receives a BGP advertisement, each
route is tagged with the AS Path that it traveled through to
reach its destination. So instead we have:
•From there, it is a (relatively) simple matter to configure AS
103 not to accept routes originated from AS 101
•NOTE: because BGP operates based on that path that
packets take, it is sometimes called – a path vector protocol
15
Autonomous Systems – IGP & EGP
• IGP – an Interior Gateway protocol is run
inside an autonomous system
• EGP – an Exterior Gateway protocol is run
between autonomous systems to enable
routing policies and improve security
• BGP is an EGP
16
Autonomous Systems - Single-homed
•Large customer or small ISP
connecting to the Internet
•Can be configured with a
default route to reach outside
networks, in which case BGP
is not required and the
customer is part of the ISP’s
AS.
•If the customer wants to use a
different routing policy than
the provider’s, then BGP is
necessary.
17
Autonomous Systems- Multihomed non-transit
• Transit traffic (any traffic that has a
source and destination outside the AS)
does not pass through it.
• Customers (large corporate) connecting
to several service providers but does
not wish to pass traffic through.
• BGP is almost mandatory for
multihomed customers
• Multihomed customers have to use
public AS numbers
• Routes are filtered based on their AS
Path to prevent the AS from becoming
a transit AS
18
Autonomous Systems - Multihomed transit
• Exchanges BGP routing
information with other
autonomous systems and
forward information
received from one AS to
another AS
• The entire Internet can
use your network as a
transit AS
19
Autonomous Systems - When not to use BGP
• When the routing policy that
is implemented in an AS is
consistent with the ISP's
policy.
– Connectivity can be achieved
through a combination of static
routes and default routes.
• Note: In general, it is
necessary to use BGP to
connect to an ISP only when
you have different policy
requirements than the ISP.
20
BGP Basic Operations
•
BGP makes routing decisions based on network policies and optimal
routes
•
•
•
21
BGP updates are carried using TCP on port 179
Before routing information is exchanged, a TCP 3-way handshake occurs
BGP message types:
--OPEN
--Update
--Notification
--Keep alive
Telnet Server
Telnet
Client
Switch
Orlando
Atlanta
TCP
TCP
Idle
Connect
Open
request
Syn
Sent
Syn
BGP
Idle
Connect
Open
request
Listen
Initializing
Initializing
Syn Ack
Ack
Established
opened
Established
opened
open
Open Sent
Keep Alive
Open Confirm
Established
Update
Open
Open Sent
Keep Alive
Open Confirm
Established
Update
22
Marker
BGP
Type
TCP HEADER
Data
Length
BGP HEADER
Destination
Sequence
Acknowledgement
Port = 179
Number
Number
Flags
Window
No TCP
Checksum
-urgent pointer
Options
-acknowledgement
-push
-no reset
-no Syn
-no fin
Data
Offset
Source Port
Data
IP HEADER
Version
Time to
Live
Header Length
Protocol ID
06 = TCP
Type of Service
Header
Checksum
Source ID
Address
Length
Flag
Flag Offset
Destination Options
Address
Data
DSAP
=06
Preamble SFD
23
DA
LLC PDU
SSAP Control Information
=06
n
IEEE 802.3 HEADER
SA
Length
BGP HEADER
Data
Pad
Chksum
Padding
Version
=4
Autonomous
System
Marker
Hold - Time
Length
BGP
Identifier
Parameter
Length
BGP Type = 1
Open
TCP HEADER
Operational
Parameter
Data
Destination
Sequence
Acknowledgement
Port = 179
Number
Number
Flags
Window
No TCP
Checksum
-urgent pointer
Options
-acknowledgement
-push
-no reset
-no Syn
-no fin
Data
Offset
Source Port
Data
IP HEADER
Version
Time to
Live
Header Length
Protocol ID
06 = TCP
Type of Service
Header
Checksum
Source ID
Address
Length
Flag
Destination Options
Address
Data
DSAP
=06
24
Flag Offset
LLC PDU
SSAP Control Information
=06
n
IEEE 802.3 HEADER
BGP OPEN message format
Padding
Unfeasible
Routers Length
Withdrawn
Routes
Marker
Total Path
Attribute length
Length
Path
Attributes
BGP Type = 2
Network Layer
Reachability Info
Data
TCP HEADER
Destination
Sequence
Acknowledgement
Port = 179
Number
Number
Flags
Window
No TCP
Checksum
-urgent pointer
Options
-acknowledgement
-push
-no reset
-no Syn
-no fin
Data
Offset
Source Port
Data
IP HEADER
Version
Time to
Live
Header Length
Protocol ID
06 = TCP
Type of Service
Header
Checksum
Source ID
Address
Length
Flag
Destination Options
Address
Data
DSAP
=06
25
Flag Offset
LLC PDU
SSAP Control Information
=06
n
IEEE 802.3 HEADER
BGP Update message
Padding
BGP Rule of Split Horizon
• A BGP Router will not accept
a route whose AS path
includes the router’s AS
number
• If a router in AS 100 receives
a route with 100 in its AS
path, then that route, if
accepted, would create a
routing loop.
26
BGP Routing
• A BGP router only
sends routing
updates when there
are changes to the
BGP routing table
27
BGP Keepalives
• Instead of full routing
updates, BGP relies on
keepalive messages to
decide if a peer is up.
28