Anda di halaman 1dari 67

Lecture

Computer Networks

1
Today’s Goals:
(Computer Networks)
• We will become able to appreciate the role of
networks in computing

• We will look at several different types of


networks

• We will familiarize ourselves with networking


topologies and protocols
2
What is a Network?
There are many types of networks!
 Transportation Networks
 Transport goods using trucks, ships,
airplanes, …
 Postal Services
 Delivering letters, parcels, etc.
 Broadcast and cable TV networks
 Telephone networks
 Internet
 “Social/Human networks”
3
Key Features of Networks
 Providing certain services
 transport goods, mail, information or data
 Shared resources
 used by many users, often concurrently
 Basic building blocks
 nodes (active entities): process and transfer
goods/data
 links (passive medium): passive “carrier” of
goods/data
 Typically “multi-hop”
 two “end points” cannot directly reach each other
 need other nodes/entities to relay
All of you have used
computer networks.

What is a
computer network?
5
Computer Network

Multiple computers that are


connected together to share
information and other resources

6
Examples of Computer Network Usage
• I can send an eMail message to a remote
computer using the SMTP (Simple Mail
Transfer Protocol )

• I can browse documents residing on a remote


computer using the HTTP protocol

• I can download or upload files to a remote


computer using the FTP protocol

7
Example of
Computer
Computer
E a Computer
A Network

Computer
D
Hub

Computer
B Computer
C
8
Components of Conventional Computer Networks

1. Computers

2. Network Interface Cards (NIC)


– I/O device that plugs into the
computer
– Enables it to communicate over
a network

3. Hub
– The network traffic controller
9
Components of Conventional Computer Networks

4. Cables
– Are either electrical or optical
– Not required at all for wireless networks

5. Protocol
– Rules governing communications over the
network

10
How Does a Conventional Network Work?

1. Suppose computer A wants to send a


message to D

2. Computer A sends the message to its NIC

3. The NIC translates the message into electrical


pulses suitable for the computer network in
use & transmits it to the hub through the cable

11
How Does a Conventional Network Work?

4. The hub receives them and forwards them to


all computers connected to the it

5. The NICs of all computers connected to the


hub receive the forwarded electrical pulses

6. The NIC of computer D decides that the


message is for it, & translates the pulses back
to a form suitable for the computer
12
Hub (1)
• A device that is used to connect several
computers to form a network

• A hub has several ports. The number generally


is 8, 12, 16, 24, 32, or 48

13
Hub (2)
• Each computer in a network is connected to
one of those ports through a cable

• A computer wanting to send a message to one


of the others in the network sends a message
to the hub, which, in turn, broadcasts the
message to all others connected to it

14
Packet (1)
• The smallest unit of data transmitted over a
computer network

• A message to be transferred over the network


is broken up into small packets by the sending
computer

• Each packet contains the following info:


– Sender's address
– Destination address
– Data
– Error-recovery info 15
Packet (2)
• All packets travel independently

• When all packets are received by the


destination computer, it reassembles them to
form the original message

16
Types of Computer Networks
according to the network access policy

• Private

• Public

17
Private Networks (1)
• Organizations having many computers usually
connect them in the form of private networks

• Access to these network is restricted to


authorized computers only

18
Private Networks (2)
• This allows computers from within the
organization to exchange info, but keeps the
info private and protected from outsiders

• All equipment on a private network is generally


for the exclusive use of that organization

19
Public Networks
• All networks that are not private, are … public

• Example: Internet

• Communication equipment used in these


networks is generally being used by users
belonging to several (possibly thousands of)
organizations as well as those belonging to no
organization
20
VPN: Virtual Private Network (1)

• From the user’s point-of-view, a VPN looks like


a secure, private network

• VPNs use public telecom infrastructure,


maintaining privacy through security procedures

21
VPN: Virtual Private Network (2)

• VPNs provide secure network connections for


distance computers without using dedicated,
private channels to supply the connection

• Key benefit of VPNs over conventional PNs:


Lower cost

22
Types of Computer Networks
according to the distance between nodes

• LAN: Local Area Network)

• MAN : Metropolitan Area Network

• WAN: Wide Area Network)

23
LAN
• A network of computers located in the same
building or a handful of nearby buildings.
• LAN is a computer networks widely used for
local communications.
• Examples:
– Computer network of a University campus

