Sunteți pe pagina 1din 83

Computer Networks

Networking

• The generic term node or host refers to any device on a network


• Data transfer rate The speed with which data is moved from one place on a network to another
• Data transfer rate is a key issue in computer networks

15-1
Computer Networks

Networking • Computer networks have opened up an entire frontier in the world of


computing called the client/server model

15-2 Figure 15.1 Client/Server interaction


Computer Networks

Networking

• File server A computer that stores and manages files for multiple users on a network
• Web server A computer dedicated to responding to requests (from the browser client) for web pages

15-3
Computer Networks

Types of Networks

• Local-area network (LAN) A network that connects a relatively small number of machines in a relatively
close geographical area

15-4
Introduction

• What is Data communication


• Communication model (e.g. Human communication)
• Source
– Generates data
• Transmitter
– Converts data into transmitting signals
• Transmission system
– Carries data
• Receiver
– Converts received signals into data
• Destination
– Takes incoming data
Communication model in networks

Source Transmitter Transmission Receiver Destination


system
Data Representation

• Text
– Represented in bits patterns e.g. 0,1
– Different Bit patterns called code.
– Present Coding system: Unicode, 32 bits
• Numbers
– Represented in bit patterns
– Converted into binary for calculations
• Images
– Represented into matrix of pixels/bits
• Audio/Video
– Continuous data
Flow of Data

• Simplex
– One way traffic only, one device transmits and one receives e.g. Keyboard->monitor
• Half-duplex
– Both stations can transmit and receive but one at time. e.g. Bus topology
– Only one path from source to destination.
– collisions may occur
• Full-duplex
– Both can receive and send at the same time. e.g. Star topology.
– Two separate transmission lines.
– collisions free
Networks

• Nodes interconnected together and share information and resources.


• Types of Network
– Point to point connections
– Circuit switching network
– Message switching network
– Packet switching network
Point to point connections

• Not peer to peer


• Dedicated communication circuit
• Fixed configuration
• Direct link between devices
• B and C can be intermediate device to connect A and D
• Connection formed in different sections between users, end to end connection in series and
forms circuit.
• So point to point forms simple connection
• If number of users increased then hard to provide circuit that connects each user with other
users.
• So we need switching which could provide sharing of transmission circuits.
Circuit switching network

• This allows the communication circuits to be shared among users.


• E.g. Telephone exchange
• Switching
• It allows equipments and circuits to be shared among users.
• Establishes dedicated circuit between users before communication.
• When circuit is free other users can use this. e.g. telephone calls.
• Telephone exchange is an example of circuit switching.
• Replacement conference calls
Circuit switching network

•Source connects with switching node


•User requests circuit
•Node B recieves connection request
and identify path to node D via intermediate
node C.
Message switching network

• Circuit setup, store and forward e.g. Telex or email


• Also called stored and forward switching
• Not necessary to establish circuit between A and D.
• When circuit is free it delivers otherwise waits and store message.
• But delays may occur.
Packet switching network

• Similar to message switching


• but divides message into packets/datagram packets of equal lengths.
• Headers are added to each packets.
• Header contains information about source and destination.
• No need for dedicated circuit.
• As length of packet is small so each link is established for small time and then it is available for other
messages.
• Another benefit is pipelining.
Packet switching network

Pipelining:
When data sent from B to C at the
same time data packet is being sent
from A to B.
This results in gain of efficiency. And
total delay for the transmission of
Message is very less.
Types of Packet switching network

• LANs
• WANs
• ISPs
• (will be discussed in detail once we set strong base for these networks)
Physical Topologies

• Difference between Network topology and physical topology.


• Network Topology: Defines structure of network
• Physical topology: Layout of the wire or media.
• But physical topology is a part of network topology.
• Physical topology:
– BUS
– Star
– Ring
– Mesh
– Tree
BUS

