Professional Documents
Culture Documents
&
OSI Reference Model
Networking: An Overview
A network is a group of interconnected
systems which share services and interact
with each other by means of a shared
communication link.
These systems can be located anywhere.
Network is often classified according to its
geographical size.
NIC, OSI Reference Model
Networking
Benefits of networking
Goal of having networking environment is to
provide services and to reduce the equipment
costs. The primary reasons for networking PC's
are as follows:
Sharing printers and other devices
Providing Distributed Computing.
Sharing Files
Centralised administration of resources
Security of Resources.
Personal communications (like e-mail,
chat, audio/video
conferencing)
NIC, OSI Reference Model
World Wide
Web ... and many other uses
Networking Basics
Networking Basics
n
Software
Protocol that define and regulate the way two
or more device communicate.
Drivers, that guide the functionality of NIC
Communication Software.
NIC, OSI Reference Model
Transmission Facilities
Are the media used to transport networks signals to their
destination.
Coaxial Cable, Twisted Pair, Fiber- Optic
Access Devices
Is known as Network Interface Card (NIC), and is
responsible for
Properly formatting data so that it can be accepted in the network
Placing data on the network
Accepting transmitted data thats addressed to it.
Repeaters/Hubs
Accepts transmitted signals, amplify it and puts them back
on the network
NIC, OSI Reference Model
7
Protocol
Device Drivers
Is a hardware level program that control NIC
NIC, provide an interface for its host operating system
Communication Software
That enable the users to communicate and share
resources
Windows Explorer,
WWW, Telnet, FTP
NIC, OSI Reference Model
10
11
Point-to-point
only 2 systems involved
no doubt about where data came from !
NIC, OSI Reference Model
12
Multiaccess
Point-to-point
13
Technologies:
Ethernet
10 Mbps, 100Mbps
Token Ring 16 Mbps
FDDI
100 Mbps
NIC, OSI Reference Model
14
Technologies:
telephone lines
Satellite communications
NIC, OSI Reference Model
15
Technologies:
coaxial cable
Microwave (Wireless Technology)
NIC, OSI Reference Model
16
Internetwork
Connection of 2 or more distinct
(possibly dissimilar) networks.
n Requires some kind of network device
to facilitate the connection.
n
Net A
Net B
NIC, OSI Reference Model
17
Network Models
Using a formal model allows us to deal
with various aspects of Networks
abstractly.
n We will look at a popular model (OSI
reference model).
n The OSI reference model is a layered
model.
n
18
19
OSI Model
Although the OSI model is a just a model
(not a specification), it is generally
regarded as the most complete model (as
well it should be - nearly all of the popular
network protocol suites in use today were
developed before the OSI model was
defined).
20
Application
Presentation
Session
Transport
Network
Data-Link
Physical
21
Layering
Divide a task into pieces and then solve
each piece independently (or nearly so).
n Establishing a well defined interface
between layers makes porting easier.
n Major Advantages:
n
Code Reuse
Extensibility
22
23
Layers
Letter
Addressed
Envelope
Letter
Addressed
Envelope
24
25
26
Headers
DATA
Process
DATA
Transport
H H
DATA
Network
H H H
DATA
Data Link
Process
Transport
Network
Data Link
27
28
29
30
31
Responsibility:
transmission of raw bits over a
communication channel.
Issues:
mechanical and electrical interfaces
time per bit
distances
32
n
n
33
34
35
Analog Signaling
n
36
Digital Signaling
n
37
Encoding
n
38
Manchester Encoding
0
39
Responsibility:
provide an error-free communication link
Issues:
framing (dividing data into chunks)
header & trailer bits
addressing
10110110101
01100010011
NIC, OSI Reference Model
10110000001
40
Transmit
Encapsulates packet from Internet Layer in frame
add header for addressing and trailer for error control
Header says 00-A0-CC-39-2D-78, Im talking to
you
Uses the physical layer to transmit frame
Receive
41
42
n
n
n
43
Token Passing
Controlled Access
44
Relative Performance
In general, contention approaches work better
than controlled approaches for small
networks that have low usage.
In high volume networks, many devices want to
transmit at the same time, and a wellcontrolled circuit prevents collisions.
NIC, OSI Reference Model
45
Efficiency:
46
47
Ethernet / CSMA/CD
Stations wishing to transmit listen to the
line to determine if it is in use.
n If no is heard, the station will transmit a
message called a frame.
n Every computer "hears" every
transmission, but only the "destination"
computer listens to the message.
n All other stations 'filter' or disregard
transmissions not addressed to them.
n
48
Ethernet Variations
n
49
Broadband
Signaling
n
n
Baseband Signaling
Characteristic of a
network technology
where only one
carrier frequency is
used. Ethernet is an
example of a
baseband network.
Also called
narrowband.
51
Responsibilities:
path selection between end-systems (routing).
subnet flow control.
fragmentation & reassembly
translation between different network types.
Issues:
packet headers
virtual circuits
NIC, OSI Reference Model
52
protocol
n header checksum
n source network
address
n destination network
address
n
53
Responsibilities:
provides virtual end-to-end links between
peer processes.
end-to-end flow control
Issues:
headers
error detection
reliable communication
NIC, OSI Reference Model
54
Modes of Service
connection-oriented vs. connectionless
n sequencing
n error-control
n flow-control
n byte stream vs. message based
n full-duplex vs. half-duplex.
n
55
Connection-Oriented vs.
Connectionless Service
n
56
Sequencing
Sequencing provides support for an
order to communications.
n A service that includes sequencing
requires that messages (or bytes) are
received in the same order they are
sent.
n
57
58
Error Control
Some services require error detection (it
is important to know when a
transmission error has occured).
n Checksums provide a simple error
detection mechanism.
n Error control sometimes involves
notification and retransmission.
n
59
Flow Control
Flow control prevents the sending
process from overwhelming the
receiving process.
n Flow control can be handled a variety of
ways - this is one of the major research
issues in the development of the next
generation of networks (ATM).
n
60
61
62
63
End-to-End
Process A
Process B
64
Hop-by-Hop
Process A
Process B
65
Buffering
n
n
Process A
Send
Buffer
Recv.
Buffer
Process B
66
Responsibilities:
establishes, manages, and terminates
sessions between applications.
service location lookup
67
Responsibilities:
data encryption
data compression
data conversion
68
Responsibilities:
anything not provided by any of the other
layers
Issues:
application level protocols
appropriate selection of type of service
69
Application Layer
n
70
Important Summary
Data-Link :- communication between
machines on the same network.
n Network :- communication between
machines on possibly different
networks.
n Transport :- communication between
processes (running on machines on
possibly different networks).
n
71
Connecting Networks
n
Repeater:
physical layer
Bridge:
Router:
network layer
Gateway:
72
Repeater
Copies bits from one network to another
n Does not look at any bits
n Allows the extension of a network
beyond physical length limitations
n
REPEATER
73
Bridge
Copies frames from one network to
another
n Can operate selectively - does not copy
all frames (must look at data-link
headers).
n Extends the network beyond physical
length limitations.
n
BRIDGE
NIC, OSI Reference Model
74
Router
Copies packets from one network to another.
n Makes decisions about what route a packet
should take (looks at network headers).
n
ROUTER
ROUTER
75
Gateway
Operates as a router
n Data conversions above the network
layer.
n Conversions:
n
76
Encapsulation Example
Gateway
Gateway
77
Translation
Gateway
78
Encryption gateway
Secure
Network
Encryption/Decryption
Gateways
GW
?
?
?
Secure
Network
GW
Insecure Network
79
80
TCP/IP
Transmission Control Protocol / Internet
Protocol
81
82
83
Internet Protocol
The IP in TCP/IP
n
84
IP Datagrams
IP provides connectionless, unreliable
delivery of IP datagrams.
n Connectionless: each datagram is
independent of all others.
n Unreliable: there is no guarantee that
datagrams are delivered correctly or at
all.
n
85
R e n s s e l a e r
IP Addresses
Why ?
NIC, OSI Reference Model
86
IP Addresses
IP is a network layer - it must be
capable of providing communication
between hosts on different kinds of
networks (different data-link
implementations).
n The address must include information
about what network the receiving host is
on. This makes routing feasible.
n
87
IP Addresses
IP addresses are logical addresses (not
physical)
n 32 bits.
n Includes a network ID and a host ID.
n Every host must have a unique IP address.
n IP addresses are assigned by a central
authority (the Inter-NIC at SRI
International).
n
88
Class
A 00 NetID
NetID
B 10
10
HostID
HostID
NetID
NetID
110
110
1110
8 bits
HostID
HostID
HostID
HostID
NetID
NetID
Multicast Address
8 bits
8 bits
8 bits
89
Class
Class AA
l
l 128
128 possible
possible network
network IDs
IDs
l
l over
over 44 million
million host
host IDs
IDs per
per network
network ID
ID
Class
Class BB
l
l 16K
16K possible
possible network
network IDs
IDs
l
l 64K
64K host
host IDs
IDs per
per network
network ID
ID
Class
Class C
C
l
l over
over 22 million
million possible
possible network
network IDs
IDs
l
l about
about 256
256 host
host IDs
IDs per
per network
network ID
ID
NIC, OSI Reference Model
90
91
IP Addresses
IP Addresses are usually shown in
dotted decimal notation:
1.2.3.4
00000001 00000010 00000011 00000100
n cs.rpi.edu is 128.213.1.1
n
92
93
94
Mapping IP Addresses to
Hardware Addresses
IP Addresses are not recognized by
hardware.
n If we know the IP address of a host, how do
we find out the hardware address ?
n The process of finding the hardware
address of a host given the IP address is
called
Address Resolution
n
95
96
ARP
The Address Resolution Protocol is
used by a sending host when it knows
the IP address of the destination but
needs the Ethernet address.
n ARP is a broadcast protocol - every
host on the network receives the
request.
n Each host checks the request against
its IP address - the right one responds.
n
97
ARP (cont.)
ARP does not need to be done every
time an IP datagram is sent - hosts
remember the hardware addresses of
each other.
n Part of the ARP protocol specifies that
the receiving host should also
remember the IP and hardware
addresses of the sending host.
n
98
ARP conversation
HEY - Everyone please listen!
Will 192.168.0.44 please send me
his/her Ethernet address?
not me
99
RARP conversation
HEY - Everyone please listen!
My Ethernet address is
22:BC:66:17:01:75.
Does anyone know my IP address ?
not me
100
Services provided by IP
Connectionless Delivery (each
datagram is treated individually).
n Unreliable (delivery is not guaranteed).
n Fragmentation / Reassembly (based on
hardware MTU).
n Routing.
n Error detection.
n
101
IP Datagram
1 byte
1 byte
1 byte
1 byte
VERS
HL
Service
Fragment Length
Datagram ID
FLAG
Fragment Offset
TTL
Protocol
Header Checksum
Source Address
Destination Address
Options (if any)
Data
102
IP Datagram Fragmentation
Each fragment (packet) has the same
structure as the IP datagram.
n IP specifies that datagram reassembly
is done only at the destination (not on a
hop-by-hop basis).
n If any of the fragments are lost - the
entire datagram is discarded (and an
ICMP message is sent to the sender).
n
103
104
ICMP
Internet Control Message Protocol
ICMP is a protocol used for exchanging
control messages.
n ICMP uses IP to deliver messages.
n ICMP messages are usually generated
and processed by the IP software, not
the user process.
n
105
106
Process
Process
Process
Process
TCP
TCP
UDP
UDP
ICMP, ARP
&
RARP
Process Layer
Transport Layer
Network Layer
IP
IP
802.3
802.3
NIC, OSI Reference Model
Data-Link Layer
107
108
Ports
TCP/IP uses an abstract destination
point called a protocol port.
n Ports are identified by a positive integer.
n Operating systems provide some
mechanism that processes use to
specify a port.
n
109
Ports
Host A
Host B
Process
Process
Process
Process
Process
Process
110
UDP
Datagram Delivery
n Connectionless
n Unreliable
n Minimal
n
Destination Port
Length
Checksum
Data
111
TCP
Transmission Control Protocol
TCP is an alternative transport layer
protocol supported by TCP/IP.
n TCP provides:
Connection-oriented
Reliable
Full-duplex
Byte-Stream
n
112
Connection-Oriented
Connection oriented means that a
virtual connection is established before
any user data is transferred.
n If the connection cannot be established
- the user program is notified.
n If the connection is ever interrupted the user program(s) is notified.
n
113
Reliable
Reliable means that every transmission
of data is acknowledged by the receiver.
n If the sender does not receive
acknowledgement within a specified
amount of time, the sender retransmits
the data.
n
114
Byte Stream
Stream means that the connection is
treated as a stream of bytes.
n The user application does not need to
package data in individual datagrams
(as with UDP).
n
115
Buffering
TCP is responsible for buffering data
and determining when it is time to send
a datagram.
n It is possible for an application to tell
TCP to send the data it has buffered
without waiting for a buffer to fill up.
n
116
Full Duplex
TCP provides transfer in both directions.
n To the application program these
appear as 2 unrelated data streams,
although TCP can piggyback control
and data communication by providing
control information (such as an ACK)
along with user data.
n
117
TCP Ports
Interprocess communication via TCP is
achieved with the use of ports (just like
UDP).
n UDP ports have no relation to TCP
ports (different name spaces).
n
118
TCP Segments
The chunk of data that TCP asks IP to
deliver is called a TCP segment.
n Each segment contains:
n
119
1 byte
1 byte
1 byte
Source Port
Destination Port
Sequence Number
Request Number
offset Reser.
Control
Window
Checksum
Urgent Pointer
Options (if any)
Data
NIC, OSI Reference Model
120
Addressing in TCP/IP
n
121
122
TCP/IP Summary
n
123
124
IP Address Management
n
125
IP v4
Ipv4 uses 32 bit unique addresses
n Displayed in 4 part (field, byte) dotted
decimal notation.
n
xxx.xxx.xxx.xxx
126
127
128
129
Classes of networks
Class A
n Class B
n Class C
n Class D
n
130
Specifying Classes
Class A High Order Bit 0
n Class B High Order Bits 10
n Class C High Order Bits 11
n Class D High Order Bits 1110
n Class E High Order Bits 11110
n
131
Class A Addresses
Up to 126 addresses
n Up to 16,777,216 hosts each.
n 1-126.xxx.xxx.xxx
n 0 and 127 are reserved
n 10.0.0.0 - 10.255.255.255 are Private
Reserved (Non-Routable Class A
Addresses)
n
132
Class B Addresses
up to 16,384 Networks
n Each network with 65,000 addresses
n 128-191.xxx.xxx.xxx
n Private / Reserved Class B Addresses
172.16.0 - 172.31.255.255
n
133
Class C Addresses
Up to 2,097,152 class C networks with
254 addresses each
n (0 and 255 are reserved)
n The first two high order bits must be 1 &
1.
n 192-254.xxx.xxx.xxx
n Private Reserved Class C Addresses
192.168.0.0 - 192.168.255.255
n
134
Class D & E
n
135
136
Subnet Addresses
n
n
10
10
NetID
NetID
SubnetID
SubnetID HostID
HostID
137
Subnetting
router
Subnet 1
128.213.1.x
Subnet 2
128.213.2.x
Subnet 3
128.213.3.x
138
Subnetting
Subnets can simplify routing.
n IP subnet broadcasts have a hostID of
all 1s.
n It is possible to have a single wire
network with multiple subnets.
n
139
Sub-netting
Sub-nets- Sub-nets divide a single
network into smaller networks.
n Routers are used to connect the smaller
Subnetworks to the main network.
n Subnetting borrows host bits and adds
them to the main network's section.
n
140
141
Sub-netting
Sub-nets- Sub-nets divide a single
network into smaller networks.
n Routers are used to connect the smaller
Subnetworks to the main network.
n Subnetting borrows host bits and adds
them to the main network's section.
n Subnet Mask- tells TCP/IP which bits
have been borrowed for sub-netting.
n
142
143
144
145
Common Subnets
n 255 11111111
n 254 11111110
n 252 11111100
n 248 11111000
n 240 11110000
n 224 11100000
n 192 11000000
n 128 10000000
n 0
146
1 bits
2 bits
3 bits
16
4 bits
32
5 bits
64
6 bits
128
7 bits
255
8 bits
NIC, OSI Reference Model
147
# of Subnets
0
2
6
14
30
62
126
254
Number of bits
1
2
3
4
5
6
7
8
Subnet Mask
invalid
255.192.0.0
255.224.0.0
255.240.0.0
255.248.0.0
255.252.0.0
255.254.0.0
255.255.0.0
148
# of Subnets
0
2
6
14
30
62
126
254
Number of bits
1
2
3
4
5
6
7
8
Subnet Mask
invalid
255.255.192.0
255.255.224.0
255.255.240.0
255.255.248.0
255.255.252.0
255.255.254.0
255.255.255.0
149
# of Subnets
0
2
6
14
30
62
Number of bits
1
2
3
4
5
6
Subnet Mask
invalid
255.255.255.192
255.255.255.224
255.255.255.240
255.255.255.248
255.255.255.252
150
151
Class B Example
172.16.xxx.xxx
n 255.255.224.0
n 3 subnet bits taken
n 8 subnets created 8190 hosts each
n
152
153
0 192.168.121.1 to 192.168.121.62
n 1 192.168.121.65 to 192.168.121.126
n 2 192.168.121.129 to 192.168.121.190
n 3 192.168.121.193 to 192.168.121.254
n
154
155
= [00][xxxxxx] .1 to .62
[00][000001] to [00][111110]
n
156
157
IP Version 6
n Necessary because we are running out of 32
158