24
WAN
• A network in which computers are separated by
great distances, typically across cities or even
continents

• May consist of several interconnected LANs

• Example:
– The network connecting the ATM of a bank located
in various cities
– A network connecting the local and oversea offices
of a SW house
– Internet 25
MAN
• MAN is a computer network spread over a city
• The computer in a MAN is connected using coaxial
cable or fiber optics cables.

• MAN is a network that interconnects users with


computer resources in a geographic area or region
larger than that covered by even a large local area
network (LAN) but smaller than the area covered by a
wide area network (WAN)
• Example:
• Cable Television network is an example of MAN
26
Connecting LANs to other Networks
Special-purpose devices are used to link
LANs to other networks

They may belong to one of the following


categories:
– Routers
– Switches
– Bridges
– Gateways
27
Router
• A special-purpose computer that directs data
traffic when several paths are available

• A router examines the destination info in each


arriving packet and then routes it through the
most efficient path available

• The router either delivers the packet to the


destination computer across a local network or
forwards the packet to another router that is
closer to the final destination 28
Bridge
• Used to form a connection between two
separate, but similar networks

• In a way, it creates an extended LAN by


passing information between two or more LANs

29
Gateway
• A special-purpose computer that connects and
translates between networks that use different
communications protocols

• LAN’s may use a gateway (or router) to connect


to the Internet

30
Modem (1)
• I/O device used for connecting two
computers over telephone lines

• modem = modulator + demodulator

31
Modem (2)
• Modulator converts computer messages to
electrical pulses that are suitable for
transmission over the telephone lines

• Demodulator converts electrical pulses


received over telephone lines into messages
that are comprehensible for computers

32
Local Area Network Topologies
• The pattern in which computers are connected
to form a network

• Popular patterns:
– Point-to-point
– Star
– Bus
– Ring

• Networks are also formed by combining 2 or


33
more of these 4 basic patterns
P2P

Computer Computer
A B

34
P2P
• Inexpensive

• Limited connectivity

• Quite often used for connecting two LANs to


form a WAN

35
Computer
Star
D

Computer Computer
Server
A C

Computer
B
36
Star (1)
• A computer sends the address of the intended
receiver and the data to the server

• The server then sends the message to the


intended receiver

• This topology allows multiple messages to be


sent simultaneously

37
Star (2)
• Costly, because it uses an additional computer
to direct the data

• Costly, because each node is individually wired


to the hub

• If the server goes down, so does the network

• If any of the nodes goes down, the rest of the


network is not affected 38
Computer Computer
Bus
A C

Bus: A high
speed cable
Computer Computer
B D

39
Bus (1)
• No server is required

• One computer sends data to another by


broadcasting the address of the receiver and
the data over the bus

• All the computers in the network look at the


address simultaneously, and the intended
recipient accepts the data
40
Bus (2)
• A bus network, unlike ring or star networks,
allows data to be sent directly from one
computer to another

• However, only one computer at a time can


transmit data. The others must wait to until the
bus gets idle

• If any of the nodes goes down, the rest of the


network is not affected 41
Computer
Ring
D

Computer Computer
A C

Computer
B
42
Ring (1)
• No server is required

• A computer sends the message to its neighbor.


The neighbor examines the message to
determine if it is the intended recipient

• If the data are not intended for that particular


neighbor, it passes the message to the next
computer in the ring
43
Ring (2)
• This process is repeated until the data arrive at
their intended recipient

• This topology allows multiple messages to be


carried, simultaneously

• Data transmission is slow since each message


is checked by each computer

44
Ring (3)
• New nodes are difficult to add

• Messages propagate in one direction only

• The network fails if a single node fails

45
Computer
A
Combination

Computer
Hub Computer
B
D

Computer
C Computer
Hub
E

Computer
46 F
The OSI Model
• The Open System Interconnection (OSI)
model is framework for defining standards for
linking heterogeneous computers in a packet
switched network
• Standardized OSI protocol makes it possible
for any two heterogeneous computer
systems, located anywhere in the world, to
easily communicate with each other
• Separate set of protocols is defined for each
layer in its seven-layer architecture. Each
layer has an independent function 47
The OSI (Open System Interconnection)
Model Layers

48
7-Layer Model of OSI
Physical DataLink Network Transport Session Presentation Application