• Uses single backbone cable, All hosts directly connected to this backbone.
• Inexpensive and easy to install
• All nodes receives data
• Ends terminated with a device terminator.
• Two types of BUS
– Linear
• All nodes connected to common medium which has only two end points.
– Distributed
• All nodes connected to common medium which has more then two end
points.
RING

• All nodes connected to one another in form of closed loop.


• Expensive and difficult to install but offers high bandwidth, not robust.
• Point to point connection with only two devices.
• Signal is passed in one direction only, moves until it reaches to its destination.
• Each device connected with a repeater.
• One signal always circulates for fault detection. If device don’t receives signal for specified time it
generates alarm.
STAR

• Connects all devices with central point.


• Central point can be hub.
• Data transmitted reaches to central point, who decides where to send data.
• Bottleneck occur because all data pass from hub.
• Less expensive and easy to install, robust if one link is down still remains active.
• Disadvantage: dependency one central unit.
• Star is used in LANs
• Types of STAR Topology
• Extended STAR
– Has one or more repeaters from central node to extend maximum transmission distance.
– If repeaters in extended star topology is replace with hub or switches then it creates Hybrid topology.
– Or if backbone as star topology and extended with bus then it also creates Hybrid topology.
– Connecting two or more topologies with each other forms hybrid topology.
• Distributed STAR
– Individual networks based on
star topology
– These networks do not have central
or top level connection points.
MESH

• Each host has its dedicated point to point link with every other host.
• Link only carries data between two devices only (no other can use that link)
• If there are n number of nodes in network then we need n(n-1) links.
• If link is multi directional or duplex mode then we need n(n-1)/2 links.
• Each device requires n-1 I/O ports to be connected to each device.
• Eliminates traffic problem, Robust, privacy/security of message.
• More cabling required, more I/O ports needed, hard to install, expensive.
Computer Networks

Types of Networks

• Various configurations, called topologies, have been used to


administer LANs
– Ring topology A configuration that connects all nodes in a closed loop on which
messages travel in one direction
– Star topology A configuration that centers around one node to which all others
are connected and through which all messages are sent
– Bus topology All nodes are connected to a single communication line that
carries messages in both directions

15-24
Computer Networks

Types of Networks

Figure 15.2 Various network topologies

• A bus technology called Ethernet has become the industry


standard for local-area networks
15-10
Computer Networks

Types of Networks

• Wide-area network (WAN) A network that connects two or more


local-area networks over a potentially large geographic distance
Often one particular node on a LAN is set up to serve as a gateway to handle all
communication going between that LAN and other networks
Communication between networks is called internetworking
The Internet, as we know it today, is essentially the ultimate wide-area network,
spanning the entire globe

15-26
Computer Networks

Types of Networks

• Metropolitan-area network (MAN) The communication infrastructures that


have been developed in and around large cities

15-27
Computer Networks

So, who owns the Internet?

Well, nobody does. No single person or company owns the Internet or even controls it entirely. As a wide-
area network, it is made up of many smaller networks. These smaller networks are often owned and
managed by a person or organization. The Internet, then, is really defined by how connections can be made
between these networks.

15-28
15-29
Computer Networks
Types of Networks

Figure 15.1 Local-area networks connected across a distance to


create a wide-area network
Computer Networks

Internet Connections

• Internet backbone A set of high-speed networks that carry Internet traffic


These networks are provided by companies such as AT&T, GTE, and IBM
• Internet service provider (ISP) A company that provides other companies or individuals with access to the
Internet

15-30
Computer Networks

Internet Connections

• There are various technologies available that you can use to connect a home
computer to the Internet
– A phone modem converts computer data into an analog audio signal for transfer over a
telephone line, and then a modem at the destination converts it back again into data
– A digital subscriber line (DSL) uses regular copper phone lines to transfer digital data to
and from the phone company’s central office
– A cable modem uses the same line that your cable TV signals come in on to transfer the data
back and forth

15-31
Computer Networks

Internet Connections

• Broadband A connection in which transfer speeds are faster than


