Lecture 06
Computer Network
Course: Computer Education and nutritional
Database
COMPUTER NETWORK
2
Computer Network
Multiple computers that are
connected together to share
information and other resources
3
Examples of Computer Network Usage
• I can send an eMail message to a remote computer
using the SMTP 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
• I can run a program on a remote computer using
the TELNET protocol
4
COMPONENTS OF CONVENTIONAL
COMPUTER NETWORKS
5
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
6
4. Cables
– Are either electrical or optical
– Not required at all for wireless networks
5. Protocol
– Rules governing communications over the network
7
HOW DOES A CONVENTIONAL
NETWORK WORK?
8
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
9
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
10
HUB
11
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
12
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
13
HUB
14
15
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
16
Packet (2)
• All packets travel independently
• When all packets are received by the destination
computer, it reassembles them to form the original
message
17
Types of Computer Networks
According to the distance between nodes
• LAN: Local Area Network
• WAN: Wide Area Network
18
LAN
• A network of computers located in the same
building or a handful of nearby buildings
• Examples:
– Computer network of a University campus
19
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
20
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
– Bridges
– Gateways
– Modems
21
NETWORK APPLICATIONS
• There are number of specific applications that are
only possible over a network.
o Electronic Mail
o Electronic Fund Transfer
o Video Conferencing
o Distributed Systems
o Internet
22
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 by using Router Information Protocol. 23
Type A
header
Payload Type A
header
Payload
ROUTER ROUTER
Significant
geographical
SERVER distance SERVER
Type A
header
Payload
LAN 1 LAN 2
WAN
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
25
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
26
A gateway performs the translation
between two different types of networks.
3
Modem (1)
• I/O device used for connecting two computers
over telephone lines
• modem = modulator + demodulator
28
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
29
NETWORK TOPOLOGIES
30
Networking structures
• There are two different networking structures
(logical structures):
– Peer to Peer (every computer shares information
with others)
– Client Server (only one computer shares information
with others)
31
32
Network Topologies (LAN topologies)
• The pattern in which computers are connected to form a
network
• Popular patterns:
– Bus (peer to peer structure)
– Star (peer to peer structure)
– Mesh (peer to peer structure)
– Ring (peer to peer structure)
• Networks are also formed by combining 2 or more of
these 4 basic patterns 33
Bus topology
• All networked nodes are interconnected, peer to
peer, using a single, open-ended cable
• Both ends of the bus must be terminated with a
terminating resistor to prevent signal bounce
34
Bus topology
35
Advantages of Bus topology
1) Easy to implement and extend
2) Well suited for temporary networks that must be
set up in a hurry
3) Typically the least cheapest topology to
implement
4) Failure of one station does not affect others
36
Disadvantages of Bus topology
1) Difficult to administer/troubleshoot
2) Limited cable length and number of stations
3) A cable break can disable the entire network; no
redundancy
4) Maintenance costs may be higher in the long run
5) Performance degrades as additional computers
are added
37
Ring topology
• started out as a simple peer-to-peer LAN topology
• Each networked workstation had two
connections: one to each of its nearest neighbors
• Data was transmitted uni-directionally around the
ring
• Sending and receiving of data takes place by the
help of TOKEN
38
Token Passing
• Token contains a piece of information which along
with data is sent by the source computer
• This token then passes to next node, which checks
if the signal is intended to it
If yes, it receives it and passes the empty to into the
network
otherwise passes token along with the data to next
node
39
Ring topology
40
Advantages of Ring topology
1) This type of network topology is very organized
2) Performance is better than that of Bus topology
3) No need for network server to control the
connectivity between workstations
4) Additional components do not affect the performance
of network.
5) Each computer has equal access to resources.
41
Disadvantages of Ring topology
1) Each packet of data must pass through all the
computers between source and destination,
slower than star topology
2) If one workstation or port goes down, the entire
network gets affected
3) Network is highly dependent on the wire which
connects different components
42
Star topology
• Have connections to networked devices that
“radiate” out form a common point
• Each networked device in star topology can access
the media independently
• Have become the dominant topology type in
contemporary LANs
• Stars have made buses and rings obsolete in LAN
topologies
43
Star topology
44
Advantages of star topology
1) Compared to Bus topology it gives far much
better performance
2) Easy to connect new nodes or devices
3) Centralized management. It helps in monitoring
the network
4) Failure of one node or link doesn’t affect the rest
of network
45
Disadvantages of star topology
1) If central device fails whole network goes down
2) The use of hub, a router or a switch as central
device increases the overall cost of the network
3) Performance and as well number of nodes which
can be added in such topology is depended on
capacity of central device
46
Mesh topology
47
Advantages of a mesh topology
• Manages high amounts of traffic, because
multiple devices can transmit data simultaneously.
• A failure of one device does not cause a break in
the network or transmission of data.
• Adding additional devices does not disrupt data
transmission between other devices.
48
Disadvantages of a mesh topology
• The cost to implement is higher than other
network topologies, making it a less desirable
option.
• Building and maintaining the topology is difficult
and time consuming.
• The chance of redundant connections is high,
which adds to the high costs and potential for
reduced efficiency.
49
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 Ring 50
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
51
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.
52
Computer Networks
=
Computers
+
Communications 53