Computer Networks -...
-
Upload
duongkhanh -
Category
Documents
-
view
219 -
download
5
Transcript of Computer Networks -...
CSomputer
cience
Foundations
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 1 / 21
COS 140: Foundations of Computer Science
Computer Networks
Fall 2017
CSomputer
cience
Foundations
Homework, announcements
Overview
Some Details
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 2 / 21
• New chapter (23) online
• No homework assigned today, sorry!
CSomputer
cience
Foundations
What are Computer Networks?
Overview
• What are they?
• Types of Networks
Some Details
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 3 / 21
• Multiple computers that are connected in some way
◦ Directly
◦ Via hubs, bridges, gateways, relays, routers, . . .
• The connected computers can communicate with each other
◦ Communication protocol
◦ Formal or ad hoc
◦ Idiosyncratic or standard
CSomputer
cience
Foundations
Why have computer networks?
Overview
• What are they?
• Types of Networks
Some Details
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 4 / 21
• General public: WWW, e-mail, e-commerce. . .
• Business: e-commerce, b-to-b transactions, data sharing,
communication, synchronization of business processes. . .
• Science: data sharing, communication (formal, informal), CPU
sharing/grids. . .
• Military: data sharing, synchronization, communication, control of
assets. . .
CSomputer
cience
Foundations
Origins
Overview
• What are they?
• Types of Networks
Some Details
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 5 / 21
• Hard to imagine 1st-world life w/o Internet & Web
◦ But networks very young: 1st remote login in 1969
◦ The Internet is even younger: public use in late 80s
◦ The Web is younger still: mid-90s
• Why did computer scientists invent them?
◦ Resource sharing: programs, data, equipment
◦ Increase reliability: alternate sources of supply (CPU, disk)
◦ Economics:
• Make full use of expensive mainframes
• Later: network of small computers cheaper than single,
powerful machine (e.g., Beowulf cluster)
◦ Communication between computer scientists
CSomputer
cience
Foundations
From networks → the Internet
Overview
• What are they?
• Types of Networks
Some Details
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 6 / 21
• DoD:
◦ Better communication within military
◦ National security demands nationwide communication, even
in face of nuclear war
◦ Existing communication infrastructure: vulnerable
◦ Develop a distributed communication scheme that can survive
attack
◦ ⇒ ARPANET (early 70s)
• Academics/NSF ⇒ CSNET, NSFNET (early to mid-80s)
• “The Internet”/Commercial access (early to mid-90s; ARPANET,
NSFNET retired)
CSomputer
cience
Foundations
Types of Networks
Overview
• What are they?
• Types of Networks
Some Details
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 7 / 21
• One extreme: Local Area Networks (LAN)
◦ Computers are in the same building
◦ Have control over the way the computers are set up
◦ Can have dedicated lines which connect the computers
• The other: Wide Area Networks (WAN)
◦ Great phys. distance might separate computers
◦ May not have a lot of control over all of the computers (may
be from several companies, universities, etc.)
◦ Creating the connection can be much more expensive
• Between the two:
◦ Intranets
◦ Metropolitan Area Networks
CSomputer
cience
Foundations
What is a network, really?
Overview
Some Details
• What is a network,
really?
• Interfacing with the
Network
• Store-and-Forward
Networks
• Network Topology
• Broadcast &
point-to-point
• Buses and Broadcast
Channels
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 8 / 21
• A network is a set of computers connected by communication
channels
• Physical channel may be: wires (twisted pair, coax), fiber, radio
(Wi-Fi, e.g.), other
• One computer communicates with another via causing changes
to the channel such that the other can detect them.
• Examples:
◦ Voltages
◦ Properties of the voltage (e.g.) in the wire: amplitude,
frequency
◦ Light pulses
◦ Properties of radio waves
CSomputer
cience
Foundations
Interfacing with the Network
Overview
Some Details
• What is a network,
really?
• Interfacing with the
Network
• Store-and-Forward
Networks
• Network Topology
• Broadcast &
point-to-point
• Buses and Broadcast
Channels
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 9 / 21
• Computers on the network ≡ hosts
• A host is connected to the network (to the channel) via its
network controller – e.g., a network card
• Controller puts information from host into the network (by
modulating something about the channel) and getting information
from the network
• Originally, several hosts might share their connection to the
network; now single host per network controller card
CSomputer
cience
Foundations
Beyond the controller
Overview
Some Details
• What is a network,
really?
• Interfacing with the
Network
• Store-and-Forward
Networks
• Network Topology
• Broadcast &
point-to-point
• Buses and Broadcast
Channels
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 10 / 21
• Hubs: connect group of computers to network – repeater, or with
an internal network
• Bridge: between LANs of same type (e.g., Ethernets)
• Router (original ARPANET name: Interface Message Processors,
IMPS): route information packets between hosts or LANs
CSomputer
cience
Foundations
Store-and-Forward Networks
Overview
Some Details
• What is a network,
really?
• Interfacing with the
Network
• Store-and-Forward
Networks
• Network Topology
• Broadcast &
point-to-point
• Buses and Broadcast
Channels
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 11 / 21
• A unit of information to be transferred is called a packet
• Packet arrives at router, which stores it until the output line is free
and it can be forwarded to the next router
• Ultimately, final router delivers it to the recipient host
• Also called point-to-point or packet switched.
CSomputer
cience
Foundations
Network Topology
Overview
Some Details
• What is a network,
really?
• Interfacing with the
Network
• Store-and-Forward
Networks
• Network Topology
• Broadcast &
point-to-point
• Buses and Broadcast
Channels
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 12 / 21
• Which hosts and routers are connected to each other.
• Possible topologies include: bus, ring, tree, complete, irregular –
possibly with hub topology overlaid
• In LANs, often can design the topology so hosts are connected
for maximum efficiency.
• In WANs, have irregular topologies because may have little
control over connections, or may add in subnets eliminating
ability to make a global design.
• Difference between internets and the Internet
CSomputer
cience
Foundations
Broadcast vs Point-to-Point Channels
Overview
Some Details
• What is a network,
really?
• Interfacing with the
Network
• Store-and-Forward
Networks
• Network Topology
• Broadcast &
point-to-point
• Buses and Broadcast
Channels
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 13 / 21
• Broadcast channel (or protocol):
◦ All hosts get all of the messages.
◦ Messages marked with intended recipient so can be ignored
by others.
• Point-to-point: targeted toward particular host
• Multicast: subscribers get all packets
CSomputer
cience
Foundations
Buses and Broadcast Channels
Overview
Some Details
• What is a network,
really?
• Interfacing with the
Network
• Store-and-Forward
Networks
• Network Topology
• Broadcast &
point-to-point
• Buses and Broadcast
Channels
Network Protocols
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 14 / 21
• Networks with broadcast channels can be buses
• They are different from what we have studied about system
buses because:
◦ Routers and host computers linked to bus, not devices
associated with computers.
• They are like what we have studied about system buses because:
◦ Need to protect against more than one computer trying to
communicate at a time.
CSomputer
cience
Foundations
Protocols
Overview
Some Details
Network Protocols
• Protocols
• Example: Business
Correspondence
• Layered Architectures
for Networks
• ISO OSI Standard
• TCP/IP
• TCP/IP Layers
• Standards
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 15 / 21
• Specifications for interaction between entities.
• If two computers use the same protocols, they can interact.
• Allows the processing of the computers to be hidden.
◦ Abstracts a computer to the protocol.
◦ What is sent/received and when: defined by protocol
◦ How the computer implements the protocol – solely
responsibility of computer/OS designer
CSomputer
cience
Foundations
Example: Business Correspondence
Overview
Some Details
Network Protocols
• Protocols
• Example: Business
Correspondence
• Layered Architectures
for Networks
• ISO OSI Standard
• TCP/IP
• TCP/IP Layers
• Standards
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 16 / 21
• Several levels of interaction on both sides:
◦ Correspondents
◦ Secretaries
◦ Post offices/mail rooms
• Can consider each level to be communicating with the same level
in other correspondent.
• Communication really goes to bottom layer and then back up.
• At each level, communication happens in a way particular to that
level.
• Communication between layers is also specified.
CSomputer
cience
Foundations
Layered Architectures for Networks
Overview
Some Details
Network Protocols
• Protocols
• Example: Business
Correspondence
• Layered Architectures
for Networks
• ISO OSI Standard
• TCP/IP
• TCP/IP Layers
• Standards
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 17 / 21
• Way to modularize the problem so can focus on a section at a
time and ignore other details.
• Separate protocols for each layer, so the same layer appears to
communicate between machines.
• Interfaces between layers are also specified so the proper
information is passed up and down the hierarchy.
• Physical layer at the bottom actually passes the bits.
CSomputer
cience
Foundations
ISO OSI Standard
Overview
Some Details
Network Protocols
• Protocols
• Example: Business
Correspondence
• Layered Architectures
for Networks
• ISO OSI Standard
• TCP/IP
• TCP/IP Layers
• Standards
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 18 / 21
• Application layer - provides user with services that are needed,
such as e-mail, file transfer, remote job entry
• Presentation layer - Concerned with syntax and semantics of the
bits; interpret the bits as characters, etc.; data compression
• Session layer - Allows users on a different machine to establish a
session which has some services like file transfer or remote log in
• Transport layer - prepare data for the network layer and make
sure it arrives error-free
• Network layer - operation of subnet; packet routing
• Data link layer - find data intended to be sent; remove errors from
transmissions
• Physical layer - transmitting bits over the communication channel
CSomputer
cience
Foundations
TCP/IP
Overview
Some Details
Network Protocols
• Protocols
• Example: Business
Correspondence
• Layered Architectures
for Networks
• ISO OSI Standard
• TCP/IP
• TCP/IP Layers
• Standards
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 19 / 21
• Started in USA; DoD model
• The major worldwide protocol – the Internet protocol
• Missing some of the layers in ISO/OSI
CSomputer
cience
Foundations
TCP/IP Layers
Overview
Some Details
Network Protocols
• Protocols
• Example: Business
Correspondence
• Layered Architectures
for Networks
• ISO OSI Standard
• TCP/IP
• TCP/IP Layers
• Standards
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 20 / 21
• Application layer – Same as OSI’s
◦ Sometimes considered as part of TCP/IP◦ Ex: HTTP, FTP, ...
• Transport layer – OSI’s transport and session layers
◦ Transport Control Protocol (TCP) – connection-oriented◦ Guarantees packets arrive in order, retransmitting as needed◦ Also User Datagram Protocol (UDP; connectionless), others
• Internetwork layer – OSI’s network layer
◦ Internet Protocol, or IP
• Link layer – Corresponds to OSI’s physical and data link layers
◦ E.g.: Ethernet, Wi-Fi
CSomputer
cience
Foundations
A Word About Standards
Overview
Some Details
Network Protocols
• Protocols
• Example: Business
Correspondence
• Layered Architectures
for Networks
• ISO OSI Standard
• TCP/IP
• TCP/IP Layers
• Standards
Copyright c© 2002–2017 UMaine School of Computing and Information Science – 21 / 21
• Especially important when have issues of interoperability
• Often have de facto standards that are set by large groups of
users of corporations
• Standards need to be set between research and industry interest
groups