• Application Layer
– set of utilities used by application programs
• Presentation Layer
– formats data for presentation to the user
– provides data interfaces, data compression and translation
between different data formats
• Session Layer
– initiates, maintains and terminates each logical session
between sender and receiver
7-Layer Model of OSI
• Transport Layer
– deals with end-to-end issues such as segmenting the
message for network transport, and maintaining the logical
connections between sender and receiver
• Network Layer
– responsible for making routing decisions
• Data Link Layer
– deals with message delineation, error control and network
medium access control
• Physical Layer
– defines how individual bits are formatted to be transmitted
through the network
Networking Protocols
• Networks use protocols, or rules, to exchange
info through shared channels

• Protocols prevent collisions of packets caused


by simultaneous transmission between two or
more computers

• Several protocols are available for various


types of networks. Here we discuss two that
are popular for LANs: Ethernet; Token Ring51
Protocols
• Used by Network model layers
• Sets of rules to define how to communicate
at each layer and how to interface with
adjacent layers
Layer N+1 Layer N+1

Layer N Layer N

Layer N-1 Layer N-1

sender receiver
Ethernet Protocol
• A computer using this protocol checks if a
shared connection is in use before transmitting
a message

• If not, the computer transmits data

• Two computers may sense an idle connection


and may send packets simultaneously. To
account for such situations, transmitting
computers continue to monitor the connection
and re-transmit if a packet collision occurs
53
Token Ring Protocol
• This protocol passes a special message called
a token through the network

• A computer that receives the token is given


permission to send a packet of information

• If the computer has no packet to send, it passes


the token to the next computer

54
Computer Networks
=
Computers
+
Communications 55
Types of Communication Channels
1. Wire

2. Wireless

A key characteristic of these channels is bandwidth

56
Bandwidth

• Capacity of a communication channel for


carrying data

• Measured in bits/s (bps), kb/s, Mb/s, Gb/s, Tb/s

• Optical fiber channels have the highest (1 Tb/s)

• Telephone lines the lowest (56 kb/s)


57
Types of Communication Channels
Wire Wireless
– Copper – Line-of-sight
• Twisted-pair • Microwave
• Coaxial cable • Optical
– Optical fiber – Non-line-of-
sight
• Satellite
• Radio
• Cellular

58
Wireless (Radio) LANs Are Becoming Popular

Key benefits:
– Set-up time
– Set-up cost
– Maintenance cost
– Cost Key challenges:
– Security & privacy
– Quality of service
– Cost
59
Network Security (1)
• Keeping an eye on the security of private
networks (e.g. LANs) is relatively easy

• However, their connections to other networks


(e.g. the Internet) pose a security risk because
the one has no control over users on those
networks

60
Network Security (2)
• Applications transferred from the Internet to the
LAN may contain computer viruses

• External, unauthorized users may gain access


to sensitive data

• A special type of gateway - a firewall – can


keep external users from accessing resources
on the LAN while letting LAN users access the
external info 61
Firewall
• A system that that guards a private network,
enforcing an access/deny policy to all traffic
going to and coming from the Internet

• It keeps an eye on all the packets that go in and


out of the private network and blocks them or
allows them to continue to their destination
according to the policy

62
Firewall Private
Internet Network

63
Firewall Policy: Example

One can configure a firewall to allow only


eMail to enter the private network, thus
shielding it from any malicious attacks
except for those via eMail

64
Anti-Virus Software
• Antivirus or anti-virus software (often
abbreviated as AV), sometimes known as
anti-malware software, is computer software
used to prevent, detect and remove malicious
software.
• Malware, short for malicious software, is an
umbrella term used to refer to a variety of
forms of hostile or intrusive software,
including computer viruses, worms, Trojan
horses, ransomware, spyware, adware,
scareware, and other malicious programs. It
65
can take the form of executable code, scripts,
In Today’s Lecture

• We looked at the role of networks in


computing

• We looked at several different types of


networks

• We familiarized ourselves with networking


topologies and protocols
• Network Security
66
Next Lecture:
Introduction to the Internet &
Internet Services
• To become able to appreciate the role of the
Internet in today’s computing

• To become familiar with the history, TCP/IP


protocols, Internet applications, WWW
browser and many more etc.

67

Anda mungkin juga menyukai