Lecture 8 - Internet Working
Lecture 8 - Internet Working
Lecture 8 - Internet Working
of EEE
AN INTERNET
INTERNETWORKING
3/2/2011 1 3/2/2011 2
3/2/2011 3 3/2/2011 4
S.Muralidharan 1
CS65-Computer Networks Dept. of EEE
• END-TO-END APPROACH
– The end-to-end approach
assumes only that all networks
offer 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 to
provide reliable service within
each network and then to merge
together individual network
connections across multiple
networks.
3/2/2011 5 3/2/2011 6
3/2/2011 7 3/2/2011 8
S.Muralidharan 2
CS65-Computer Networks Dept. of EEE
3/2/2011 9 3/2/2011 10
THE BRIDGE
• When bridges are powered on in an Ethernet network, they start to
• Why Bridges ? learn the network's topology by analysing the source addresses of
incoming frames from all attached network segments (a process
– Bridges are simplified gateway used to connect homogenous called backward learning ). Over a period of time, they build up a
networks. Such networks exhibit the same interface to attached routing table .
stations and use the same internal protocols. – 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
– Bridges can be used to connect two or more LAN segments of the network segment. If the source and the destination are on different
same type (e.g. Ethernet to Ethernet, or Token-Ring to Token- segments, the bridge needs to be able to determine which segment the
Ring). destination device belongs to.
– The bridge monitors all traffic on the segments it connects, and checks the
• Bridges Vs Repeaters source and destination address of each frame against its routing table. When
– Example is the “repeater” used in base band networks. However, the bridge first becomes operational, the routing table is blank, but as data is
transmitted back and forth, the bridge adds the source MAC address of any
this is not a true multiple network system. The repeater is merely incoming frame to the routing table and associates the address with the port
used to extend the length of the base band cable. It amplifies and on which the frame arrives. In this way, the bridge quickly builds up a
retransmits all signals, including collisions. Thus the system complete picture of the network topology. If the bridge does not know the
destination segment for an incoming frame, it will forward the frame to all
behaves like a single network. Moreover each port on a bridge has attached segments except the segment on which the frame was transmitted.
its own MAC address which is not the case of a repeater Bridges reduce the amount of traffic on individual segments by acting as a
filter, isolating intra-segment traffic. This can greatly improve response times.
3/2/2011 11 3/2/2011 12
S.Muralidharan 3
CS65-Computer Networks Dept. of EEE
3/2/2011 13 3/2/2011 14
3/2/2011 15 3/2/2011 16
S.Muralidharan 4
CS65-Computer Networks Dept. of EEE
3/2/2011 17 3/2/2011 18
3/2/2011 19 3/2/2011 20
S.Muralidharan 5
CS65-Computer Networks Dept. of EEE
Sequence of events…
Contd…
• 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.
• 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”
3/2/2011 23 3/2/2011 24
S.Muralidharan 6
CS65-Computer Networks Dept. of EEE
• In case 4, the gateway returns an error message to the • Before actually sending data, the gateway must need to
source of the datagram. segment the datagram to accommodate a smaller packet
• For case 1 to 3, the gateway must select appropriate route size limitation on the outgoing network.
for the data, and insert them into the appropriate network • Each segment becomes an independent IP datagram.
with the appropriate address. • The gateway then queues each packet for transmission. It
• For case 1, the address is the destination address. may also enforce a maximum queue length. Once that limit
is reached, additional datagrams are simply dropped.
• For case 2 and 3, the address is a gateway address
• The process described above continues through zero or
more gateways until the datagram reaches the destination
station.
• The destination station recovers the IP datagram from its
network wrapping.
• If segmentation has occurred, the IP module in the
destination station buffers the incoming data until the
original data field is reassembled.
3/2/2011 25 3/2/2011 26
S.Muralidharan 7
CS65-Computer Networks Dept. of EEE
• Type of service(8-bits):
Precedence (3-bits): A priority indication, where 0 is the lowest and
means normal service, while 7 is highest and is intended for network
control messages (e.g., routing, congestion control).
Delay (1-bit): An Application can request low delay service (e.g., for
interactive use).
Throughput (1-bit): Application requests high throughput.
Reliability (1-bit): Application requests high reliability
Cost (1-bit) : Application requests cost minimization.
– Identification(16-bits),
Flags(3-bits),Fragment
offset (13-bits):
• These three fields are used
for fragmentation and
reassembly.
– 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 31 3/2/2011 32
S.Muralidharan 8
CS65-Computer Networks Dept. of EEE
– Gateways along a path are free to fragment datagrams as needed; hosts are
We need to know when we’ve received all of the fragments. To help with this,
required to reassemble fragments before passing complete datagrams to the higher
the flags field may contain:
layer protocols.
– A Don't Fragment indication(DF flag) (set by host, honored by
– Each fragment contains a complete copy of the original datagram header plus gateways). (A 1-bit flag.)
some portion of the data.
– A receiving host must match arriving fragments with the proper original datagram. – The More Fragments(MF flag) field indicates that another
fragment follows this one. This fragment is not the last fragment of
– These fragments may be out of order and interleaved with other fragments.
the original datagram.
– All fragments of a datagram will have the same source and destination IP address.
– But, other datagrams between those two machines will share these fields as well,
An unfragmented datagram has an offset of 0, and a More Fragment bit of 0.
so this is not enough. The last fragment of a fragmented datagram contains More Fragment = 0 and
– The identification field uniquely identifies fragments of the same original datagram.
the Offset = a non-zero number.
– Whenever a host sends a datagram, it sets the identification field of the outgoing Note: The total length field of the IP header refers to the current datagram, not the
datagram and increments its local identification counter. original. Thus, the More Fragment bit is needed in order for the recipient host to
determine when it has all fragments of a datagram
– The offset field Indicates where in the datagram this fragment belongs.
– When a gateway fragments a datagram, it sets the offset field of each fragment to
reflect at what data offset with respect to the original datagram the current fragment
belongs.
– Fragmentation occurs in 8-byte chunks, so the offset holds the “chunk number”.
– Gateways can further fragment fragments!
3/2/2011 33 3/2/2011 34
Contd…
Example 2 :
Example 1 :
ORIGINAL DATAGRAM
Original Frame:IHL = 5, Length = 656, Fragment Offset = 0, More = 0
Data Length 472
Fragment 1: IHL = 5, Length = 232, Fragment Offset = 0, More = 1
Fragment 2: IHL = 5, Length = 232, Fragment Offset = 29, More = 1 Offset 0
Fragment 3: IHL = 5, Length = 192, Fragment Offset = 58, More = 0 More 0
FIRST SEGMENT
Data Length 240
Offset 0
First fragment Secondfragment
More 1 Data length = 240 Data length = 232
Segment offset = 0 Segment offset = 30
More = 1 More = 0
SECOND SEGMENT
Data Length 232
Offset 30
More 0 Original datagram
Data length = 472
Segment offset = 0
More = 0
3/2/2011 35 3/2/2011 36
S.Muralidharan 9
CS65-Computer Networks Dept. of EEE
3/2/2011 37 3/2/2011 38
3/2/2011 39 3/2/2011 40
S.Muralidharan 10
CS65-Computer Networks Dept. of EEE
3/2/2011 41 3/2/2011 42
3/2/2011 43 3/2/2011 44
S.Muralidharan 11
CS65-Computer Networks Dept. of EEE
• The network address required by gateway can be • So gate way will receive an internet packet with a
specified by several ways. referent in the form net.station where net is the network
– The application can refer to a network by a unique number
address and station is the address of the individual
– The internet logic in the station can translate a network name
system.
into a network address. – Since each station has different processes running, identifying
the process becomes difficult
– A global station addressing scheme can be used. ie. Unique
identifier for each station. • So net.station.SAP could solve this problem. This
• The third approach was proposed by Ethernet makes the internet protocol as process to process
developers. It recommends a 48 bit address which can rather than station to station.
be used for 1014 unique referents – It is the responsibility of the internet layer to multiplex and de-
multiplex between various SAPs. This simplify the higher
– Advantage : it permits stations to move from one network to
layer’s task. This allows the usage of microprocessor hardware
another.
devices.
– Disadvantage : some central facility must manage the
assignment of names • However one or more directory servers are needed to
identify the net.station address.
3/2/2011 45 3/2/2011 46
• Routing is accomplished by maintaining a routing table • If dynamic or alternate routing is used, the potential
in each station and gateways. exists for a data gram or some of its fragments to
• Routing table may be static or dynamic loop indefinitely through the internet.
– A static table could contain alternate routes if a gateway is • This is undesirable because
unavailable
– An endlessly circulating datagram consumes resources
– A dynamic table is more flexible in responding both to error and
congestion situations. – Transport layer operation depends on timer
• Routing table may also be used to support other internet
services such as security and priority
• Source routing – source station specifies the route by
including a sequential list of gateways in the data grams
• Route recording - To record a route, each gateway
appends its address to a list of addresses in the data
gram
3/2/2011 47 3/2/2011 48
S.Muralidharan 12
CS65-Computer Networks Dept. of EEE
3/2/2011 49 3/2/2011 50
S.Muralidharan 13
CS65-Computer Networks Dept. of EEE
SEGMENTATION EXAMPLE
ORIGINAL DATAGRAM
Data Length 472
Offset 0
More 0
FIRST SEGMENT
Data Length 240
Offset 0 First fragment
Data length = 240
Secondfragment
Data length = 232
Segment offset = 0 Segment offset = 30
More 1 More = 1 More = 0
SECOND SEGMENT
Data Length 232
Offset 30
More 0 Original datagram
Data length = 472
Segment offset = 0
3/2/2011 53 More = 0
3/2/2011 54
3/2/2011 55 3/2/2011 56
S.Muralidharan 14
CS65-Computer Networks Dept. of EEE
FLOW CONTROL
• Def: Gateway
• A gateway is a collection of HW and SW
• It limits the rate of data transfer
resources that allows a node to communicate two
• For connectionless services this facility is limited dissimilar networks.
3/2/2011 57 3/2/2011 58
S.Muralidharan 15