Upload
ashlynn-hope-cook
View
223
Download
1
Tags:
Embed Size (px)
Citation preview
Chapter 12Networking, and
Distributed Computing
Introduction• Networking of computers has profoundly changed
the way that we interact and conduct business:• Internet• World Wide Web• Business• Software and application designs• Gaming• Social Media & interactions
Introduction– the central role of networking in today’s computer
systems.– various networking types and topologies.– the TCP/IP protocol stack.– the capabilities of TCP/IP’s application, transport,
network and link layers.– protocols such as HTTP, FTP, TCP, UDP, IP and IPv6.– network hardware and hardware protocols such as
Ethernet and Wireless 802.11.– the client/server networking model.
Distributed systems– Remote computers cooperate via a network to
appear as a local machine– Users are given the impression that they are
interacting with just one machine– Spread computation and storage throughout a
network of computers– Applications are able to execute code on local
machines and remote machines and to share data, files and other resources among these machines
Ethernet• Networking technologies for local area (LAN) and
larger networks.• It was commercially introduced in 1980 while it
was first standardized in 1983 as IEEE 802.3, and has since been refined to support higher bit rates and longer link distances.
• Networking: Allowing computers to communicate and exchange information– Media (cables, wires, frequency, etc.)– Protocol is set of rules:
• rules for sharing access to the media• Format for packaging data with control information
Network Types• Local area network (LAN)
– Limited geographic dispersion and designed to optimize data transfer rates between its hosts
– Interconnect resources using high-speed communication paths with optimized network protocols for local area environments
– Error rates lower than those of larger networks
– Greater management flexibility– Independence from constraints of public
networking system
• Wide area networks (WANs)– Broader than LAN, connecting two or more
LANs– Example: the Internet– Generally employ mesh topology– Operate at slower speeds than LANs and have
higher error rates
Network Topologies
Ethernet Basics• Ethernet is contention-based• Shared media (originally a cable)• Stations may compete for access to shared
media• Roots in WWII radio network• Carrier-Sense (listen before talk)• Multiple-Access (multiple stations)• Collision-Detection (listen while transmitting
to detect collisions)• CSMA-CD (Carrier Sense Multiple Access with Collision
detection)
CSMA-CD Protocol• Carrier Sense Multiple Access/Collision Detect
(CSMA/CD) is the protocol for carrier transmission access in Ethernet networks.
• How are collisions possible?– Listening is not mutually exclusive– Multiple stations listen at same time, detect idle,
transmit
• What happens when two or more stations transmit at the same time:– Collision – signals on the media are
distorted/garbled
Collision• When PC-D tries to
initiate/send a data to PC-A via hub (a half-duplex device) through it’s connected channel to hub, if some other data traffic of some other PC in the network is already coming down in the same channel through the hub down to PC-A, then the data hit each other and form a collision.
•
How does a CSMA/CD detects and avoids data collision ?
Since, CSMA/CD is a Media Access Control mechanism, whenever any PC wants to send a data, it first sends out a dummy electrical signal into the channel to check whether any incoming data traffic is coming down or the line is free. If the traffic is already coming down, then the dummy signal collides with the incoming traffic and sends back a jam signal to the PC so that, the PC is notified to hold its traffic for a random amount of time before attempting to send the data again. This process will continue until the line/channel becomes free. The moment line is free, the PC immediately initiates/send it's data to the intended destination. This is how the data collision is avoided in a half-duplex channels.
Propagation delay• Propagation delay: is a technical term that can
have a different meaning depending on the context. It can relate to networking, electronics or physics. In general it is the length of time taken for the quantity of interest to reach its destination.
• Is a time required for signal to go the distance.• How long depends on how many cable segments
and the delay of the repeaters that connect segments.
Propagation delay• Detecting collisions. Worst case is
Transmit
Collision
Detect
• Twice the propagation delay•Of the longest circuit =21.6ns
• Must add in delay of repeaters•8 repeaters @ 4.5ns each = 36ns
Propagation delay• 57.6 seconds worst case for detection
Transmit
Collision
Detect Collision
• Sender only listens while transmitting, so• Transmission must last long enough to
catch the worst-case for a collision• =57.6ns
Propagation delay• 57.6 ns seconds worst case for detection
Transmit
Collision
Detect
• Transmitting at 10million bits/second• Speed of original Ethernet• 57.6ns X 10Mbps = 576 bits• Minimum frame length is 576 bits!
Propagation delay• Propagation delay: time required for signal to
go the distance.• How long depends on how many cable
segments and the delay of the repeaters that connect segments.
• Original thick cable Ethernet: 5 segments of 500 meters each = 2500 meters
• At 77% of speed of light– 0.77 X 3 X 108 meters per second
• 2500 / 0.77 X 3 X 108 = 10.825 nanoseconds (billionths of a second)
Propagation delay• Detecting collisions. Worst case is
T
C
D
• Twice the propagation delay
10Base5 – thick wire• 10 million bits per second • 2500 meter distance (plus repeaters)• 576 bit minimum frame size• At constant fraction of speed-of-light• To run at 100 million bits per second, with
repeaters that are 10 times as fast: the 576 bits will be on the network 1/10th the time, so the distance to detect collisions must be 1/10th the distance, or 250 meters
Other media• 10Mbps, baseband signaling, media
– (broadband implies FDM)
• 10Base2 – thin wire Ethernet (like cable TV size cable)
• 10BaseT – – Ethernet on twisted-pair, rather than cable.– Star topology – all wires run to an Ethernet
concentrator or hub, now use fast switches.
Other MAC• MAC – Media Access Control• Ethernet uses CSMA/CD: collisions and
retransmittion reduce the realized BW from the theoretical (about half)
• Other strategies include• Token-Passing
– Possession of the token grants the right to transmit
– Token must be passed to the next machine after some period
Token Passing• An IBM protocol, and ARC-NET• Possession of the token grants the right to
transmit• Token must be passed to the next machine
after some period• Token is passed in a known order• Observations: fair, every machine gets a turn;
less overhead, no collisions or retransmission• So, why did Ethernet become a widespread
“standard”?
Token Passing• Token
– When machine owns the token, it generates data, places it in the frame and sends the frame to its neighbor
– Each machine forwards the token until it reaches its destination
• At the destination, the machine – Copies the content of the message– Marks the frame as having been delivered – Passes frame to its neighbor
• When the original sender receives the frame, it– Removes the message from the frame– Passes the token to its neighbor
Token Passing
Internetworking & TCP/IP• TCP/IP protocol stack
– Composed of four logical levels called layers• Application layer
– Highest level– Provides protocols for applications to communicate
• Transport layer– End-to-end communication– Relies on network layer to determine proper path from one end of
communication to the other• Network layer
– Moving data between computers• Link layer
– Provides an interface between the network layer and the underlying physical medium of the connection
Internetworking• How to interconnect Local Area Networks• If same type (frame, MAC strategy), and the same media,
can use a repeater• If the same type, but different media, can use a bridge• If different type (different frame, MAC strategy – I.e.
token to Ethernet, need to convert the protocol – requires more logic; router, switch, gateway
• Additional features filter down to lower devices, so functions change – moving target.
OSI (Open Systems Interconnection)
• Data Link Layer• Layer 2 in the OSI Reference Model• Translates and passes data between Physical
Layer and Network Layer• Ethernet operates at this level• Has two sublayers, based on functionality
– Logical Link Control (LLC)– Media Access Control (MAC)
• Logical Link Control (LLC) Sublayer• IEEE 802.2• Interfaces with Network Layer protocols (e.g., IPv4, IPv6, ICMP)• Translates IP packet into a frame • Performs error checking and control—requests retransmission of frames that fail error checking
– Error checking is performed by destination node– Frame is discarded and retransmitted
• Manages flow control between nodes• NOTE: Flow control and error checking is also performed by Transport Layer protocols (e.g., TCP/IP)
Transmission Control Protocol (TCP) is used by Internet applications like email, world wide web, FTP, etc. TCP/IP was developed by the Department of Defense (DOD) to connect various devices to a common network (Internet). The main purpose behind developing the protocol was to build a robust and automatically recovering phone line failure while on the battlefield. On the other hand, Open Systems Interconnection (OSI) was developed by the International Organization for Standardization (ISO). This model was made up of two components, namely, seven-layer model and the subset of protocols.
OSI Reference Model TCP/IP
Application Layer
Application LayerPresentation Layer
Session Layer
Transport Layer Transport Layer
Network Layer Internet Layer
Data Link LayerLink Layer
Physical Layer
TCP/IP Model Vs. OSI Model
TCP/IP Protocol Stack• TCP/IP protocol stack
– Composed of four logical levels called layers• Application layer
– Highest level– Provides protocols for applications to communicate
• Transport layer– End-to-end communication– Relies on network layer to determine proper path from one end
of communication to the other• Network layer
– Moving data between computers• Link layer
– Provides an interface between the network layer and the underlying physical medium of the connection
TCP/IP Protocol
TCP/IP Protocol
TCP/IP• TCP – Transmission Control Protocol
– OSI Transport Layer– Connection-Oriented Strategy
• UDP – User Datagram protocol– OSI Transport Layer– Connectionless Strategy
• IP – Internet Protocol– Network Layer
• Application layer software has been standardized on top of TCP
• No real protocol at Session and Presentation layer.
TCP/IP
• Evolved from defense department research – funded,
• ARPANET, and experimental internetwork
World Wide Web
Uses the internetConvenient way to share information, locate
information & web sites
Markup Language• Markup Language: this is the language that specifies
codes that allow the developer to format the appearance of web pages. The web browser must understand and be able to interpret these codes, which are standardized as HTML (Hyper-Text Mark-up Language). For instance, to designate that text is to appear in bold, a web page might contain the following line:
• The word <strong> BOLD</strong> is in bold text. • The <strong> and </strong> are used to begin and
end the section of text that is to be displayed as in bold typeface.
URL• Uniform Resource Locator (URL): this is a label
for the address and location of page or resource somewhere on the internet. This label is translated to an actual IP address by servers on the Internet. An example URL is;
• http://www.nsf.gov/ • which is the URL for the U.S. Government’s
National Science Foundation.
Hypertext• Hypertext or Hyperlinks: These are embedded links
in a web page, that can be used link pages together. • An example of a hyperlink that can be embedded in a
web page to link to the Linux operating system organization’s home page:
• <A href=" http://www.linux.org/"> Linux </A>• Hyperlink has a URL embedded within it between the
double-quotes (“). • Note also the use of the markup-language < and > to
begin and end the html commands.
Client-Server• Client-Server model of computing: This is the idea
that an application can be composed of parts that may exist at different machines connected by the Internet, that work together.
• In regards to the web, there are at least two machines that work together:– The user’s PC is the client – A server with web pages or web applications.
• There are a number of other machines that work behind the scenes to make the internet work, and to handle functions like translating the URLs into IP addresses.
DNS & DHCP http://technet.microsoft.com/en-us/library/cc958921.aspx
Domain Name System (DNS) servers provide name resolution for network clients.
DNS maintains (among other things) information that links a computer's fully qualified domain name (FQDN) to its assigned IP address(es).
Dynamic Host Configuration Protocol (DHCP)Provides a powerful mechanism for automatically
configuring client IP addresses, until recently DHCP did not notify the DNS service to update the DNS records on the client; specifically, updating the client name to an IP address, and IP address to name mappings maintained by a DNS server.
DNS• Because internet addresses are numbers, intelligible
names are assigned in place of internet addresses, for our convenience in every day use.
• Domain Name System (DNS) does the translation. • Example, the US President’s web site at
www.whitehouse.gov is translated to an IP address of 92.123.72.136.
Parallel ComputingEnhances performanceMultiple “execution engines”
Multiple machines/computersMultiple CPUsMultiple core on a chipMultiple pipelinesMultiple stages on a pipeline
Multiple Levels of Parallelism
Need for Parallel Processing
• Every generation of processor technology is faster, with more transistors in a small space.
• Processor technologies often require less voltage.
• Based on advances in manufacturing transistors.
• Regardless of how fast our computers are, we always seem to want more power and speed.
CPU Cycles• Consider a personal computer (PC).• When you are typing on a word processor, the CPU
doesn’t have much to do.• CPU runs in millions or billions of cycles per second.
This is MUCH faster than human time can perceive.• A PC CPU is typically wasting most of its processor time.• BUT, when we have lots of processing for the CPU to do,
we want it done ASAP.• Processing cycles are so cheap, that we can buy fast
processors even when most of their power is wasted.
Multicore Technologies• Each core is almost a separate processor.• A 4-core processor is like having the power of 4
CPUs in one.• More processors means more power and speed
(and more wasted CPU cycles, but they are so cheap we don’t care).
• Multiple Core or multiple CPUs allow faster completion of work by dividing the work between more than one CPU.
Classic Model of Parallel Processing
• Multiple Processors available (4)
• A Process can be divided into serial and parallel portions
• The parallel parts are executed concurrently
• Serial Time: 10 time units
• Parallel Time: 4 time units