Download Chapter-8 - Keep in Touch with Sanjeev Maharjan

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

RapidIO wikipedia , lookup

Network tap wikipedia , lookup

Net bias wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

AppleTalk wikipedia , lookup

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

Peering wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Spanning Tree Protocol wikipedia , lookup

Deep packet inspection wikipedia , lookup

Computer network wikipedia , lookup

Airborne Networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Zero-configuration networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Internet protocol suite wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Chapter-8
Network Layer in the Internet
IP Protocol: IP V4
 At network layer, internet can be viewed as a
collection of sub-networks or Autonomous
Systems
 Protocol that holds these ASes together is
Internet Protocol
 IP is the host-to-host network layer delivery
protocol for internet
 It is unreliable and connectionless datagram
protocol
 It provides rather best effort service
IP Protocol: IP V4
 Best Effort means that IP provide no errorcontrol or flow control
 IP uses only error detection mechanism and
discards all the corrupted data
 IP does its best to deliver a packet to its
destination, but doesn’t guarantee
 IP depends upon upper layer protocols for the
reliable transmission
 If reliability is important, IP must be paired with
TCP in transport layer
 Analogy example of post-office
IP Protocol: IP V4
 Uses datagram approach in the packetswitching network
 Packets in IP layer are called datagrams
 A datagram is a variable length packet
consisting of two parts:
Header
Data
 Header is 20-60 bytes long and contains
information essential to routing and delivery
 Data contains the data sent by the upper layer
IP Protocol: IP V4
The IPv4 (Internet Protocol) header.
IP Protocol: IP V4
 VER is the field that contains the IP protocol
version. The current version is 4. 5 is an
experimental version. 6 is the version for IPv6.
 HLEN is the length of the IP header in multiples
of 32 bits, without the data field. The minimum
value for a correct header is 5 (i.e., 20 bytes),
the maximum value is 15 (i.e., 60 bytes).
 Service Type: The service type is an indication
of the quality of service requested for this IP
datagram. It contains the following information.
IP Protocol: IP V4
Precedence specifies the nature/priority:
000: Routine
001: Priority
010: Immediate
011: Flash
100: Flash override
101: Critical
110: Internetwork control
111: Network control
IP Protocol: IP V4
 TOS specifies the type of service value:
1000: Minimize delay
0100: Maximize throughput
0010: Maximize reliability
0001: Minimize monetary cost
0000: Normal service
The last bit is reserved for future use.
 Total Length specifies the total length of the
datagram, header and data, in octets.
 Identification is a unique number assigned by
the sender used with fragmentation.
IP Protocol: IP V4
 Flags contains control flags:
The first bit is reserved and must be zero
The second bit is DF (Do not Fragment) 0 means allow
fragmentation;
The third is MF (More Fragments), 0 means that this is
the last fragment
 Fragment Offset is used to reassemble the full
datagram.
The value in this field contains the number of 64-bit
segments (header bytes are not counted) contained in
earlier fragments.
If this is the first (or only) fragment, this field contains a
value of zero.
IP Protocol: IP V4
TTL (Time to Live) specifies the time (in
seconds) the datagram is allowed to
travel. In practice, this is used as a hop
counter to detect routing loops.
Protocol Number indicates the higher level
protocol to which IP should deliver the
data in this datagram.
E.g., ICMP = 1; TCP = 6; UDP = 17.
IP Protocol: IP V4
 Header Checksum is a checksum for the information
contained in the header. If the header checksum does
not match the contents, the datagram is discarded.
 Source/Destination IP Addresses are the 32-bit
source/destination IP addresses.
 IP Options is a variable-length field (there may be zero
or more options) used for control or debugging and
measurement
 Padding is used to ensure that the IP header ends on a
32 bit boundary. The padding is zero.
IP Protocol: IP V4 (IP Fragmentation)
 IP provides fragmentation/reassembly of datagrams. The maximum
length of an IP datagram is 65,535 octets.
 When an IP datagram travels from one host to another, it may pass
through different physical networks.
 Each physical network has a maximum frame size, called maximum
transmission unit (MTU), which limits the datagram length.
 A fragment is treated as a normal IP datagram while being transported
to their destination.
 Thus, fragments of a datagram each have a header.
 If one of the fragments gets lost, the complete datagram is considered
lost.
 It is possible that fragments of the same IP datagram reach the
destination host via multiple routes.
 Finally, Since they may pass through networks with a smaller MTU
than the sender’s one, they are subject to further fragmentation.
IP Protocol: IP V4 (IP Fragmentation)
 When a datagram is fragmented, each fragment
will have their own header with most fields same
but some changed
 Fragmentation can be done by source host or
any router in the path
 Reassembly is done only at the destination host
 Fields in IP header related to fragmentation and
reassembly:
Identification
Flags
Fragmentation Offset
IP Protocol: IP V4 (IP Fragmentation)
 When fragmentation is done Identification field is
copied to all fragments so that all the fragments
can be identified while reassembling at
destination
 When fragmentation is done DF field of Flag
field will be 0 saying, there are fragments which
lets the destination know that the datagram is
not complete one but rather a fragmented one
 Fragmentation field shows the relative position
of fragment with respect to whole datagram
 Offset of data in original datagram measured in
units of 8 bytes
IP Protocol: IP V4 (IP Fragmentation)
 Suppose a datagram has data
of size 4000 bytes and is
fragmented into 3 fragments
 The first fragment carries data
from 0-1399
 The offset would be 0/8=0
 Similarly 2nd fragment carries
