Computer Network
By svvota
Apr 24, 2013
1789 Words
Bahçeşehir University Department of Computer Engineering
CMPE 2204 Introduction to Computer Networks Spring 2013
Chapter 1 Data Communications and Networks Overview and Protocol Layers Dr. Çağrı Güngör
1
Basic Info about the Course
• Course Content (tentative):
— Computer networks; network architectures; protocol layers; TCP/IP; principles of Internet; wireless networks; introduction to network management, etc..
• Course Objectives:
— Understand widely known network protocols, communication architectures, and wireless networks, — Learn TCP/IP and protocol layers, — Get a basic understanding of network management, etc.
Bahcesehir Univeristy CMPE 2204
2
Text Books
• J. Kurose, K. Ross, “Computer Networking: A Top Down Approach,” Addison-Wesley, 5th edition, March 2009.
•
W. Stallings, “Data and Computer Communications,” Prentice Hall, 8th edition, 2007. B. Forouzan, “Data Communications and Networking,” McGraw-Hill, 4th edition, 2007. Bahcesehir Univeristy CMPE 2204
3
•
Grading
• You will have:
— — — — 1 Midterm Quiz 1 Class Project 1 Final : : : : 25 10 25 40 % % % %
• NO MERCY ABOUT CHEATING !!!
Bahcesehir Univeristy CMPE 2204
4
Internet Infrastructure
Bahcesehir Univeristy CMPE 2204
5
Interesting Internet Appliances
Web-enabled toaster + weather forecaster
IP picture frame http://www.ceiva.com/
World’s smallest web server http://www-ccs.cs.umass.edu/~shri/iPic.html
Internet phones
6
Bahcesehir Univeristy CMPE 2204
Networks are complex !!!
• Many “pieces”:
— Various applications, hosts, routers, protocols hardware, software
• The complexity of the communication task is reduced by using multiple protocol layers: — Each protocol is implemented independently — Each protocol is responsible for a specific subtask — Protocols are grouped in a hierarchy
• A structured set of protocols is called a communications architecture or protocol suite Bahcesehir Univeristy CMPE 2204
7
Simplified Communications Model - Diagram
Bahcesehir Univeristy CMPE 2204
8
A Communications Model
• Source
—generates data to be transmitted
• Transmitter
—Converts data into transmittable signals
• Transmission System
—Carries data
• Receiver
—Converts received signal into data
• Destination
—Takes incoming data
Bahcesehir Univeristy CMPE 2204
9
Simplified Data Communications Model
Bahcesehir Univeristy CMPE 2204
10
Examples of Communications Tasks
Transmission system utilization Interfacing Signal generation Addressing Routing Recovery
Synchronization
Exchange management Error detection and correction Flow control
Message formatting
Security Network management
Bahcesehir Univeristy CMPE 2204
11
Networking
• Point to point communication is usually not practical
—Devices are too far apart —Large set of devices would need impractical number of connections
• Solution is a communications network • Network Types:
—Wide Area Network (WAN) —Local Area Network (LAN) —Metropolitan Area Networks (MAN) Bahcesehir Univeristy CMPE 2204
12
Data Flow Types
Bahcesehir Univeristy CMPE 2204
13
Connection Types
Bahcesehir Univeristy CMPE 2204
14
Categories of Topology
Bahcesehir Univeristy CMPE 2204
15
Mesh Topology
Bahcesehir Univeristy CMPE 2204
16
Star Topology
Bahcesehir Univeristy CMPE 2204
17
Bus Topology
Bahcesehir Univeristy CMPE 2204
18
Ring Topology
Bahcesehir Univeristy CMPE 2204
19
Hybrid Topology: A star backbone with three bus networks
Bahcesehir Univeristy CMPE 2204
20
Network Types
A. Wide Area Network (WAN) B. Local Area Network (LAN) C. Metropolitan Area Networks (MAN)
Bahcesehir Univeristy CMPE 2204
21
A. Wide Area Networks
• • • • Covers large geographical area Circuits provided by a common carrier High-speed WANs use optical fiber Technologies: 1. 2. 3. 4. Circuit switching Packet switching Frame relay Asynchronous Transfer Mode (ATM)
Bahcesehir Univeristy CMPE 2204
22
1. Circuit Switching
• Dedicated communications path established for the duration of the conversation (guaranteed service) — e.g., telephone network
• Network resources (e.g., bandwidth) divided into “pieces”: — Call setup required — Pieces allocated to users
• Dividing link bandwidth into “pieces”:
— frequency division (FDM) — time division (TDM)
Bahcesehir Univeristy CMPE 2204
23
1. Circuit Switching: FDM and TDM
FDM
Example: 4 users frequency TDM time
frequency time
Bahcesehir Univeristy CMPE 2204
24
2. Packet Switching
• Data sent out of sequence • Small chunks (packets) of data at a time • Packets passed from node to node between source and destination • Used for terminal to computer and computer to computer communications Bahcesehir Univeristy CMPE 2204
25
2. Packet Switching
• Great for bursty data
—Resource sharing —Simpler, no call setup
• Excessive congestion: packet delay and loss
—Protocols needed for reliable data transfer and congestion control
• Challenge: How to provide performance QoS?
—Bandwidth guarantees needed for audio/video apps —Still an unsolved problem Bahcesehir Univeristy CMPE 2204
26
3. Frame Relay
• Packet switching systems have large overheads to compensate for errors
• Modern systems are more reliable
• Errors can be caught in end system • Most overhead for error control is stripped out
Bahcesehir Univeristy CMPE 2204
27
4. Asynchronous Transfer Mode (ATM)
• Evolution of frame relay • Little overhead for error control • Fixed packet (called cell) length • Anything from 10Mbps to Gbps • Constant data rate using packet switching technique
Bahcesehir Univeristy CMPE 2204
28
B. Local Area Networks (LAN)
• Smaller scope
—Building or small campus
• Usually owned by same organization as attached devices • Data rates much higher • Usually broadcast systems Bahcesehir Univeristy CMPE 2204
29
LAN Configurations
• Switched
—Switched Ethernet
• May be single or multiple switches
—ATM LAN —Fibre Channel
• Wireless
—Mobility —Ease of installation
Bahcesehir Univeristy CMPE 2204
30
Differences between LANs and WANs
• Scope of a LAN is smaller — LAN interconnects devices within a single building or cluster of buildings
• LAN usually owned by organization that owns the attached devices — For WANs, most of network assets are not owned by same organization • Internal data rate of LAN is much greater
Bahcesehir Univeristy CMPE 2204
31
C. Metropolitan Area Networks (MAN)
• Middle ground between LAN and WAN • Private or public network • High speed • Large area
Bahcesehir Univeristy CMPE 2204
32
The Need for MANs
• Traditional point-to-point and switched network techniques used in WANs are inadequate for growing needs of organizations • Need for high capacity and low costs over large area • MAN provides: —Service to customers in metropolitan areas —Required capacity —Lower cost and greater efficiency than equivalent service from telephone company Bahcesehir Univeristy CMPE 2204
33
Key Features of a Protocol
• Syntax —Concerns the format of the data blocks
• Semantics —Includes control information for coordination and error handling • Timing —Includes speed matching and sequencing
Bahcesehir Univeristy CMPE 2204
34
Standardized Protocol Architectures
• Required for devices to communicate • Vendors have more marketable products • Customers can insist on standards based equipment • Two standards: —OSI Reference model
• Never lived up to early promises
—TCP/IP protocol suite
• Most widely used
Bahcesehir Univeristy CMPE 2204
35
OSI Model - 1
• Open Systems Interconnection • Developed by the International Organization for Standardization (ISO) • Seven layers • A theoretical system delivered too late! • TCP/IP model is the de facto standard
Bahcesehir Univeristy CMPE 2204
36
OSI Model - 2
• A layer model • Each layer performs a subset of the required communication functions • Each layer relies on the next lower layer to perform more primitive functions • Each layer provides services to the next higher layer • Changes in one layer should not require changes in other layers Bahcesehir Univeristy CMPE 2204
37
Layers of the OSI Model
• • • • • • • Application Presentation Session Transport Network Data link Physical
Bahcesehir Univeristy CMPE 2204
38
OSI Layers
• Physical
—Physical interface between devices
• • • • Mechanical Electrical Functional Procedural
• Data Link
—Means of activating, maintaining and deactivating a reliable link —Error detection and control —Higher layers may assume error free transmission Bahcesehir Univeristy CMPE 2204
39
OSI Layers (Cont’ d.)
• Network
— Transport of information — Higher layers do not need to know about underlying technology — Not needed on direct links
• Transport
— Exchange of data between end systems — Error free — In sequence — No losses — No duplicates — Quality of service
Bahcesehir Univeristy CMPE 2204
40
OSI Layers (Cont’ d.)
• Session
—Control of dialogues between applications —Dialogue discipline —Grouping —Recovery
• Presentation
—Data formats and coding —Data compression —Encryption
• Application
—Means for applications to access OSI environment
Bahcesehir Univeristy CMPE 2204
41
Summary of OSI Layers
Bahcesehir Univeristy CMPE 2204
42
Use of a Relay
Bahcesehir Univeristy CMPE 2204
43
TCP/IP Protocol Architecture
• Developed by the US Defense Advanced Research Project Agency (DARPA) for its packet switched network (ARPANET) • Used by the global Internet • No official model but a working one. —Application layer —Transport layer (Host-to-host) —Routing layer (Internet) —Data link layer (Network Access) —Physical layer Bahcesehir Univeristy CMPE 2204
44
TCP/IP and OSI model
Bahcesehir Univeristy CMPE 2204
45
Physical Layer
• Physical interface between data transmission device (e.g. computer) and transmission medium or network • Physical layer specifies: —Characteristics of the transmission medium —The nature of the signals —The data rate
Bahcesehir Univeristy CMPE 2204
46
Data Link Layer
• Concerned with the exchange of data between an end system and the network to which it's attached
• Software used depends on type of network —Circuit switching —Packet switching (e.g., X.25) —LANs (e.g., Ethernet)
Bahcesehir Univeristy CMPE 2204
47
Routing Layer (IP)
• Uses internet protocol (IP) • Provides routing functions to allow data to traverse multiple interconnected networks • Implemented in end systems and routers
Bahcesehir Univeristy CMPE 2204
48
Transport Layer (TCP)
• Commonly uses transmission control protocol (TCP)
• Provides reliability during data exchange
—Completeness —Order
Bahcesehir Univeristy CMPE 2204
49
Application Layer
• Logic supports user applications • Uses separate modules that are peculiar to each different type of application • E.g., http, SMPT
Bahcesehir Univeristy CMPE 2204
50
Common TCP/IP Applications
• Simple mail transfer protocol (SMTP)
—Provides a basic electronic mail facility
• File Transfer Protocol (FTP)
—Allows files to be sent from one system to another
• TELNET
—Provides a remote logon capability
Bahcesehir Univeristy CMPE 2204
51
TCP/IP Architecture Dominance
• TCP/IP protocols matured quicker than similar OSI protocols —When the need for interoperability across networks was recognized, only TCP/IP was available and ready to go
• OSI model is unnecessarily complex —Accomplishes in seven layers what TCP/IP does with fewer layers Bahcesehir Univeristy CMPE 2204
52
TCP
• Usual transport layer is Transmission Control Protocol
— Reliable connection
• Connection
— Temporary logical association between entities in different systems
• TCP PDU
— Called TCP segment — Includes source and destination port (c.f. SAP) • Identify respective users (applications) • Connection refers to pair of ports
• TCP tracks segments between entities on each connection
Bahcesehir Univeristy CMPE 2204
53
UDP
• • • • • • Alternative to TCP is User Datagram Protocol Not guaranteed delivery No preservation of sequence No protection against duplication Minimum overhead Adds port addressing to IP
Bahcesehir Univeristy CMPE 2204
54
Some Protocols in TCP/IP Suite
Bahcesehir Univeristy CMPE 2204
55
Internetworking Terms
• Communication network – facility that provides a data transfer service among devices attached to the network • Internet – collection of communication networks, interconnected by bridges/routers • Intranet – internet used by an organization for internal purposes — Provides key Internet applications — Can exist as an isolated, self-contained internet
• Bandwidth – the amount of data that can pass through a network interface over time.
Bahcesehir Univeristy CMPE 2204
56
Internetworking Terms
• End System (ES) – device used to support end-user applications or services • Bridge – used to connect two LANs that use similar LAN protocols • Router – used to connect two networks that may or may not be similar
Bahcesehir Univeristy CMPE 2204
57
CMPE 2204 Introduction to Computer Networks Spring 2013
Chapter 1 Data Communications and Networks Overview and Protocol Layers Dr. Çağrı Güngör
1
Basic Info about the Course
• Course Content (tentative):
— Computer networks; network architectures; protocol layers; TCP/IP; principles of Internet; wireless networks; introduction to network management, etc..
• Course Objectives:
— Understand widely known network protocols, communication architectures, and wireless networks, — Learn TCP/IP and protocol layers, — Get a basic understanding of network management, etc.
Bahcesehir Univeristy CMPE 2204
2
Text Books
• J. Kurose, K. Ross, “Computer Networking: A Top Down Approach,” Addison-Wesley, 5th edition, March 2009.
•
W. Stallings, “Data and Computer Communications,” Prentice Hall, 8th edition, 2007. B. Forouzan, “Data Communications and Networking,” McGraw-Hill, 4th edition, 2007. Bahcesehir Univeristy CMPE 2204
3
•
Grading
• You will have:
— — — — 1 Midterm Quiz 1 Class Project 1 Final : : : : 25 10 25 40 % % % %
• NO MERCY ABOUT CHEATING !!!
Bahcesehir Univeristy CMPE 2204
4
Internet Infrastructure
Bahcesehir Univeristy CMPE 2204
5
Interesting Internet Appliances
Web-enabled toaster + weather forecaster
IP picture frame http://www.ceiva.com/
World’s smallest web server http://www-ccs.cs.umass.edu/~shri/iPic.html
Internet phones
6
Bahcesehir Univeristy CMPE 2204
Networks are complex !!!
• Many “pieces”:
— Various applications, hosts, routers, protocols hardware, software
• The complexity of the communication task is reduced by using multiple protocol layers: — Each protocol is implemented independently — Each protocol is responsible for a specific subtask — Protocols are grouped in a hierarchy
• A structured set of protocols is called a communications architecture or protocol suite Bahcesehir Univeristy CMPE 2204
7
Simplified Communications Model - Diagram
Bahcesehir Univeristy CMPE 2204
8
A Communications Model
• Source
—generates data to be transmitted
• Transmitter
—Converts data into transmittable signals
• Transmission System
—Carries data
• Receiver
—Converts received signal into data
• Destination
—Takes incoming data
Bahcesehir Univeristy CMPE 2204
9
Simplified Data Communications Model
Bahcesehir Univeristy CMPE 2204
10
Examples of Communications Tasks
Transmission system utilization Interfacing Signal generation Addressing Routing Recovery
Synchronization
Exchange management Error detection and correction Flow control
Message formatting
Security Network management
Bahcesehir Univeristy CMPE 2204
11
Networking
• Point to point communication is usually not practical
—Devices are too far apart —Large set of devices would need impractical number of connections
• Solution is a communications network • Network Types:
—Wide Area Network (WAN) —Local Area Network (LAN) —Metropolitan Area Networks (MAN) Bahcesehir Univeristy CMPE 2204
12
Data Flow Types
Bahcesehir Univeristy CMPE 2204
13
Connection Types
Bahcesehir Univeristy CMPE 2204
14
Categories of Topology
Bahcesehir Univeristy CMPE 2204
15
Mesh Topology
Bahcesehir Univeristy CMPE 2204
16
Star Topology
Bahcesehir Univeristy CMPE 2204
17
Bus Topology
Bahcesehir Univeristy CMPE 2204
18
Ring Topology
Bahcesehir Univeristy CMPE 2204
19
Hybrid Topology: A star backbone with three bus networks
Bahcesehir Univeristy CMPE 2204
20
Network Types
A. Wide Area Network (WAN) B. Local Area Network (LAN) C. Metropolitan Area Networks (MAN)
Bahcesehir Univeristy CMPE 2204
21
A. Wide Area Networks
• • • • Covers large geographical area Circuits provided by a common carrier High-speed WANs use optical fiber Technologies: 1. 2. 3. 4. Circuit switching Packet switching Frame relay Asynchronous Transfer Mode (ATM)
Bahcesehir Univeristy CMPE 2204
22
1. Circuit Switching
• Dedicated communications path established for the duration of the conversation (guaranteed service) — e.g., telephone network
• Network resources (e.g., bandwidth) divided into “pieces”: — Call setup required — Pieces allocated to users
• Dividing link bandwidth into “pieces”:
— frequency division (FDM) — time division (TDM)
Bahcesehir Univeristy CMPE 2204
23
1. Circuit Switching: FDM and TDM
FDM
Example: 4 users frequency TDM time
frequency time
Bahcesehir Univeristy CMPE 2204
24
2. Packet Switching
• Data sent out of sequence • Small chunks (packets) of data at a time • Packets passed from node to node between source and destination • Used for terminal to computer and computer to computer communications Bahcesehir Univeristy CMPE 2204
25
2. Packet Switching
• Great for bursty data
—Resource sharing —Simpler, no call setup
• Excessive congestion: packet delay and loss
—Protocols needed for reliable data transfer and congestion control
• Challenge: How to provide performance QoS?
—Bandwidth guarantees needed for audio/video apps —Still an unsolved problem Bahcesehir Univeristy CMPE 2204
26
3. Frame Relay
• Packet switching systems have large overheads to compensate for errors
• Modern systems are more reliable
• Errors can be caught in end system • Most overhead for error control is stripped out
Bahcesehir Univeristy CMPE 2204
27
4. Asynchronous Transfer Mode (ATM)
• Evolution of frame relay • Little overhead for error control • Fixed packet (called cell) length • Anything from 10Mbps to Gbps • Constant data rate using packet switching technique
Bahcesehir Univeristy CMPE 2204
28
B. Local Area Networks (LAN)
• Smaller scope
—Building or small campus
• Usually owned by same organization as attached devices • Data rates much higher • Usually broadcast systems Bahcesehir Univeristy CMPE 2204
29
LAN Configurations
• Switched
—Switched Ethernet
• May be single or multiple switches
—ATM LAN —Fibre Channel
• Wireless
—Mobility —Ease of installation
Bahcesehir Univeristy CMPE 2204
30
Differences between LANs and WANs
• Scope of a LAN is smaller — LAN interconnects devices within a single building or cluster of buildings
• LAN usually owned by organization that owns the attached devices — For WANs, most of network assets are not owned by same organization • Internal data rate of LAN is much greater
Bahcesehir Univeristy CMPE 2204
31
C. Metropolitan Area Networks (MAN)
• Middle ground between LAN and WAN • Private or public network • High speed • Large area
Bahcesehir Univeristy CMPE 2204
32
The Need for MANs
• Traditional point-to-point and switched network techniques used in WANs are inadequate for growing needs of organizations • Need for high capacity and low costs over large area • MAN provides: —Service to customers in metropolitan areas —Required capacity —Lower cost and greater efficiency than equivalent service from telephone company Bahcesehir Univeristy CMPE 2204
33
Key Features of a Protocol
• Syntax —Concerns the format of the data blocks
• Semantics —Includes control information for coordination and error handling • Timing —Includes speed matching and sequencing
Bahcesehir Univeristy CMPE 2204
34
Standardized Protocol Architectures
• Required for devices to communicate • Vendors have more marketable products • Customers can insist on standards based equipment • Two standards: —OSI Reference model
• Never lived up to early promises
—TCP/IP protocol suite
• Most widely used
Bahcesehir Univeristy CMPE 2204
35
OSI Model - 1
• Open Systems Interconnection • Developed by the International Organization for Standardization (ISO) • Seven layers • A theoretical system delivered too late! • TCP/IP model is the de facto standard
Bahcesehir Univeristy CMPE 2204
36
OSI Model - 2
• A layer model • Each layer performs a subset of the required communication functions • Each layer relies on the next lower layer to perform more primitive functions • Each layer provides services to the next higher layer • Changes in one layer should not require changes in other layers Bahcesehir Univeristy CMPE 2204
37
Layers of the OSI Model
• • • • • • • Application Presentation Session Transport Network Data link Physical
Bahcesehir Univeristy CMPE 2204
38
OSI Layers
• Physical
—Physical interface between devices
• • • • Mechanical Electrical Functional Procedural
• Data Link
—Means of activating, maintaining and deactivating a reliable link —Error detection and control —Higher layers may assume error free transmission Bahcesehir Univeristy CMPE 2204
39
OSI Layers (Cont’ d.)
• Network
— Transport of information — Higher layers do not need to know about underlying technology — Not needed on direct links
• Transport
— Exchange of data between end systems — Error free — In sequence — No losses — No duplicates — Quality of service
Bahcesehir Univeristy CMPE 2204
40
OSI Layers (Cont’ d.)
• Session
—Control of dialogues between applications —Dialogue discipline —Grouping —Recovery
• Presentation
—Data formats and coding —Data compression —Encryption
• Application
—Means for applications to access OSI environment
Bahcesehir Univeristy CMPE 2204
41
Summary of OSI Layers
Bahcesehir Univeristy CMPE 2204
42
Use of a Relay
Bahcesehir Univeristy CMPE 2204
43
TCP/IP Protocol Architecture
• Developed by the US Defense Advanced Research Project Agency (DARPA) for its packet switched network (ARPANET) • Used by the global Internet • No official model but a working one. —Application layer —Transport layer (Host-to-host) —Routing layer (Internet) —Data link layer (Network Access) —Physical layer Bahcesehir Univeristy CMPE 2204
44
TCP/IP and OSI model
Bahcesehir Univeristy CMPE 2204
45
Physical Layer
• Physical interface between data transmission device (e.g. computer) and transmission medium or network • Physical layer specifies: —Characteristics of the transmission medium —The nature of the signals —The data rate
Bahcesehir Univeristy CMPE 2204
46
Data Link Layer
• Concerned with the exchange of data between an end system and the network to which it's attached
• Software used depends on type of network —Circuit switching —Packet switching (e.g., X.25) —LANs (e.g., Ethernet)
Bahcesehir Univeristy CMPE 2204
47
Routing Layer (IP)
• Uses internet protocol (IP) • Provides routing functions to allow data to traverse multiple interconnected networks • Implemented in end systems and routers
Bahcesehir Univeristy CMPE 2204
48
Transport Layer (TCP)
• Commonly uses transmission control protocol (TCP)
• Provides reliability during data exchange
—Completeness —Order
Bahcesehir Univeristy CMPE 2204
49
Application Layer
• Logic supports user applications • Uses separate modules that are peculiar to each different type of application • E.g., http, SMPT
Bahcesehir Univeristy CMPE 2204
50
Common TCP/IP Applications
• Simple mail transfer protocol (SMTP)
—Provides a basic electronic mail facility
• File Transfer Protocol (FTP)
—Allows files to be sent from one system to another
• TELNET
—Provides a remote logon capability
Bahcesehir Univeristy CMPE 2204
51
TCP/IP Architecture Dominance
• TCP/IP protocols matured quicker than similar OSI protocols —When the need for interoperability across networks was recognized, only TCP/IP was available and ready to go
• OSI model is unnecessarily complex —Accomplishes in seven layers what TCP/IP does with fewer layers Bahcesehir Univeristy CMPE 2204
52
TCP
• Usual transport layer is Transmission Control Protocol
— Reliable connection
• Connection
— Temporary logical association between entities in different systems
• TCP PDU
— Called TCP segment — Includes source and destination port (c.f. SAP) • Identify respective users (applications) • Connection refers to pair of ports
• TCP tracks segments between entities on each connection
Bahcesehir Univeristy CMPE 2204
53
UDP
• • • • • • Alternative to TCP is User Datagram Protocol Not guaranteed delivery No preservation of sequence No protection against duplication Minimum overhead Adds port addressing to IP
Bahcesehir Univeristy CMPE 2204
54
Some Protocols in TCP/IP Suite
Bahcesehir Univeristy CMPE 2204
55
Internetworking Terms
• Communication network – facility that provides a data transfer service among devices attached to the network • Internet – collection of communication networks, interconnected by bridges/routers • Intranet – internet used by an organization for internal purposes — Provides key Internet applications — Can exist as an isolated, self-contained internet
• Bandwidth – the amount of data that can pass through a network interface over time.
Bahcesehir Univeristy CMPE 2204
56
Internetworking Terms
• End System (ES) – device used to support end-user applications or services • Bridge – used to connect two LANs that use similar LAN protocols • Router – used to connect two networks that may or may not be similar
Bahcesehir Univeristy CMPE 2204
57