128 bits per second
– DSL connections and cable modems are broadband connections
– The speed for downloads (getting data from the Internet to your home computer)
may not be the same as uploads (sending data from your home computer to the
Internet)

15-32
2. Network Topologies

• The various topologies are depicted as graphs whose nodes correspond to sites.

• An edge from node A to node B corresponds to a direct connection between the two sites.
2.1.
Network
Topology
Diagrams

Figure 15.2, p.547


3. Network Types

• Local-Area Network (LAN) – designed to cover small geographical area.


– multiaccess bus, ring, or star network
– ~10 megabits/second, or higher
– broadcast is fast and cheap
– nodes:
• usually workstations and/or personal computers
• a few (usually one or two) mainframes

continued
• A typical LAN:
Figure 15.3, p.550
• Wide-Area Network (WAN) – links geographically separated sites.
– point-to-point connections over long-haul lines (often leased from a phone
company)
– ~100 kilobits/second.
– broadcast usually requires multiple messages
– nodes:
• usually a high percentage of mainframes

continued
v A typical
WAN:

Figure 15.5
p.551
4. Communication Network Issues

• Naming and name resolution


– how do two processes locate each other to communicate?

• Routing strategies
– how are messages sent through the network?
More details
in the next
few slides

continued
• Connection strategies
– how do two processes send a sequence of messages?

• Contention
– the network is a shared resource, so how do we resolve conflicting demands for its use?
4.1. Naming and Name Resolution

• Name systems in the network


– fine for LANs
• Address messages with the process IDs
– fine for process to process comms.
• Identify processes on remote systems by pairs:
<host-name, PIDs>

continued
• Domain name service (DNS)
– specifies the naming structure of the hosts, as well as name to address resolution (Internet)
• e.g. from a hierarchical name "ratree.psu.ac.th"
to a dotted decimal 127.50.2.7
4.2. Routing Strategies

• Fixed routing. A path from A to B is specified in advance; path changes only if a hardware failure disables
it.
– since the shortest path is usually chosen, communication costs are minimized
– fixed routing cannot adapt to load changes
– ensures that messages will be delivered in the order in which they were sent

continued
• Virtual circuit. A path from A to B is fixed for the duration of one session. Different sessions involving
messages from A to B may have different paths.
– partial remedy to adapting to load changes
– ensures that messages will be delivered in the order in which they were sent

continued
• Dynamic routing. The path used to send a message form site A to site B is
chosen only when a message is sent.
– usually a site sends a message to another site on the link least used at that
particular time
– adapts to load changes by avoiding routing messages on heavily used path
– messages may arrive out of order. This problem can be remedied by
appending a sequence number to each message.
4.3. Connection Strategies
• Circuit switching
– a permanent physical link is established for the duration of the
communication
• e.g. the telephone system; TCP

• Message switching.
– a temporary link is established for the duration of one message transfer
• e.g. the post-office mailing system; UDP

continued
messages
packets

• Packet switching
– messages of variable length are divided into fixed-length packets which are sent to the destination
– each packet may take a different path through the network
– the packets must be reassembled into messages as they arrive

continued
• Circuit switching requires setup time, but incurs less overhead for shipping each message, and may waste
network bandwidth

• Message and packet switching require less setup time, but incur more overhead per message.
4.4. Contention
• CSMA/CD. Carrier sense with multiple access (CSMA); collision
detection (CD)
– a site determines whether another message is currently being transmitted
over that link. If two or more sites begin transmitting at exactly the same
time, then they will register a CD and will stop transmitting
– When the system is very busy, many collisions may occur, and thus
performance may be degraded.

continued
• CSMA/CD is used successfully in the Ethernet system, the most common network system.

continued
Computer Networks
Packet Switching

• To improve the efficiency of transferring information over


a shared communication line, messages are divided into
fixed-sized, numbered packets
• Network devices called routers are used to direct packets
between networks
Figure 15.4
Messages
sent by
packet
switching

15-18
Computer Networks

Open Systems