data from 1400-2799
 Offset of 2nd fragment would
be 1400/8=175
 Finally 3rd fragment will carry
data from 2800-3999
 Offset of 3rd fragment would be
2800/8=350
 Offset is carried out by dividing
the position of first byte in
fragment by 8
 These offsets are used in
destination to reassemble in
order
IP Protocol: IP V4 (Drawbacks)
 IPv4 has a two-level address structure (network
part and host part) categorized into 5 classes.
The use of address space is inefficient.
 Internet must accommodate real-time audio and
video transmission requiring minimum delay and
reservation of resources which are not provided
in IPv4 design
 Internet must accommodate encryption and
authentication of data for some application.
Originally, no security mechanism was provided
in IPv4.
IP Protocol: (Rise of IPv6)
Presentation required on this topic
Why IPv6 and what are its significance?
Presentation Date: 12th August,09
Other Network Protocols:
ARP (Address Resolution Protocol) &
RARP (Reverse ARP)
ICMP (Internet Control Message Protocol)
DHCP( Dynamic Host Configuration
Protocol)
Presentation on these 3 Protocols
Presentation Date: 12th August,09
Routing Protocols
 Internet is made up of large number of autonomous
systems (AS)
 Autonomous System is a group of networks and routers
under the authority of single administration
 Routing inside an autonomous system is called interior
routing
 Routing between AS is called exterior routing
 Each AS chooses an interior routing protocol to handle
routing inside the AS (Eg: RIP, OSPF)
 Only one exterior routing protocol is usually chosen to
handle the routing between Autonomous Systems (Eg:
BGP)
Interior Gateway Routing Protocol
(OSPF)
 Stands for Open Shortest Path First
 Replaced RIP as Interior Gateway Routing
Protocol Standard in1990
 Many router vendors support OSPF
 Why OSPF over others?
Open Standard
Support variety of metrics
Dynamic
Support Routing based on Type of Service
Support Load balancing
Support hierarchical system
Security
OSPF (Open Shortest Path First)
 Special Routers called Autonomous System
Boundary Routers are responsible for dissipating
information about other autonomous systems into
current system
 For efficient routing, OSPF divides an AS to areas
 An area is a collection of networks, hosts and
routers all contained within an AS
 AS may be divided into many areas
 Routers inside area flood the area with routing
information
 At border of each area, Area Border Routers are
used to summarize about the area and send it to
other areas
OSPF (Open Shortest Path First)
 AS has a special area called backbone area, with which
all other areas should be connected
 Routers inside backbone area are called backbone
routers
 Each area in AS has an identification and area
identification of backbone area is 0.
OSPF (Open Shortest Path First)
Metrics used in OSPF can be based on
type of service
Minimum delay
Maximum throughput
Bandwidth
OSPF (Open Shortest Path First)
Packet Types in OSPF:
Hello
DBD (Database Description)
LSR (Link State Request)
LSU (Link State Update)
LSAck (Link State Acknowledgements)
OSPF (Open Shortest Path First)
 Link Types:
Point-to-Point Link
Transient Link
Stub Link
Virtual Link
OSPF (Open Shortest Path First)
 Link State Advertisements
Router Link
Network Link
Summary Link to Network
Summary Link to AS Boundary Network
External Link
 Administrative Distance: Administrative distance
(AD) is the trustworthiness (or preference) of the
route source.
 OSPF: 110
OSPF (Open Shortest Path First)
BGP (Border Gateway Protocol)
 Protocol used between two Autonomous
Systems
 Different from interior routing protocol because
the goals of both are different
 Interior Routing Protocols are just concerned
with delivering the information from source to
destination efficiently
 Interior Routing Protocols don’t bother about the
politics or policies implemented
 Exterior routing protocols will have to consider
politics and polices while delivering the packets
not just the costs
BGP (Border Gateway Protocol)
 Sometimes secured path is preferred over a
shortest path
 Some corporate AS might want to send their
packet using foreign AS or competitors AS
 Some AS will forward packets from only those
AS which have paid to make that AS their transit
point
 These are the policies and politics which only
Exterior Routing Protocol mainly BGP is
concerned with
 All these policies are configured manually on a
BGP Routers in the network
BGP (Border Gateway Protocol)
 BGP is based on a routing method called Path
Vector Routing
 Path Vector Routing constitutes of table in which
each entry contains the destination network , the
next router and the path to reach the destination
Network
Next Router
Path
N01
R01
AS14, AS23, AS67
N02
R05
AS22, AS67, AS05, AS89
N03
R06
AS67, AS89, AS09, AS34
N04
R12
AS62, AS02, AS09
BGP (Border Gateway Protocol)
 One AS boundary router advertises the
reachability of the networks within their AS to the
neighboring AS boundary routers
 Each router that receives a path vector message
verifies the advertised path is in agreement with
its policy
 If it is, it will update its table and modifies the
message before sending it to next neighbor
 Modification involves adding of AS number to the
path and replacing the next router entry with its
own identification
BGP (Border Gateway Protocol)
BGP (Border Gateway Protocol)
 Loops are prevented in this exterior routing by
checking the AS number in the path
 If own AS is there in path, then it identifies the loop
and ignores the packet
 Types of Packets in BGP:
Open Message (to create neighborhood relationship)
Update Message (to withdraw old advertisements and assign
new routes)
Keep-Alive Message (exchanged between BGP routers to tell
each other that they are alive)
Notification message (sent by router whenever an error
condition is detected or router wants to close the destination)