Post on 03-Apr-2018
7/28/2019 CN unit 2_2
1/55
Computer networks
Name: K.SUDHA
Designation: Lecturer
Department: Electrical and Electronics Engineering
Subject code: CS2361
Year: III
Unit: II
Title: Introduction to network layers
7/28/2019 CN unit 2_2
2/55
Internetworking
An internetworkis a collection of individual networks, connected by
intermediate networking devices, that functions as a single large
network.
different kinds of network technologies that can be interconnectedby routers and other networking devices to create an internetwork
7/28/2019 CN unit 2_2
3/55
7/28/2019 CN unit 2_2
4/55
Types
Local-area networks (LANs)enabled multiple users in a relatively small
geographical area to exchange files and messages, as well as access
shared resources such as file servers and printers.
Wide-area networks (WANs) interconnect LANs with geographicallydispersed users to create connectivity.
technologies used for connecting LANs include T1, T3, ATM, ISDN,
ADSL, Frame Relay, radio links, and others.
7/28/2019 CN unit 2_2
5/55
ETH
7/28/2019 CN unit 2_2
6/55
7/28/2019 CN unit 2_2
7/55
IPV4 Packet Header
Version HLen TOS Length
Ident FlagsOffset
TTL Protocol Checksum
SourceAddr
Destination Addr
Options(variable) Pad(variable)
Data
7/28/2019 CN unit 2_2
8/55
Datagram Delivery
7/28/2019 CN unit 2_2
9/55
Packet Format
7/28/2019 CN unit 2_2
10/55
IPV4 Packet header
7/28/2019 CN unit 2_2
11/55
Fragmentation and Reassembly
7/28/2019 CN unit 2_2
12/55
Fragmentation and Reassembly
7/28/2019 CN unit 2_2
13/55
Fragmentation and Reassembly
7/28/2019 CN unit 2_2
14/55
(RARP)Reverse Address Resolution
Protocol (RARP) is a Link layer networking protocol
RARP is described in internet EngineeringTask ForceETF) publication
RFC 903
It has been rendered obsolete by the Bootstrap Protocol (BOOTP) and
the modern Dynamic Host Configuration Protocol(DHCP) BOOTP configuration server assigns an IP address to each client from a
pool of addresses.
BOOTP uses the User Datagram Protocol (UDP)
7/28/2019 CN unit 2_2
15/55
RouterA router is a device that determines the next network pointto which a packet should be forwarded toward itsdestination
Allow different networks to communicate with each other
A router creates and maintain a table of the availableroutes and their conditions and uses this information todetermine the best route for a given packet.
A packet will travel through a number of network pointswith routers before arriving at its destination.
There can be multiple routes defined. The route with alower weight/metric will be tried first.
Routing
7/28/2019 CN unit 2_2
16/55
Routing
Routing
7/28/2019 CN unit 2_2
17/55
Routing ProtocolsStatic Routing
Dynamic Routing
IGP (Interior Gateway Protocol): Route data within an Autonomous System
RIP (Routing Information Protocol)
RIP-2 (RIP Version 2)OSPF (Open Shortest Path First)
IGRP (Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
IS-IS
EGP (Exterior Gateway Protocol): Route data between AutonomousSystems
BGP (Border Gateway Protocol)
Routing
7/28/2019 CN unit 2_2
18/55
Iskra Djonova-Popova
The Routing Algorithm
u the shortest path tree is contained
in the routing table
u Calculations are based on the
Bellman-Ford algorithm
7/28/2019 CN unit 2_2
19/55
Iskra Djonova-Popova
The Centralized Version of the
Algorithm
Cycle Node B C D E
Initial (., ) (., ) (., ) (., )
1 (1, 1) (2, 2) (3, 1) (4, 2)
A B C
D E
2
3 45
6
1A B C
D E
2
3 4
1
7/28/2019 CN unit 2_2
20/55
Iskra Djonova-Popova
The Distributed Version
A B C
D E
1 2
3 4
5
6
Example of simple network with 5 nodes (routers)
and 6 links (interfaces)
The cost of all links is assumed to be 1
From A to Link Cost
B 1 1C 1 2
D 3 1
E 1 2
Routing table for A
7/28/2019 CN unit 2_2
21/55
Iskra Djonova-Popova
Advantages
simple to implement
low requirement in processing and memoryat the nodes
suitable for small networks
7/28/2019 CN unit 2_2
22/55
Iskra Djonova-Popova
Disadvantages
Slow convergence
Bouncing effect
Counting to infinity problem
7/28/2019 CN unit 2_2
23/55
Iskra Djonova-Popova
Slow Convergence
A B C
D E
2
3 4
5
6
XXX
When a link breaks the routers are supposed to reestablish the routing tables
link 1 breaks
7/28/2019 CN unit 2_2
24/55
Iskra Djonova-Popova
The Bouncing Effect
link 2 breaks and A sends its routing
table to B before B sends it to A
A B C
D E
3 4
5
6
XXX
1
7/28/2019 CN unit 2_2
25/55
Iskra Djonova-Popova
Counting to Infinity Problems
D E
3
A B C2
4
5
XXX
XXX
Links 1 and 6
break.
A sends its old routing table
before D sends the new routing table
7/28/2019 CN unit 2_2
26/55
Subnets
Each organization assigns IP addresses tospecific computers on its networks
IP addresses are assigned so that all
computers on the same LAN have similaraddresses
Each of these lans is known as a TCP/IP subnet
Any portion of the IP address can bedesignated as a subnet using a subnet mask*
* Subnet masks tell computers what part of an IP address is to be used to
determine whether a destination is on the same or a different subnet
7/28/2019 CN unit 2_2
27/55
Subnet Addressing
Figure 5-6
7/28/2019 CN unit 2_2
28/55
Subnet Addressing
Example 1
Suppose that the first two bytes are the subnet indicator with addressesof the form 131.156.x.x
Then, 131.156.29.156 and 131.156.34.215 would be on the samesubnet.
The subnet mask would be 255.255.0.0, which corresponds to
11111111.11111111.00000000.00000000, where 1 indicates thatthe position is part of the subnet address and a 0 indicates that itis not.
7/28/2019 CN unit 2_2
29/55
Subnet Addressing
Example 2
Partial bytes can also be used as subnets.
For example, consider the subnet mask 255.255.255.128, which is
11111111.11111111.11111111.10000000.
Here, all computers with the same first three bytes and last byte from
128 to 254 would be on the same subnet.
7/28/2019 CN unit 2_2
30/55
Providing Addresses
Providing addresses to networked
computers
Static addressing
Dynamic addressing
7/28/2019 CN unit 2_2
31/55
Static Addressing
Each computer is given an address through aconfiguration file
Stored on individual computers
Problems Moves, changes, adds and deletes
Individuals could change their own IP address
Network renumbered
Companies do not have a good way of trackingthe addresses
7/28/2019 CN unit 2_2
32/55
Dynamic Addressing
Server supplies a network layer addressautomatically Each time user logs in
For a specific lease period
Two standards for dynamic addressing Bootstrap protocol (bootp) - developed in 1985
Dynamic host control* protocol (DHCP), developedin 1993
* some say C = configuration
7/28/2019 CN unit 2_2
33/55
Dynamic Addressing
Bootp and DHCP
Software installed on the client instructs the
client to contact the server using data link layer
addresses
Message asks server to assign the client a
unique network layer address
Server runs corresponding software that sendsthe client its network address and subnet mask
7/28/2019 CN unit 2_2
34/55
Leasing
Bootp or DHCP server can either:
Assign the same network layer address to the
client each time the client requests it (bootp)
Lease the network address from the next
available on a list of authorized addresses for
as long as the client is connected or for a
specified amount of time -- common with ispsand dial-up users (DHCP)
7/28/2019 CN unit 2_2
35/55
Address Resolution
The process of:
Translating an application layer address to a
network address (server name resolution)
Translating the server name address to a data
link layer address (data link layer address
resolution)
7/28/2019 CN unit 2_2
36/55
Address Resolution
Server name resolution
Accomplished by the use of domain name
service (DNS)
Computers called name servers provide these
DNS services
Address data base includes: server names and their
corresponding IP address
7/28/2019 CN unit 2_2
37/55
Client
computer
DNS Servernetmgr.cso.niu.edu
131.156.1.11
DNS Request
LAN
LAN
Internet
DNS Request
Root DNS Server
for .EDU
domain
Weber State University
Northern Illinois University
DNS Request
DNS Response
DNS Response
DNS ResponseDNS Server
sol.acs.unt.edu
137.90.2.122
Figure 5-7
7/28/2019 CN unit 2_2
38/55
Address Resolution
Data link layer address resolution
Broadcast message is sent to all computers in
its subnet
if your IP address is xxx.Yyy.Zzz.Ttt, please send
your data link layer address
Uses address resolution protocol (ARP)
7/28/2019 CN unit 2_2
39/55
Network Routing
The process of determining the route amessage will take through the network
Centralized
Decentralized Static routing
Dynamic routing
Broadcast or multicast routing
Connectionless
Connection-oriented routing
7/28/2019 CN unit 2_2
40/55
Route and Route Table
Computer B
Destination Route
A A
C C
D AE E
F E
G C
A
BC
G
E
D F
7/28/2019 CN unit 2_2
41/55
Internet Routes
UEN
WSU CanadaOther destinations
West Coast
Europe Asia
WSU
Destination RouteUEN Utah
Oxford Europe
U of Toronto Canada
U of Singapore Asia
UC Stanford West Coast
Other Other
7/28/2019 CN unit 2_2
42/55
Types of Routing
Centralized routing
Static routing (decentralized)
Dynamic routing (adaptive and
decentralized) Distance vector
Link state
Other types Broadcast routing
Multicast routing
7/28/2019 CN unit 2_2
43/55
Centralized Routing
All routing decisions are made by one computer
Main routing for star and mesh topologies
Routing tables located on each computer
Central computer sends updated tables as needed
Routing table tells the device where to send
messages
Simplicity - no wasted resources Hardware failures or changing conditions cause
table to be out of sync
7/28/2019 CN unit 2_2
44/55
Decentralized Routing
Each of the following types of routing fall under the
heading of decentralized routing
Each device makes its own routing decisions with the use
of a formal routing protocol Routing protocols are self-adjusting
Can automatically adapt to changes in the network configuration
Drawbacks
Slows down the network with status messages Requires more processing by each computer
7/28/2019 CN unit 2_2
45/55
Static Routing
Routing table developed by the networkmanager or some type of committee
Initial table sent to each computer which then
updates the routing table as needed Reroutes as needed with down or removed
circuits
Updated when new devices announce their
presence
Used in relatively static networks that have fewrouting options
7/28/2019 CN unit 2_2
46/55
Dynamic Routing (Adaptive)
Routing messages over the fastest route Used when there are multiple routes in the
network Improves network performance by selecting the
fastest route to avoid bottlenecks or busy circuits
Initial table developed by network manager Dynamically updated with changing conditions by
the devices themselves Monitors message transmission time or each
device reports how busy it is to avoid bottlenecks
Disadvantages Requires more processing by each computer Wastes network capacity
7/28/2019 CN unit 2_2
47/55
Dynamic Routing (Adaptive)
Distance vector dynamic routing The number of hops along a route
Exchange information with the neighboring computers every few
minutes
Link state dynamic routing The number of hops along a route
The speed of the circuits on the route
How busy the route is
Exchanges information with other routing devices every 15-30
minutes
Tries to determine the fastest route
Converges reliable routing information more quickly
7/28/2019 CN unit 2_2
48/55
Routing Protocols
RIP, IGP, OSPF, EGP, BGP
Distance vector routing protocols (RIP,Appletalk,IPX, IGRP)
Routers inform neighboring routers of table Closest router is used to route packets
Link State routing protocols (OSPF)
Routers have at least a partial map of the network Changes are flooded throughout network
Routes are recomputed
7/28/2019 CN unit 2_2
49/55
Interior and Exterior Routing
Interior routing is within an autonomoussystem (collection of routers under a singleadministrative control)RIP, OSPF
Exterior routing occurs between autonomoussystems
Network access protocols operate at Layer 2.
Transport of IP datagrams IP over point-to-point connections is used by ISP
when you dial in
7/28/2019 CN unit 2_2
50/55
Routing Protocols
Border Gateway Protocol
Internet Control Message Protocol
Routing Information Protocol
Open Shortest Path First
Enhanced Interior Gateway Routing
Protocol
7/28/2019 CN unit 2_2
51/55
Routing Protocols
Internet protocols BGP (border gateway protocol)
Exchanges information between autonomous systemsabout the condition of the internet
Complex, hard to administer, exterior routing protocol
ICMP (internet control message protocol) Simple, interior routing protocol used with the internet
Reports routing errors but is limited in the ability toupdate
RIP (routing information protocol) Dynamic distance vector interior routing protocol
Counts the number of devices on each route
Selects the route with the least number of devices
7/28/2019 CN unit 2_2
52/55
Routing Protocols
OSPF (open shortest path first) Link state interior routing protocol used on the internet
Counts number of computers, network traffic, network errorrates to select the best route
Doesnt broadcast to all devices just to routing devices
Preferred TCP/IP, but also used by IPX/SPX
EIGRP (enhanced interior gateway routing protocol) Link state interior routing protocol developed by CISCO
Uses route transmission capacity, delay, reliability and load toselect best route
Stores multiple routing tables SAP (service advertisement protocol)
Netware servers send SAP advertisements
Novells broadcast protocol
7/28/2019 CN unit 2_2
53/55
Broadcast Routing
Sends the message to all computers on the
network
Only computer with correct addressprocesses the message
Used only in bus networks
Wastes network bandwidth
7/28/2019 CN unit 2_2
54/55
Multicasting
Similar to broadcasting Only works within one LAN or subnet
Messages sent from one computer to another on the networkis called a unicastmessage
Messages sent to a group of computers is called a multicast
message Targeting a specific work group
IGMP (internet group management protocol) Sends an IGMP multicast request to the routing computer
Assigned a special class D IP address to identify the group
The routing computer sets the data link layer address All participating machines will process messages sent to this
address
Sends a IGMP message notifying of end of session
7/28/2019 CN unit 2_2
55/55
Thank u