8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 1/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 1
3/2/2011 1
INTERNETWORKINGINTERNETWORKING
3/2/2011 2
AN INTERNET
3/2/2011 3
PRINCIPLES OF INTERNETWORKING
REQUIREMENTS ON INTERNETWORKING FACILITY:
• Provide a link between networks.
• Provide for the routing and delivery of data between
processes on different networks
• Provide an accounting service that keeps track of the use
of the various networks and gateways and maintains
status information.
• Internetworking facility must accommodate a number of
differences among networks.
3/2/2011 4
DIFFERENCES AMONG NETWORKS
• Different addressing schemes
• Different maximum packet size
• Different network access mechanisms
• Different timeouts
• Error recovery
• Status reporting
• Routing techniques
• User access control
• Connection, connectionless.
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 2/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 2
3/2/2011 5
Different Approaches
• END-TO-END APPROACH
– The end-to-end approach
assumes only that all networksoffer at least an unreliable
datagram service. Hence
necessary care should be taken
to deliver the packet till the
system level.
• NETWORK-BY-NETWORK
APPROACH– In the network-by-network
approach, the technique is toprovide reliable service withineach network and then to merge
together individual network
connections across multiple
networks.
Network layer at the source, router, and destination
3/2/2011 6
Network layer at the source
3/2/2011 7
Network layer at a router
– Network layer at the switch or router is
responsible for routing the packet.
3/2/2011 8
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 3/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 3
Network layer at the destination
3/2/2011 9
• Implemented in two ways– Using Bridges
– Using Internet Protocol(IP)
3/2/2011 10
3/2/2011 11
THE BRIDGE
• Why Bridges ?
– Bridges are simplified gateway used to connect homogenous
networks. Such networks exhibit the same interface to attached
stations and use the same internal protocols.
– Bridges can be used to connect two or more LAN segments of the
same type (e.g. Ethernet to Ethernet, or Token-Ring to Token-
Ring).• Bridges Vs Repeaters
– Example is the “repeater” used in base band networks. However,
this is not a true multiple network system. The repeater is merely
used to extend the length of the base band cable. I t amplifies and
retransmits all signals, including collisions. Thus the system
behaves like a single network. Moreover each port on a bridge has
its own MAC address which is not the case of a repeater
• When bridges are powered on in an Ethernet network, they start tolearn the network's topology by analysing the source addresses of incoming frames from all attached network segments (a processcalled backward learning ). Over a period of time, they build up arouting table .– Unless the source and the destination are on different network segments,
there is no need for the bridge to transfer an incoming frame to another network segment. If the source and the destination are on differentsegments, the bridge needs to be able to determine which segment thedestination device belongs to.
– The bridge monitors all traffic on the segments it connects, and checks thesource and destination address of each frame against its routing table. Whenthe bridge first becomes operational, the routing table is blank, but as data istransmitted back and forth, the bridge adds the source MAC address of any incoming frame to the routing table and associates the address with the port on which the frame arrives. In this way, the bridge quickly builds up acomplete picture of the network topology. If the bridge does not know thedestination segment for an incoming frame, it will forward the frame to all attached segments except the segment on which the frame was transmitted.Bridges reduce the amount of traffic on individual segments by acting as afilter, isolating intra-segment traffic. This can greatly improve response times.
3/2/2011 12
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 4/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 4
• Learning of Bridges…
3/2/2011 13
• Because Ethernet bridges determine whether or not toforward frames on the basis of the desination MACaddress, they are said to operate at the data link layer of
the OSI Reference Model. Etherenet bridges are
sometimes referred to as transparent , because their
presence and operation are transparent to network users,
although they successfully isolate intrasegment traffic,
reducing network traffic overall and improving networkresponse times.
3/2/2011 14
3/2/2011 15 3/2/2011 16
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 5/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 5
3/2/2011 17
Other facts about bridges are :
– The bridge makes no modifications to the content or format of
the frames it receives and encapsulate with an additional
header.
– The bridge should contain enough buffer space to meet peak
demands.
– The bridge must contain addressing and routing intelligence.
– A bridge may connect more than two networks
• Reason for using bridges :
– Reliability
– Performance
– Security
– Convenience
– Geographic coverage
3/2/2011 18
INTERNET PROTOCOL (IP)
Operation of an IP in Internet :
IP provides a connectionless datagram service
between stations.
Advantages of IP are :
– Since connectionless internet facility is flexible, it can deal
with a variety of networks.
– A connectionless internet service can be made highly robust.
3/2/2011 19 3/2/2011 20
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 6/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 6
3/2/2011 21
• Exchange between A on LAN1 and B on LAN2.
• The data to be sent by A are encapsulated in a datagramwith an IP header specifying a global network address(station B)
• This datagram is then encapsulated with the LAN 1protocol and sent to a gateway that strips off the LAN1header.
• The datagram is then encapsulated with the X.25protocol and transmitted across the network to a
gateway.• The gateway strips off the X.25 fields and recovers the
datagram, which is then wrapped in LAN2 headers andsent to B.
• If a connection oriented service is required, A & B shouldshare a common layer 4 protocol.
3/2/2011 22
Sequence of events…
• IP module in the sending station constructs the data gram
with global network address and recognizes that the
destination is on another network. The IP module appends a
header that contains the address of the gateway.
• The gateway unwraps the packet to recover the original
datagram. The gateway analyzes the IP header to determine
whether this datagram contains control information intended
for the gateway or data intended for a station in another network.
3/2/2011 23
• In the latter instance, the gateway must make a routing
decision. There are four possibilities :
– The destination station is attached directly to one of the networks to
which the gateway is attached. This is referred as “directly
connected”.
– The destination station is on a network that has a gateway that
directly connects to this gateway. This is known as a “neighbor
gateway”
– To reach the destination station, more than one additional gateway
must be traversed. This is known as a “multiple-hop” situation.
– The gateway does not know the destination address.
Contd…
3/2/2011 24
• All stations labeled S0 are directly connected to gateway G1- directly connected
• G2 is a neighbor gateway of G1. All stations labeled as S1 are one “hop” from G1
• All stations labeled S2 are “multiple-hop”
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 7/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 7
3/2/2011 25
• In case 4, the gateway returns an error message to thesource of the datagram.
• For case 1 to 3, the gateway must select appropriate route
for the data, and insert them into the appropriate network
with the appropriate address.
• For case 1, the address is the destination address.
• For case 2 and 3, the address is a gateway address
3/2/2011 26
• Before actually sending data, the gateway must need tosegment the datagram to accommodate a smaller packetsize limitation on the outgoing network.
• Each segment becomes an independent IP datagram.
• The gateway then queues each packet for transmission. Itmay also enforce a maximum queue length. Once that limitis reached, additional datagrams are simply dropped.
• The process described above continues through zero or more gateways until the datagram reaches the destinationstation.
• The destination station recovers the IP datagram from itsnetwork wrapping.
• If segmentation has occurred, the IP module in thedestination station buffers the incoming data until theoriginal data field is reassembled.
IPv4 FRAME FORMAT
3/2/2011 27 3/2/2011 28
• Protocol format includes
– Version (4-bits):
• The current protocol version is 6.
• Including a version number allows a future version of IP be
used along side the current version, facilitating migration to
new protocols.
– Internet header length (4-bits):
• Length of the datagram header (excluding data) in 32-bitwords.
• The minimum length is 5 words = 20 bytes, but can be up to
15 words if options are used.
• In practice, the length field is used to locate the start of the
data portion of the datagram
– Service
• This is an 8-bit field.
• Previously it was called as “SERVICE TYPE”, now it is called
“DIFFERENTIATED SERVICES”
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 8/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 8
3/2/2011 29
• Type of service(8-bits):Precedence (3-bits): A priority indication, where 0 is the lowest andmeans normal service, while 7 is highest and is intended for networkcontrolmessages (e.g., routing,congestioncontrol).
Delay (1-bit): An Application can request low delay service (e.g., for interactive use).
Throughput(1-bit): Applicationrequests high throughput.
Reliability (1-bit):Applicationrequests high reliability
Cost (1-bit) : Applicationrequests cost minimization.
Last three TOS bits will generally be mutually
exclusive. Does setting the low-delay bit
guarantee getting such service?
No. The type-of-service field is meant as
a request or hint to the routing algorithms, but
does not guarantee that your request can be
honored (e.g., there may not be a low-delay
path available).3/2/2011 30
3/2/2011 31
– Differentiated services
• In this interpretation, the first 6 bits make up the “codepoint” subfield
and the last two bits are not used. “Codepoint” subfield can be usedin two different ways.
– When the 3 right-most bits are 0s, the 3 left-most bits are interpreted the
same as the precedence bits in the service type interpretation.
– When the 3 right-most bits are not all 0s, the 6 bits define 64 services
based on the priority assignment by the Internet or local authorities
according to the following table
– The first category (numbered 0,2,4,…62 )contain 32 service types
assigned by Internet authorities. The second category (3,7,11,15,….63)
contain 16 services used by local authorities. Finally the third category
(1,5,9,…61) contain 16 services and also are temporary. They can be
used for experimental purposes.
3/2/2011 32
– Total length (16-bits):• Total length of the IP
datagram (in bytes),
including data and header.
The size of the data portion
of the datagram is the total
length minus the size of the
header.
– Identification(16-bits),Flags(3-bits),Fragmentoffset (13-bits):
• These three fields are usedfor fragmentation andreassembly.
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 9/15
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 10/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 10
– Time to live (8 bits) :• A counter that is decremented by each gateway.
• Shouldthis hopcount reach 0, discard the datagram.
• Originally, the time-to-live field was intended to reflect real time.
• In practice, it is now a hopcount.
• The time-to-livefield squashes looping packets.
• It also guarantees that packets don't stay in the network for longer than 255 seconds, a property needed by higher layer protocols that reuse sequencenumbers.
– Protocol(8 bits):
• What type of data the IP datagramcarries (e.g., TCP, UDP, etc.).
• Needed by the receiving IP to know the higher level service that
will next handle the data.– Header checksum (16 bits) :
• Frame check sequence on the header only
3/2/2011 37
– Source address (32 bits) :• Coded to allow a variable allocation of bits to specify the network
and the station within the specified network
– Destination address (32 bits) :
• As above
– Options
IP datagrams allow the inclusion of optional, varying length fields that
need not appear in every datagram. We may sometimes want to
send special information, but we don't want to dedicate a field in the
packet header for this purpose.
Options start with a 1-byte option code, followed by zero or morebytes of option data.
3/2/2011 38
The option code byte contains three parts:
copy flag (1 bit): If 1, replicate option in each fragment of a fragmenteddatagram. That is, this option should appear in every fragment as well. If 0, optionneed only appear in first fragment.
optionclass (2 bits): Purpose of option:
0 = network control1 = reserved
2 = debuggingand measurement
3 = reserved
optionnumber(5 bits): A code indicating the option's type.
3/2/2011 39
– Padding
• Used to ensure that the internet header ends on a 32 bit
boundary
– Data
• The field must be a multiple of eight bits in length. Total length of
the data field plus header is a maximum of 65,535 octets
3/2/2011 40
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 11/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 11
3/2/2011 41 3/2/2011 42
3/2/2011 43
DESIGN ISSUES
• Addressing
• Routing
• Segmentation and reassembly
• Datagram lifetime
•
Error control• Flow control
3/2/2011 44
ADDRESSING
• Essentials :
– Name : what an object is
– address : where it is
– routes : how to get there
• In a single network distinction exists as
process/application, station and path to reach it.
• In internet, the distinction is not clear. Here to transfer
data through gateway, two entities must be identified :
the destination network and destination station.
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 12/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 12
3/2/2011 45
• The network address required by gateway can bespecified by several ways.– The application can refer to a network by a unique number
– The internet logic in the station can translate a network nameinto a network address.
– A global station addressing scheme can be used. ie. Uniqueidentifier for each station.
• The third approach was proposed by Ethernetdevelopers. It recommends a 48 bit address which canbe used for 1014 unique referents– Advantage : it permits stations to move from one network to
another.
– Disadvantage : some central facility must manage theassignment of names
3/2/2011 46
•
So gate way will receive an internet packet with areferent in the form net.stationnet.station where net is the networkaddress and station is the address of the individualsystem.– Since each station has different processes running, identifying
the process becomes difficult
• So net.station.SAP net.station.SAP could solve this problem. Thismakes the internet protocol as process to processrather than station to station.– It is the responsibility of the internet layer to multiplex and de-
multiplex between various SAPs. This simplify the higher
layer’s task. This allows the usage of microprocessor hardwaredevices.
• However one or more directory servers are needed toidentify the net.stationnet.station address.
3/2/2011 47
ROUTING
• Routing is accomplished by maintaining a routing tablein each station and gateways.
• Routing table may be static or dynamic– A static table could contain alternate routes if a gateway is
unavailable
– A dynamic table is more flexible in responding both to error andcongestion situations.
• Routing table may also be used to support other internetservices such as security and priority
• Source routing – source station specifies the route byincluding a sequential list of gateways in the data grams
• Route recording - To record a route, each gatewayappends its address to a list of addresses in the datagram
3/2/2011 48
DATAGRAM LIFETIME
• If dynamic or alternate routing is used, the potential
exists for a data gram or some of its fragments to
loop indefinitely through the internet.
• This is undesirable because
– An endlessly circulating datagram consumes resources
– Transport layer operation depends on timer
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 13/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 13
3/2/2011 49
• To avoid this datagram must be marked withlifetime.
• This is implemented in two ways :
– Using hop count : Each time that a datagram passes
through a gateway, the count is decremented.
– True Measure of time : This require that the gateways
must somehow know how long it has been since the data
gram or segment last crossed a gateway, in order to
know by how much to decrement the lifetime field. This
require global clocking mechanism.
3/2/2011 50
SEGMENTATION & REASSEMBLY
• Variety of networks specify different maximum packetsize. So packet has to be segmented in the gateways toaccommodate it in the network
• Reassembly can be done either at the destination or atthe immediately next gateway– Facts about destination reassembly :
• Data can have smaller berth in the packet.
• This may affect the efficiency of some networks.
– Facts about gateway reassembly :
•
Large buffers are required at gateways, otherwise there is apossibility of deadlock
• All segments of a datagram must pass through the same gateway.This inhibits the use of dynamic routing.
3/2/2011 51
• OSI follow an efficient technique for segmentation using
the following fields :
– ID :
• unique identification for station.
• It consists of source and destination address, an identifier of the
protocol layer that generated the data, and a sequence number supplied by that protocol layer.
– Data length :• Length of the data field in octets
– Offset :
• It is the position a segment in the original datagram
– More flag
3/2/2011 52
• Source station creates a datagram with ‘Data Length’
equal to the entire length of the data field, with ‘Offset’=0
and a ‘More Flag’ set to false.
• To segment it the gateway follows :
– Create two new datagram and copy the header fields of the
incoming datagram to both.
– Divide the data into two approximately equal portions along
a 64-bit boundary, placing one portion in each new
datagram.
– Set the ‘Data Length’ field of the first datagram to the length
of the inserted data and set the ‘More Flag’ to True. Offset
field is unchanged
– Set the ‘Data Length’ field of the second datagram to the
length of the inserted data and add the length of the first
data portion divided by eight to the ‘Offset’ field. The ‘More
Flag’ remains the same.
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 14/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 14
3/2/2011 53
SEGMENTATION EXAMPLE
ORIGINAL DATAGRAM
Data Length 472
Offset 0
More 0
FIRST SEGMENT
Data Length 240
Offset 0
More 1
SECOND SEGMENT
Data Length 232
Offset 30
More 0
3/2/2011 54
Original datagram
Data length = 472
Segment offset = 0
More = 0
First fragment
Data length = 240
Segment offset = 0
More = 1
Secondfragment
Data length = 232
Segment offset = 30
More = 0
3/2/2011 55
• During reassembly, as the segments with the same IDarrive, their data fields are inserted in the proper position in the buffer until the entire data gram isreassembled. This is identified by the sequence of datapacket having ‘Offset’ of zero and ends with packethaving false ‘More Flag’.
• Since connectionless service does not guarantee the
delivery, some means is needed to decide to abandon areassembly effort.– This can be done with timer. Once the timer expires, all
received segments are discarded.
– The destination IP can make use of the datagram lifetime
3/2/2011 56
ERROR CONTROL• When the data gram is discarded in the gateway, the
gateway should attempt to return some information to
the source. Based on this source may modify the
transmission strategy
• Data grams may be discarded because of
– Lifetime expires
– Congestion
– Frame Check Sequence (FCS) error – here notification is not
possible because source address field may have been
damaged
8/7/2019 Lecture 8 - Internet Working
http://slidepdf.com/reader/full/lecture-8-internet-working 15/15
CS65-Computer Networks Dept. of EEE
S.Muralidharan 15
3/2/2011 57
FLOW CONTROL
• It limits the rate of data transfer
• For connectionless services this facility is limited
3/2/2011 58
• Def: Gateway
• A gateway is a collection of HW and SW
resources that allows a node to communicate two
dissimilar networks.