Documente Academic
Documente Profesional
Documente Cultură
Networking
15-1
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
• 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
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
• 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
• 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
15-24
Computer Networks
Types of Networks
Types of Networks
15-26
Computer Networks
Types of Networks
15-27
Computer Networks
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
Internet Connections
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
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
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
• 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
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
15-18
Computer Networks
Open Systems
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
TCP/IP
15-55
Computer Networks
TCP/IP (cont.)
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
Network Addresses
15-62
Computer Networks
Network Addresses
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
15-65
Computer Networks
15-66 Figure 15.10 Top-level domains, including some relatively new ones
Computer Networks
Figure 15.11
Some of the top-level domain
names based on country codes
15-67
Computer Networks
• 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
70
Factors that Cause Congestion
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.
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
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
5-34
83