• Proprietary system A system that uses technologies kept private by


a particular commercial vendor
One system couldn’t communicate with another, leading to the need for
• Interoperability The ability of software and hardware on multiple
machines and from multiple commercial vendors to communicate
Leading to
• Open systems Systems based on a common model of network
architecture and a suite of protocols used in its implementation

15-52
Computer Networks

Open Systems
• The International
Organization for
Standardization (ISO)
established the Open
Systems Interconnection
(OSI) Reference Model
• Each layer deals with a
particular aspect of
network communication
Figure 15.5 The layers of the OSI Reference Model

15-53
Computer Networks
Network Protocols
• Network protocols are layered such that each one relies on the protocols that
underlie it
• Sometimes referred to as a protocol stack

Figure 15.6 Layering of key network protocols


15-54
Computer Networks

TCP/IP

• TCP stands for Transmission Control Protocol


TCP software breaks messages into packets, hands them off to the IP software for delivery, and then orders
and reassembles the packets at their destination

• IP stands for Internet Protocol


IP software deals with the routing of packets through the maze of interconnected networks to their final
destination

15-55
Computer Networks

TCP/IP (cont.)

• UDP stands for User Datagram Protocol


– It is an alternative to TCP
– The main difference is that TCP is highly reliable, at the cost of decreased performance, while UDP is less
reliable, but generally faster

15-56
Computer Networks

High-Level Protocols

• Other protocols build on the foundation established by the TCP/IP protocol suite
– Simple Mail Transfer Protocol (SMTP)
– File Transfer Protocol (FTP)
– Telnet
– Hyper Text Transfer Protocol (http)

15-57
Computer Networks

MIME Types

• Related to the idea of network protocols and standardization is the concept of a file’s MIME type
– MIME stands for Multipurpose Internet Mail Extension
– Based on a document’s MIME type, an application program can decide how to deal with the data it is given

15-58
15-59
Computer Networks

MIME Types

Figure 15.7
Some protocols
and the ports
they use
Computer Networks

Firewalls

• Firewall A machine and its software that serve as a special gateway to a network, protecting it from
inappropriate access
– Filters the network traffic that comes in, checking the validity of the messages as much as possible and
perhaps denying some messages altogether
– Enforces an organization’s access control policy

15-60
15-61
Computer Networks

Firewalls

Figure 15.8 A firewall protecting a LAN


Computer Networks

Network Addresses

• Hostname A unique identification that specifies a particular computer on the Internet


For example
matisse.csc.villanova.edu
condor.develocorp.com

15-62
Computer Networks

Network Addresses

• Network software translates a hostname into its corresponding IP address

For example
205.39.145.18

15-63
Computer Networks

Network Addresses
• An IP address can be split into
– network address, which specifies a specific network
– host number, which specifies a particular machine in that
network

Figure 15.9
An IP address is
stored in four
bytes

15-64
Computer Networks

Domain Name System

• A hostname consists of the computer name followed by the domain


name
• csc.villanova.edu is the domain name
– A domain name is separated into two or more sections that specify the
organization, and possibly a subset of an organization, of which the computer is a
part
– Two organizations can have a computer named the same thing because the
domain name makes it clear which one is being referred to

15-65
Computer Networks

Domain Name System


• The very last section of the domain is called its
top-level domain (TLD) name

15-66 Figure 15.10 Top-level domains, including some relatively new ones
Computer Networks

Domain Name System

• Organizations based in countries other than the United States use a


top-level domain that corresponds to their two-letter country codes

Figure 15.11
Some of the top-level domain
names based on country codes

15-67
Computer Networks

Domain Name System

• The domain name system (DNS) is chiefly used to translate hostnames into numeric IP addresses
– DNS is an example of a distributed database
– If that server can resolve the hostname, it does so
– If not, that server asks another domain name server

15-68
CONGESTION CONTROL

69
Congestion Control

