BGP and ICMP

Download Report

Transcript BGP and ICMP

BGP and ICMP
Exterior Gateway Protocol (EGP)
• Like RIP, but no metrics. Just if reachable. Rtr inside a domain
collects reachability information and informs the rtr on the
boarder of the domain. Boarder rtr informs the internal rtr
about reachability outside the domain.
• Rtrs establish com with pkts: nbr acquisition request, nbr
acquisition reply or refusal, nbr cease request, nbr cease ack.
• Theoretically only legal topology (but tree would work):
backbone
Exterior Gateway Protocol (EGP)
Domain 1
Core
R1
5*
R2
R3
R6
R5
R4
Domain 2
Topologija u kojoj EGP ne funkcioniše
Border Gateway Protocol (BGP)
• Different autonomous systems exchange
routing information using BGP.
• BGP messages are exchanged between AS
border routers.
• The protocol for exchanging messages
between border routers of the same AS is
Internal BGP (IBGP), and the protocol for
exchanging messages between border routers
of different AS is external BGP (EBGP).
Border Gateway Protocol (BGP)
• BGP neighbors are configured. They exchange
the control information through TCP
connections.
• BGP is a distance vector protocol that is path
based, i.e. for each network a sequence of AS
to that network is advertised (path) to avoid
loops.
BGP
ASBR
ASBR
A
S IBGP
B
E
ASBR
ASBR
ASBR
ASBR
EBGP
BGP Packets
• Between any two BGP routers a reliable TCP
connection is established.
• Open establish com between rtrs of different
AS;
• Update carries routing info;
• Notification last message before a connection
is closed. It reports an error;
• Keepalive to inform about presence of nbr.
BGP Packet Header
• Keepalive packet equals the BGP packet
header
16B
Authentication
2B
1B
Variable
Length
Type
Data
Packet type
BGP Packet Open
1B
Vers
2B
AS
Max time during
which rtr does not
receive packet before
concluding a problem.
2B
Hold-Time
4B
BGP ID
IP address of
a rtr sender
1B
Optional
Parameters
Length
4B
Optional
Parameters
BGP Packet Update
2B
Unfeasible
Routes Lngth
Variable
2B
Withdrawn
Total Path
Routes
Attribute Lngth
Charasteristics of a path
being advertised
Variable
Path
Attributes
Variable
Network Layer
Reachability
List of prefixes being
advertised
Kinds of Path Attributes
• Well known vs. optional. Well known must be
recognized and understood.
• Mandatory vs. discretionary. A mandatory must
appear in the description of a route.
• Partial has been passed along if a router does not
recognize it.
• Transitive vs. nontransitive. A transitive attribute is
passed along by the router that does not recognize it
and marked as partial. Non-transitive is not passed.
Path Attributes
• Origin. Values: IGP, EGP, Incomplete. It is
well-known mandatory attribute.
• AS Path. Sequence of AS numbers which are
along the path to the destination. Well-known
and mandatory.
• Next Hop. The rtr to which a packet should be
next forwarded toward the destination. Wellknown and mandatory.
• Unreachable. Well known and discretionary.
Path Attributes
• Multi Exit Disc. Degree of preference that is received
from AS nbr. Optional nontransitive.
• Local Preference. Degree of preference given to
different routes within AS. Well-known
discretionary.
• Atomic Aggregate. Denotes if some address is a result
of the aggregation.Well-known discretionary.
• Aggregator. AS number and the router IP address that
did the aggregation. Optional and transitive.
BGP Packet Notification
1B
Error Code
1B
Error Subcode
Variable
Error Data
Error Codes
• Message Header Error: Indicates a problem with a message header,
such as unacceptable message length, unacceptable marker field value,
or unacceptable message type.
• Open Message Error: Indicates a problem with an open message, such
as unsupported version number, unacceptable autonomous system
number or IP address, or unsupported authentication code.
• Update Message Error: Indicates a problem with an update message,
such as a malformed attribute list, attribute list error, or invalid nexthop attribute.
• Hold Time Expired: Indicates that the hold-time has expired, after
which time a BGP node will be considered nonfunctional.
• Finite State Machine Error: Indicates an unexpected event.
• Cease: Closes a BGP connection at the request of a BGP device in the
absence of any fatal errors.
IBGP
• In order to avoid loop in AS, ASBR are connected in
a full mesh.
• Alternatively, in each region there is a designated
router which is a Route Reflector (RR). RRs are
connected in a full mesh, and they receive updates
from each rtr of the region and forward those to other
routers.
• Or, AS is divided into confederations in which
ASBRs are connected into full meshes. Each
confederation has its own ID, and the path of
confederations are added into the BGP packets.
Policy Based Routing in BGP
• Filters for receiving or advertising or
forwarding info for certain prefixes can be
implemented.
• Examples: Only prefixes that originate in
certain AS can be accepted, or ads through
certain AS cannot be accepted, or would not be
forwarded etc.
• Policy based routing may cause instabilities in
the network.
Internet Control Message Protocol
Internet Control Message Protocol
• Commands Ping and Traceroute are based on
ICMP messages.
• Ping determines if certain IP address is
reachable, and what is RTT to it.
• Traceroute determines all routers on the way
between two IP addresses.