15it303j Unit 1
15it303j Unit 1
15it303j Unit 1
COMPUTER
NETWORKS
UNIT I : INTRODUCTION TO
COMPUTER NETWORKS
TCP/IP Model
Outline
• Data Communication Overview
– Definition
– Components
– Protocols and standards
• Network Overview
– Connectivity
– Categories
– Internetworks
3
Motivations
• Efficient way to share resources
– Cost – less expensive
– Accessibility – easier
• Efficient way to exchange information
– Time – faster
– Size – bigger
– Correctness – more accurate
4
Data Communication: Definition
• Data Communication:
Transfer of data from one device to another via
some form of transmission medium.
5
Data Communication
Hi, Hi,
how how
are are
you? you?
Computer User
01010001 01010001
6
Components in Communication
1 Message
Hi, how are you?
5 Protocol
2 Sender 3 Receiver
4 Medium
7
Data Representation
• Numbers
– 8/16/32 bit integers
– floating point 150
2
• Text
– ASCII, Unicode
• Images 255
9
Standards Organizations
• Creation Committees
– ISO, ITU-T, ANSI, IEEE, EIA
• Forums
• Regulatory Agencies
10
Direction of Data Flow
• Simplex: One direction only
data flow
Server Monitor
data flow
Keyboard
11
Direction of Data Flow
• Half Duplex: Both directions, one at a time
– E.g., walkie-talkies
12
Direction of Data Flow
• Full Duplex: Both directions simultaneously
data flow
data flow
– E.g., telephone
13
Networks
• Network: a set of devices connected by media
links
Laptop
iM ac
Workstation
Media Links
Server
SD
Printer Scanner 14
Types of Connections
• Point-to-point
• Multipoint (multidrop)
15
Point-To-Point Connection
16
Multipoint Connection
Wireless
17
Topology
• Topology: physical or logical arrangement of
devices
– Point-to-point
– Mesh
– Star
– Bus
– Ring
– Hybrid
18
Point-to-Point Connection
19
Fully Connected Mesh Topology
A D
B C
20
Fully Connected Mesh Topology
21
Fully Connected Mesh Topology
• Pros:
– Dedicated links
– Robustness
– Privacy
– Easy to identify fault
• Cons:
– A lot of cabling
– I/O ports
– Difficult to move
22
Star Topology
A D
Hub Drop
B C
Drop
23
Star Topology
A D
Switch
B C
24
Star Topology
A D
Hub
B C
25
Star Topology
• Pros:
– One I/O port per device
– Little cabling
– Easy to install
– Robustness
Hub
– Easy to identify fault
• Cons:
– Single point of failure
– More cabling still
required
26
Bus Topology
Drop
line
Tap
Terminator
27
Bus Topology
A B C D
28
Bus Topology
29
Bus Topology
• Pros:
– Little cabling
– Easy to install
• Cons:
– Difficult to modify
– Difficult to isolate fault
– Break in the bus cable
stops all transmission
30
Ring Topology
C
D
B
31
Ring Topology
32
Ring Topology
• Pros:
– Easy to install
– Easy to identify fault
• Cons:
– Delay in large ring
– Break in the ring stops all
transmission
33
Hybrid Topologies
1 2 3 4 5 6 7 8 9 101112 1 2 3 4 5 6 7 8 9 10 11 12
10M100M
ACT ACT
PWR UPLINK
COL COL
SWITCH 131415161718192021222324 13 14 15 16 17 18 19 20 21 22 23 24
1 2 3 4 5 6 7 8 9 101112 1 2 3 4 5 6 7 8 9 10 11 12
10M100M
ACT ACT
PWR UPLINK
COLCOL
SWITCH 131415161718192021222324 13 14 15 16 17 18 19 20 21 22 23 24
34
Network Categories
• Local Area Network (LAN)
• Wide Area Network (WAN)
• Metropolitan Area Network (MAN)
35
Local Area Networks
• Network in a single office, building, or campus
36
Wide Area Networks
• Network providing long-distance communication
over a country, a continent, or the whole world
37
Metropolitan Area Networks
• Network extended over an entire city
Bangkhen Kampangsaen
39
Switching
• Dedicated circuits
• Circuit switching
– Telephone switches
establish circuits
for communication
• Packet switching
– Data are put into
packets telephone
switch
– Each stamped with
source and destination
addresses
– Routers know where to
forward packets
Packet Router
40
Network of Networks
Company A Company B
Network Interface Card (NIC)
Company C Company D
41
Internetworking
• How to allow devices from different standards
to communicate
• Gateways/routers – devices capable of
communicating in several standards
Network1 Network2
Gateway
Network3
43
The Internet
• The largest internetwork (network of networks) in
the world
• Devices communicating with TCP/IP protocol suite
Stanford U. of Utah
UC Santa Barbara
UCLA
44
Summary
• Data communication
– Protocols and standards
• Computer networks
– Topologies
– LAN/MAN/WAN
• Internetworks (networks of networks)
45
2-1 LAYERED TASKS
2.46
Figure 2.1 Tasks involved in sending a letter
2.47
2-2 THE OSI MODEL
Established in 1947, the International Standards
Organization (ISO) is a multinational body dedicated to
worldwide agreement on international standards. An ISO
standard that covers all aspects of network
communications is the Open Systems Interconnection (OSI)
model. It was first introduced in the late 1970s.
2.49
Figure 2.2 Seven layers of the OSI model
2.50
Figure 2.3 The interaction between layers in the OSI model
2.51
Figure 2.4 An exchange using the OSI model
2.52
2-3 LAYERS IN THE OSI MODEL
2.53
Figure 2.5 Physical layer
2.54
Note
2.55
Figure 2.6 Data link layer
2.56
Note
2.57
Figure 2.7 Hop-to-hop delivery
2.58
Figure 2.8 Network layer
2.59
Note
2.60
Figure 2.9 Source-to-destination delivery
2.61
Figure 2.10 Transport layer
2.62
Note
2.63
Figure 2.11 Reliable process-to-process delivery of a message
2.64
Figure 2.12 Session layer
2.65
Note
2.66
Figure 2.13 Presentation layer
2.67
Note
2.68
Figure 2.14 Application layer
2.69
Note
2.70
Figure 2.15 Summary of layers
2.71
2-4 TCP/IP PROTOCOL SUITE
2.73
2-5 ADDRESSING
2.74
Figure 2.17 Addresses in TCP/IP
2.75
Figure 2.18 Relationship of layers and addresses in TCP/IP
2.76
Example 2.1
2.77
Figure 2.19 Physical addresses
2.78
Example 2.2
07:01:02:01:2C:4B
2.79
Example 2.3
2.80
Figure 2.20 IP addresses
2.81
Example 2.4
2.82
Figure 2.21 Port addresses
2.83
Note
2.84
Example 2.5
753
2.85
Outline
• Circuit vs. packet switching
• Layered tasks
• Internet protocol suites
• ISO's OSI model
86
End-to-End Communication
• Direct communication
– Most basic TX
form of communication
TX
RX RX
GND GND Serial Port
• Internet communication
– Communication is performed over the Internet
Internet
87
Internet Comm. - App's Viewpoint
• Two network applications should interact as if
they werewrite
directly connected read
App App
A B
Internet
91
Real World Example
• Communication between managers of two
companies
Communicate
92
What Actually Happens
• Communication takes place thru many layers
Logical communication
Secretary:
Secretary: reads and reports
types a letter the message
Postal truck
Post office:
Processes and routes the letter
93
Internet Layer Model
• The Internet Protocol Stack
User
Application Layer Software
Transport Layer
Network Layer
Data Link Layer
Physical Layer Hardware
Transmission
Medium
96
Application Layer
Responsible for providing services to the user
• The only layer to interact with user
Data Data
Logical communication
97
Transport Layer
Responsible for delivery of a message
from one process to another
• Duties/services
– Port addressing
– Segmentation and reassembly
– Connection control
– Flow control (end-to-end)
– Error control (end-to-end)
98
Transport Layer
Process Process … Process Process …
PORT # PORT #
Data Data
99
Network Layer
Responsible for the delivery of packets
from the original source to the destination
• Duties/services
– Logical addressing
– Routing
100
Network Layer
from Transport to Transport
Data Data
101
Network Layer
Data 1.1 5.7
1.1, 1.2, 6.1, 5.7, ... are logical addresses
1.1 1.2
Network 1
R1
6.1
Network 6
6.6 6.3
R3
R2 5.2
Router
3.3
Network 5
5.7
Network 3
3.8
102
Data Link Layer
Responsible for transmitting frames
from one node to the next
• Duties/services
– Framing
– Physical addressing
– Flow control (hop-to-hop)
– Error control (hop-to-hop)
– Access control
103
Data Link Layer
from Network to Network
Data Data
104
Data Link Layer
A3, 3B, 82, 9F, ... are physical addresses
Data
9F 3B 82 A3
T2 Data 9F A3
H2
105
Data 1.1 5.7
Data Link Layer
1.1 1.2
97 32 Network 1
Data 1.1 5.7 97 25 25
R1
6.1
79 Data 1.1 5.7 79 62 Network 6
6.6 6.3 62
12
R3
R2 5.2
54
88
3.3
Data 1.1 5.7 54 74
Network 5
5.7
Network 3 74
3.8
106
Physical Layer
Responsible for transmitting individual bits
from one node to the next
• Duties/services
– Physical characteristics of interfaces
and media
– Representation of bits
– Data rate (transmission rate)
– Synchronization of bits
107
Physical Layer
from Data Link to Data Link
Data Data
Transmission medium
108
The Big Picture
L5 data H5 5 5 L5 data H5
L4 data H4 4 4 L4 data H4
L3 data H3 3 3 L3 data H3
T2 L2 data H2 2 2 T2 L2 data H2
0111011010101001010101001 1 1 0111010101010010101010101
Transmission medium
109
Internet Model
sender router
router receiver
Application Application
Transport Transport
Network Network Network Network
Data Link D.L. D.L. D.L. D.L. Data Link
Physical P.L. P.L. P.L. P.L. Physical
111
Protocol Suites
• A set of protocols must be constructed
– to ensure that the resulting communication
system is complete and efficient
• Each protocol should handle a part of
communication not handled by other
protocols
• How can we guarantee that protocols work
well together?
– Instead of creating each protocol in isolation,
protocols are designed in complete, cooperative 112
112
Internet Protocol Suite
Layer Protocols
Application HTTP, FTP, Telnet, SMTP, ...
Transport TCP, UDP, SCTP, ...
Network IP (IPv4), IPv6, ICMP, IGMP, ...
Data Link Ethernet, Wi-Fi, PPP, ...
Physical RS-232, DSL, 10Base-T, ...
113
OSI Model
User • OSI – Open Systems
7.Application Layer Interconnection
6.Presentation Layer • Developed by the International
Standards Organizations (ISO)
5.Session Layer
4.Transport Layer
3.Network Layer • Two additional layers
2.Data Link Layer – Presentation layer
1.Physical Layer – Session layer
Transmission
Medium
114
Session Layer
Responsible for establishing, managing and
terminating connections between applications
• Duties/services
– Interaction management
Simplex, half-duplex, full-duplex
– Session recovery
115
Presentation Layer
Responsible for handling differences in
data representation to applications
• Duties/services
– Data translation
– Encryption
– Decryption
– Compression
116