• When one part of the subnet (e.g. one or more


routers in an area) becomes overloaded,
congestion results.
• Because routers are receiving packets faster
than they can forward them, one of two things
must happen:
– The subnet must prevent additional packets from
entering the congested region until those already
present can be processed.
– The congested routers can discard queued packets to
make room for those that are arriving.

70
Factors that Cause Congestion

• Packet arrival rate exceeds the outgoing link capacity.


• Insufficient memory to store arriving packets
• Bursty traffic
• Slow processor

71
Congestion Control vs Flow Control

• Congestion control is a global issue – involves every router and host within the subnet
• Flow control – scope is point-to-point; involves just sender and receiver.

72
Congestion Control, cont.

• Congestion Control is concerned with efficiently


using a network at high load.
• Several techniques can be employed. These
include:
– Warning bit
– Choke packets
– Load shedding
– Random early discard
– Traffic shaping
• The first 3 deal with congestion detection and
recovery. The last 2 deal with congestion
avoidance.

73
Warning Bit

• A special bit in the packet header is set by the router to warn the source when congestion is detected.
• The bit is copied and piggy-backed on the ACK and sent to the sender.
• The sender monitors the number of ACK packets it receives with the warning bit set and adjusts its
transmission rate accordingly.

74
Choke Packets

• A more direct way of telling the source to slow down.


• A choke packet is a control packet generated at a congested node and
transmitted to restrict traffic flow.
• The source, on receiving the choke packet must reduce its transmission
rate by a certain percentage.
• An example of a choke packet is the ICMP Source Quench Packet.

75
Hop-by-Hop Choke Packets

• Over long distances or at high speeds choke packets are not very effective.
• A more efficient method is to send to choke packets hop-by-hop.
• This requires each hop to reduce its transmission even before the choke packet arrive at the source.

76
Traffic Shaping
• Another method of congestion control is to “shape” the traffic before it
enters the network.
• Traffic shaping controls the rate at which packets are sent (not just how
many). Used in ATM and Integrated Services networks.
• At connection set-up time, the sender and carrier negotiate a traffic
pattern (shape).
• Two traffic shaping algorithms are:
– Leaky Bucket
– Token Bucket

77
The Leaky Bucket Algorithm

• The Leaky Bucket Algorithm used to control rate in a network. It is implemented as a single-server queue
with constant service time. If the bucket (buffer) overflows then packets are discarded.

78
The Leaky Bucket Algorithm

(a) A leaky bucket with water. (b) a leaky bucket with


packets.
79
Leaky Bucket Algorithm, cont.

• The leaky bucket enforces a constant output rate


(average rate) regardless of the burstiness of the
input. Does nothing when input is idle.
• The host injects one packet per clock tick onto
the network. This results in a uniform flow of
packets, smoothing out bursts and reducing
congestion.
• When packets are the same size (as in ATM cells),
the one packet per tick is okay. For variable
length packets though, it is better to allow a fixed
number of bytes per tick. E.g. 1024 bytes per tick
will allow one 1024-byte packet or two 512-byte
packets or four 256-byte packets on 1 tick.
80
Token Bucket Algorithm

• In contrast to the LB, the Token Bucket


Algorithm, allows the output rate to vary,
depending on the size of the burst.
• In the TB algorithm, the bucket holds tokens.
To transmit a packet, the host must capture
and destroy one token.
• Tokens are generated by a clock at the rate of
one token every t sec.
• Idle hosts can capture and save up tokens (up
to the max. size of the bucket) in order to send
larger bursts later.
81
The Token Bucket Algorithm

5-34

(a) Before. (b) After.


82
Leaky Bucket vs Token Bucket
• LB discards packets; TB does not. TB discards tokens.
• With TB, a packet can only be transmitted if there are enough tokens to
cover its length in bytes.
• LB sends packets at an average rate. TB allows for large bursts to be sent
faster by speeding up the output.
• TB allows saving up tokens (permissions) to send large bursts. LB does not
allow saving.

83

S-ar putea să vă placă și