Computer networks short note (version 8)

NimmiRashinika 2,628 views 38 slides Jul 28, 2016
Slide 1
Slide 1 of 38
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38

About This Presentation

Computer networks short note by Nimmi rashinika Weeraddana


Slide Content

1 | P a g e

Computer Networks
IN 2510
Goal of this course
1. To learn how the Internet works
2. To learn the fundamentals of computer networks
Internet
Social impact:
 Easy access to knowledge
o Ex: Wikipedia
 Electronic commerce
o Ex: PayPal
 Personal relationships
o match.com
 Discussion without censorship
o The Onion Router
Economic impact:
 Advertising-sponsored search
 “Long tail” online stores
 Online marketplace
 Crowdsourcing
Computer Networks
Key problems in computer networking
 Reliability despite failures
 Network growth and evolution
 Allocation of resources like bandwidth
 Security against various threats
Upheavals in the past 1-2 decades
Growth/ Tech Driver Upheaval
Emergence of the web Content Distribution Networks
Digital songs/ videos Peer-to-peer file sharing
Falling cost per bit Voice-over-IP calling
Many Internet hosts IPv6
Wireless advances Mobile devices

2 | P a g e

Lesson 01 Networking Fundamentals

Outline:
 Introduction
 Benefits/ Risks of Networking
 Types of Networks
 Networking Devices
 Categorizing Networks
Computer Network:
 A computer network is a set of computers connected together for the purpose of sharing
resources. The most common resource shared today is connection to the Internet. Other shared
resources can include a printer or a file server. The Internet itself can be considered as a
computer network.
Node:
 Any active electronic device that connected to a computer network
 Can be either a connection point, redistribution point, or a communication endpoint
 Capable of creating, receiving, or transmitting information over a communications channel
*note: A passive distribution point such as a distribution frame or a patch panel is consequently not a
node.
Devices (nodes) of a network can be classified as:
1. End user devices
 Also called hosts
 Provide services to the user directly
 Ex: Computers(client/ server), printers, scanners, file server, IBM main frame etc
2. Network devices (see page 17: Network Hardware Components)
 Connect end user devices together to allow them to communicate
 Ex: repeater, bridge, hub, workgroup switch, router, network cloud
Components of a network (includes nodes plus network hardware plus link component plus apps):
Component Function Example
Application, or app, user Uses the network Skype, iTunes, Amazon
Host, or end-system, edge
device, node, source, sink
Supports apps Laptop, mobile, desktop
Router, or switch, node, hub,
intermediate system
Relays messages between links Access point, cable/ DSL modem

3 | P a g e

Link, or channel Connect nodes Wires, wireless

Big picture of nodes

Figure 1: The demonstration of the word ISP and Network


Figure 2: The generic word cloud can be referred to ISP part of a network
Types of links
1. Full duplex
 Bidirectional
 Both directions at once
 Ex: hand phone
2. Half duplex
 Bidirectional
 Only for one direction at a time
 Ex: walky talky
3. Simplex
 Unidirectional
 Ex: mass media

4 | P a g e

Data Transfer Rate (DTR)
A key issue in computer networks, and Measured in bps, Bps, Mbps etc
Data Transfer Rate and bandwidth:
 Bandwidth is a measurement of the potential amount of data that can be transferred in a given
time frame, while data transfer rate is the actual amount of data being transferred.
Factors that can impact DTR
 Congested routers
o Packet loss is a result  jitter in videos, gaps in audio
 Improperly configured PCs with inadequate memory and processors
Problems caused by poor DTR
 Long wait time for connections and downloads
 Inability to complete the download due to endless requests for retransmission of dropped
packets
 Poor DTR for live video streams in video conferencing (ex: Skype call get stucked)
Improve DTR on computer Networks
 Caching of frequently accessed web pages
 Established mirror sites requiring fewer hops
 Reduce bandwidth intensive elements such as video
 Using compression techniques that minimize traffic
Computer Networks

Advantages of Computer Networks
 Accessing databases, transferring, processing and retrieval of data can be done online
 Online credit card checking, e-commerce and Electronic Fund Transfer are possible
 Easily administered
 Provides an efficient means of communication such as e-mail, voice mail, and video
conferencing
 Users can be easily added or removed
 Tasks of distributed nature can be processed by distributed computer systems by exchanging
data
 Provides a way to share data, programs, peripherals, computing power and information
 Provides data security (comparing to other communication devices)

5 | P a g e

Benefits of a network:
 Information sharing
 Hardware sharing
 Software sharing
 Collaborative environment
Challenges
 Computer hackers
 Malicious software
o Ex: viruses, Worms, Trojan horses
 Cost
o Network setup
o Maintenance
 Equipment malfunctioning
 System failures

Network Types
Scale Type Example
Vicinity PAN
(Personal Area Network)
Bluetooth (ex: headset)
Building
(limited geographic area)
LAN
(Local Area Network)
Wifi, Ethernet
City
(medium geographical area)
MAN
(Metropolitan Area Network)
Cable, DSL
Country
(large geographical area)
WAN
(Wide Area Network)
Large ISP
Planet The Internet
(network of all networks)
The Internet

6 | P a g e

Network Topologies
Arrangement of various elements (links, nodes etc) of a computer network. i.e. the topological
structure. It may be depicted physically or logically.
Different network topologies:
Bus topology

Ring topology

Star topology

Mesh topology

Tree topology
 a combination of bus topology and
star topology

Hybrid topology
 Hybrid networks use a combination of any two
or more topologies, in such a way that the
resulting network does not exhibit one of the
standard topologies (e.g., bus, star, ring, etc.). A
hybrid topology is always produced when two
different basic network topologies are
connected.

Local Area Networks (LAN)
Spans a relatively small area
Properties of LAN:
 LAN are usually confined to one building or a group of buildings
 Usually privately owned
 Provides higher DTR
 Provide full time connectivity to local services
 The most common type of LAN is Ethernet

7 | P a g e

Components of LAN:
 Router
 Bridge
 Hub
 Ethernet switch
 Repeater
Wide Area Networks (WAN)
Covers a very large geographical area such as a country, continent or even the whole world
Properties of WAN:
 Provide long distance communication of data or information
 Operating at low DTRs
 Provide full time/ part time connectivity
 Connect devices separated over wide, even global areas
Components of WAN:
 Router
 Communication Server
 Modem
Types of WANs:
 MAN (Metropolitan Area Network)
 PAN (Public Access Network)
 VAN (Value Added Network)
 VPN (Virtual Private Network)

Metropolitan Area Network (MAN):
 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)
 Interconnection of networks in a city into a single larger network
 Interconnection of several LANs by bridging them with backbone lines
 Example: subscriber networks, TV service
Public Access Network (PAN):
 Could be accessed by public
 Examples: image services, web services

8 | P a g e

Value Added Network (VAN):
 A value-added network (VAN) is a private network provider (sometimes called a turnkey
communications line) that is hired by a company to facilitate electronic data interchanges (EDI)
or provides other network services.
Virtual Private Network (VPN):
 A network that uses a public telecommunication infrastructure, such as the Internet, to provide
remote offices or individual users with secure access to their organization’s network.
 Example: Research and development work
 Became popular as more employees worked in remote locations
 Employees can access the network(intranet) from remote locations
 The Internet is used as the backbone for VPNs (we are creating this network on top of internet)
 Secured networks
o Level of security should be high becoz we have to prevent data from falling into wrong
hands, so we encrypt data before we send
o These systems use encryption and other security mechanisms to ensure that only
authorized users can access the network and that the data cannot be intercepted
o Encryption definition: scrambling the plain text, so that others cannot understand
 This kind of networks are also called tunnel networks
o Though these are on internet, these are virtually private.

Figure 3: How a VPN client connect with the VPN sever through tunnel

Figure 4: Big picture of VPN

9 | P a g e

Benefits of VPN:
 Reduce cost tremendously from reduction of equipment and maintenance costs
o No cables becoz Internet is used as a back bone
 Scalability
 Secured
o Only authorized people can access
Internetwork:
 An internetwork is a collection of individual networks, connected by intermediate networking
devices, that functions as a single large network.
 Network bridging technologies are used here
o Network Bridging Definition: Network bridging is the action taken by network
equipment to create an aggregate network from either two or more communication
networks, or two or more network segments.
o 4 types of Network bridging technologies
1. Simple bridging
2. Multiport bridging
3. Learning or transparent bridging
4. Source route bridging
 Ex: internet

Figure 5: Internetworking by simple bridging

10 | P a g e

Storage Area Network (SAN)
High speed special type of network that connects storage devices

Figure 6: SAN is a dedicated Network for attaching servers to storage devices
Characteristics of SAN:
 Used to enhance storage with devices, such as disk arrays, tape libraries, and optical jukeboxes
 Accessible to servers so that the devices appear to the operating system as locally attached
devices
 Has its own network of storage devices that are generally not accessible through the local area
network (LAN) by other devices.
 The cost and complexity of SANs dropped in the early 2000s to levels allowing wider adoption
across both enterprise and small to medium-sized business environments.
 A SAN does not provide file abstraction, only block-level operations. However, file systems built
on top of SANs do provide file-level access, and are known as shared-disk file systems.
Benefits of SAN:
 Simplifies storage administration
 Increase performance of the network due to high access speed and efficiency
 Adds flexibility and scalability since cables and storage devices do not have to be physically
moved to shift storage from one server to another
 Ability to allow servers to boot from the SAN itself
o This allows for a quick and easy replacement of faulty servers since the SAN can be
reconfigured so that a replacement server can use the LUN of the faulty server.
 Enables storage replication either implemented by disk array controllers, by server software, or
by specialized SAN devices.
o Replication in computing involves sharing information so as to ensure consistency
between redundant resources, such as software or hardware components, to improve
reliability, fault-tolerance, or accessibility.

11 | P a g e

Control Area Network (CAN bus)
A serial network of micro controllers, sensors, devices and actuators in a system or subsystem for real
time control applications.
Ex: automatic controlling system of a Toyota car
CAN bus:
 A vehicle bus standard designed to allow microcontrollers and devices to communicate with
each other in applications without a host computer. It is a message-based protocol, designed
originally for multiplex electrical wiring within automobiles, but is also used in many other
contexts.

Figure 7: CAN bus example
Communication Media (Transmission Media)
Media which network and nodes are connected
Two types of transmission media:
1. Guided (wired) media
 Waves are guided along a solid medium
2. Unguided (wireless) media
 Provide means for transmitting electromagnetic signals (waves) through air, but without
any guidance to the wave

Figure 8: Big picture of Communication media
Communication
media
Wired/ Guided
Twisted pair Coaxial cable Fiber optics
Wireless/
Unguided
Radio waves Microwaves Infrared (IR)

12 | P a g e

Twisted Pair cable

Figure 9: Twisted pair cables
Twisted pair:
 A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern.
 Typically, a number of pairs are bundled together into a cable by wrapping them in a tough
protective sheath as shown in the Figure 9.
Why twisting?
 Twisting decreases the crosstalk interference between adjacent pairs in a cable.
 Tighter twisting provides much better performance, but also increases the cost.
Usage:
 LANs
Two common types of twisted pair cables:
1. UTP – Unshielded Twisted Pair
 Subject to external electromagnetic interferences
 Ex: Ordinary telephone wire, LANs (Ethernet)
2. STP – Shielded Twisted Pair
 Expensive than UTP (therefore not much popular)
 Ex: industrial setting where high amounts of electromagnetic interference
Attenuation Characteristic of UTP:
 Attenuation increases when diameter (measured in gauge in practice) increases is high.

13 | P a g e

Common Applications:
 As local loop in telephone lines
 Digital subscriber lines (DSL)
 LANs (10BaseT, 100BaseT)
o Connector is RJ45 Ethernet

Coaxial cable

Figure 10: Cross section of a coaxial cable
Coaxial cable:
 This type of cables consists of a hollow outer cylindrical conductor (also called metallic shield)
that surrounds a single inner wire conductor (also called centre core).
 Between the above two, there is a dielectric insulator ring.
 Outer conductor (metallic shield) is covered with a plastic jacket (also called outer protective
shield).
Four components of a coaxial cable:
1. Plastic jacket
2. Metallic shield
3. Dielectric insulator
4. Centre core
Benefit due to shielding:
 Coaxial cables are much less susceptible to interference or crosstalk than twisted pair.
o Outer conductor can be grounded. Therefore inner conductor is shielded from
interferences and disturbance. i.e. reduced crosstalk.

14 | P a g e

Common applications of coaxial cables:
 Television distribution (cable TV)
 Long distance telephone transmission
 LANs
Coaxial cables and twisted pair:
 Twisted pair cabling is better suited when cost and installation are an issue and if EMI and
crosstalk are not too much of a problem. However, they do not provide electrostatic shielding
and do not work as well as coaxial cables at higher frequencies.
Fiber Optic cable (FO cable)

Figure 11: Fiber optic cables
Fiber optic cables:
 A fiber optic cable consists of a bundle of glass/plastic threads, each of which is capable of
transmitting messages modulated onto pulses of light waves.
Characteristic of FO:
 Very high speed
 Lack of attenuation (less noise, high purity of signal)
 High capacity data transmission (higher bandwidth)
 Expensive
 Relative safe way to transmit (not easy to trap what is being transmitting

Figure 12: Single mode and Multimode Fiber

15 | P a g e

Advantages and disadvantages of twisted pair, coaxial cables, and FO cables

Twisted Pair Coaxial Cables Fiber Optic Cables
Advantages * Cheaper
* Less susceptible to
electrical interference
and crosstalk
* Because it is
electrically "cleaner",
STP wire can carry data
at a faster speed
* Support greater cable
lengths between
network devices than
twisted pair.
* Extra protective
plastic cover that help
keep moisture away.
* Less susceptible to
electrical interference
and crosstalk than
twisted pair

* One single mode
fiber can replace a
metal of time larger and
heavier.
* Multi-mode optical
cable has a larger
diameter and can be
used to carry signal
over short distance.
Disadvantages * STP wire is that it is
physically larger and
more expensive than
twisted pair wire.
* STP is more difficult
to connect to a
terminating block.
* Thick coaxial is that it
does not bend easily
and is difficult to install.
* Expensive than
twisted pair
* Difficult to make
connections to fiber
optic cable.
* Highly expensive
* The optical fiber must
be highly polished to
allow light to pass with
little loss.

16 | P a g e

Main Network Hardware Components
All networks are made up of basic hardware building blocks to interconnect nodes of a network. i.e end
user nodes devices and network devices (see page 02: Nodes)
Network hardware components include:
 Hub
o Electronic device (with a number of ports) used in a LAN to link groups of computers,
hub is a multi-port repeater
 Repeaters/amplifiers
o Electronic devices that receive signals and amplify and send them along the network.
There are high end repeaters and low end repeaters
 Routers
o Electronic devices used to ensure messages are sent to their intended destinations
 Switches
o Hub can be replaced by a switch; bridge is a primitive version of a switch; therefore
switch can be called a multi-port bridge
 Gateway
o Consists of hardware and/ or software that allows communications between dissimilar
networks
 Bridges
o Consists of hardware and/ or software that allows communication between two similar
networks
*note
If there are very few nodes, a hub is enough.
If you want segments of end user nodes, use a hub to connect end user nodes to form a segment, and
then use a switch to connect hubs. If you no need segments, you can use a switch to connect all the end
user nodes.
Within LAN- a hub is used, LAN – LAN- a bridge is used, segments of a LAN- a switch is used, LAN – MAN-
a router is used.
Bridges, switches, and hubs are very much alike.
 A hub can be replaced by a switch.
 Switch can be called a multi-port bridge.
 Bridge is a primitive version of a switch.

17 | P a g e

Why interconnect?
 To separate/ connect one corporate division with another
 To connect two LANs with different protocols
 To connect a LAN to the internet
 To break a LAN into segments to relieve traffic congestion
 To provide a security wall between two different types of users
 Ti connect WLAN to LAN
 Remote access
Refer:
http://www.scorelift.com/resources/computer-networks-basic-hardware-requirements.html
Network interface cards (NIC):
A network card, network adapter, or NIC is a piece of computer hardware designed to allow computers
to communicate over a computer network. It provides physical access to a networking medium and
often provides a low-level addressing system through the use of MAC addresses.
Each network interface card has its unique id. This is written on a chip which is mounted on the card.

Figure 13: NIC
Repeaters
Repeater is an electronic device that receives a signal, clean it of unnecessary noise, regenerates it and
retransmits it at a higher power level, or to the other side of the obstruction, so that the signal can cover
longer distances without degradation.
Receive signal -> clean signal -> regenerate signal -> retransmit signal
In most twisted pair Ethernet configurations, repeaters are required for cables that runs longer than
100m.

18 | P a g e

A repeater with multiple ports is known as a hub.
Repeaters works on the physical layer of the OSI model.
Repeaters require a small amount of time to regenerate the signal. This can cause a propagation delay
which can affect network communication when there are several repeaters in a row. Many network
architectures limit the number of repeaters that can be used in a row.

Figure 14: Repeater and Hub(multi-port repeater)
Hub (Multi-port repeater)
A hub interconnects two or more work stations into a LAN. When a workstation transmits to a hub, the
hub immediately resends the data frames to all the connecting links. i.e. if a signal is coming from one
port, it amplifies the signal and repeat (copy) it to other ports.
Hub is used in star topology. A hub works at the physical layer of the OSI model.

Figure 15: 1-Port BNC to 8-Port RJ45 10M Network Hub
10M in the above hub means that 10Mbps data transmission rate. Ports numbered from 1 to 8 are to
connect computers. The uplink is to connect the hub to a switch, router or to another hub.
Uplink also called “Link”, “Out” etc.
Bridge
A network bridge connects multiple network segments at the data link layer of the OSI model. Therefore
bridges connect networks and forward frames from one network to another.

19 | P a g e

Bridges broadcast to all the ports except the port on which the broadcast was received. However,
bridges do not promiscuously (jumbles) copy traffic to all the points, as hubs do, but learn which MAC
addresses are reachable through specific ports. Once the bridge associates a port and an address, it will
send traffic for that port only.
Bridges learn the association of ports and addresses by examining the source address of frames that it
sees on various ports. Once a frame arrives through a port, its source address is stored and the bridge
assumes that MAC address is associated with that port. The first time a previously unknown destination
address is seen, the bridge will forward the frame to all ports other than the one on which the frame
arrived.
Bridges come in three basic types:
1. Local bridges
2. Remote bridges
3. Wireless bridges

Figure 16: A Bridge
Information only crosses the bridge if they are addressed for a host on the other side (selective
forwarding).

Figure 17: How bridges help to connect two networks.

20 | P a g e

Switches (Multi-port Bridges)
A network switch is a device that forwards and filters OSI layer 2 (Data link layer) datagrams (chunks of
data communication) between ports (connected cables) based on the MAC address in the packets.
Unlike hubs, switches make decisions of frames on the basis of MAC addresses. A switch has numerous
ports, facilitating a star topology for devices, and cascading additional switches.
Some switches are capable of routing based on Network layer of OSI model addressing additional logical
levels; these are called multi-layer switches.
We connect twisted pair cable with RJ45 connectors to ports on a switch. A switch can have many as 96
ports.
Switches learn which MAC addresses are associated with particular ports by noting source addresses as
frame enter the switch. Broadcast frames are forwarded to all ports of a switch.
Collisions occur only when two separate hosts attempts to communicate with the same third host.
Switches can send and receive information at the same time, so they can send information faster than
hubs.

Figure 18: A switch
Differences between a bridge and a switch:
 Switches have many ports; bridges only have two (or some less number of) ports.
 Switches perform forwarding in hardware, while bridges perform it in software.
o Bridge may introduce overhead.
o A switch must be able to maintain the full speed of the medium between any two ports.
*note there are confusions
The IEEE standards clearly don’t state that bridges will have only two ports.
There’s nothing in the standard that says bridging must or should be done in software.

21 | P a g e

Routers
A router is an internetworking device that forwards packets between networks by processing
information found in the datagram or packet. This works at network layer of OSI model.
What is a router made of?
A router has many of the same components as your computer,
 CPU
 Memory
 I/O interfaces (mostly network interfaces)
 Operating System
A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP’s
network.
Routers ate located at gateways, the places where two or more networks connect.
Routers are critical devices that keep data flowing between networks and keep the networks connected
to the internet.
A router is an internetworking device that forwards packets between networks by processing
information found in the datagram or packet. In many situations, this information is processed in
conjunction with the routing table (forwarding table). Routers use routing tables to determine what
interface to forward packets. i.e. when data arrives from one of the segments, the router decides, which
segment to forward that data.
Routers often incorporate firewall functions.
Differences between routers and bridges:
Routers Bridges
Each host’s IP address must be configured MAC addresses of hosts are hard wired
If network is reconfigured, IP addresses may need
to be reassigned
No network configuration needed
Routing done via RIP or OSPF Routing done by
 learning bridge algorithm
 spanning tree algorithm
Each router manipulates packet (ex: reduces TTL
field)
Bridges do not manipulate frames

22 | P a g e

Gateways
A network node equipped for interfacing with another network that uses different protocols
Gateways also called protocol converters can operate at any network layer. The activities of a gate are
more complex than that of the router or switch as it communicates using more than one protocol.
Gateway is a term that was once used to refer to a routing device. Today in the TCP/IP world, the term
router is used to describe such a device. The term gateway is now refers to special-purpose devices, that
perform protocol conversions. Gateway implement application layer conversions of information
received from various protocols.
Examples of gateways
 VocalTec Gateway
 RadVision Gateway
Firewalls
Firewalls are the most important aspect of a network with respect to security. A firewall system does
not need every interaction or data transfer monitored by a human, as automated processes can be set
up to assist in rejecting access requests from unsafe sources, and allowing actions from recognized ones.
The vital role firewall play in network security grows in parallel with the constant increase in cyber
attacks for the purpose of stealing/ corrupted data, planting viruses, etc.
Modems
Modem is a device or program that enables a computer to transmit data over, for example, telephone
or cable lines. Computer information is stored digitally, whereas information transmitted over telephone
lines is transmitted in the form of analog waves. A modem converts between these two forms.
How networks are categorized

Networks are usually classified using three properties
1. Topology
 Bus
 Ring
 Star
2. Protocol
3. Architecture
 P2P
 Client/server

23 | P a g e

Network Architecture
The way a computer network is designed and built.
The two types of network architecture:
1. Peer to peer (P2P/Workgroup) architecture
2. Client/Server architecture
Refer:
http://www.techrepublic.com/article/understanding-the-differences-between-client-server-and-peer-
to-peer-networks/
https://www.youtube.com/watch?v=uliny6fWbvs
Client/Server Architecture
In a Client/ Server (Server-based) network, the server is the central location where users share and
access network resources. This dedicated computer controls the level of access that users have for
shared resources. Each computer that connects to the network is called a client computer. In a server
based network, users have one user account and password to log on to the server and to access shared
resources ex: Web authentication at UOM wireless
What can a server do?
Servers can perform multiple roles – some are;
 They can run email servers
 They van share files (file server)
 Control Internet Access (proxy server)
 Host Web Sites (web server)
 Control printing for multiple computers (print server)
Hardware and software required by to implement Client/Server Architecture
Hardware Software
Server
 Enough Backing Storage/RAM
 Powerful enough processor (multi-
core/multi processor)
Server
 Networking Operating System
Client
 Desktops
 Laptops/tablets
Client
 Operating System
 Suitable Application software

24 | P a g e

Levels of Access:
 Servers can also control the levels of access that client machines or users have on the network
o Administrators may have full access whereas normal users (such as pupils) will have
limited access
 Rights that may be assigned are:
o Read/ write/ delete…


Figure 19: Client server network
Advantages and disadvantages of Client server network:
Advantages Disadvantages
 facilitates resources sharing (centrally
administered and control)
 facilitate system backup and recovery
 enhance security (only administrator can
have access to server)
 support more users (difficult to achieve
with P2P networks
 high cost for servers
 need expert to configure the network
 introduce a single point of failure to the
system
 congestion In network

25 | P a g e

Peer to Peer (P2P/Workgroup) Architecture
In a P2P network, a group of computers is connected together so that users can share resources and
information. There is no central location for authenticating users, storing files, or accessing resources.
This means that users must remember which computers in the workgroup have the shared resources or
information that they want to access. It also means that users must log on to each computer to access
the shared resources on that computer.
No hierarchy among computers, all are treated the same, No administrator responsible for the network.
Where P2P network is appropriate:
 10 or less users
 No specialized services required
 Security is not an issue
 Only limited growth in the foreseeable future (numbers of nodes to be added in future)

Figure 20: P2P network
Advantages and disadvantages of P2P network:
Advantages Disadvantages
 easy to install and configure
 all the resources and contents are shared
by all the peers
 more reliable as central dependency is
eliminated, failure of one peer doesn’t
affect the functioning of other peers
 no need of a full time system
administrator, user can control the shares
resources
 cost is comparatively less
 since the system is decentralized, difficult
to manage by the administrator
 difficult to uphold security policy
 security is less (malware such as viruses,
spy ware, Trojans can easily transmitted
over P2P architecture)
 data recovery or backup is very difficult
(each computer should have its own
backup system)
 lots of movies, music, and other copyright
files are transferred using this type of file
transfer. Ex: torrents

26 | P a g e

OSI Model
The Open Systems Interconnection Model
What is OSI?
 A conceptual model that characterizes and standardizes the communication functions of a
telecommunication or computing system without regard to their underlying internal structure
and technology.
Goal of OSI Model:
 Interoperability of diverse communication systems with standard protocols
OSI consists of 7 abstract layers:

Figure 21: 7 communication layers of OSI model
How to memorize the sequence?
Programmers Do Not Throw Sausage Pizza Away 
*note read the following descriptions from bottom to top, then you will understand easier.
Physical layer (L1):
 Provides mechanical, electrical and other functional aids available to activate or deactivate
physical connections, they maintain and transmit bits over. i.e.,s transmission of raw bits across
the transmission media.

27 | P a g e

Data link layer (L2):
 Ensures a largely error-free transmission, controls access to the transmission medium, providing
checksums and acknowledgment and repeat procedures in case of errors or losses. It breaks the
packets into frames. Error detection and correction applies here.
Network layer (L3):
 Ensures the relaying into data packets including the route search (routing), network addresses.
This layer breaks messages into packets and transfers them across the network. Network layer
has the responsibility to send packets to correct destination, this feature is called routing. Nodes
here may be computers, routers, switches etc.
Transport layer (L4):
 Ensures the decomposition into data packets and congestion avoidance, this layer receives data
from the session layer and make messages. These messages are passed on to the network layer.
Session layer (L5):
 Ensures the process of communication between two systems, treated session terminations i.e.
allows users of different machines to create sessions and communicate, applications create
different transport streams, and session layer can bind all these streams belonging to the same
application ex: if you are doing a video chat session layer combine the audio stream and the
video stream.
Presentation layer (L6):
 Converts system specific data representation in an independent form that provides data
compression and encryption, i.e. consider the format of data and appropriate conversions have
to be done
Application layer (L7):
 Provide some protocols which applications can communicate with each other ex: FTP,HTTP
This is a model that allows any two different systems to communicate regardless of their underlying
architecture (hardware or software).
The OSI model is not a protocol; it is model for understanding and designing a network architecture that
is flexible, robust and interoperable.

28 | P a g e

Benefits of the OSI model:
 Reduces complexity
 Standardizes interfaces
 Facilitates modular engineering
 Ensures interoperable technology
 Accelerates evolution
 Simplifies teaching and learning


Figure 22: How layers are communicating according to OSI model
Every layer communicates with the corresponding layer of the other system using protocols. (Protocols
work with corresponding layers of different machines.)
Every layer communicates with the layer above and below it. We say that it provide some service to
those layers. (Services work with layers of the same machine.) Services take place at interfaces of the
above diagram.

29 | P a g e

Types of addresses related to computer networking

Ethernet:
 Ethernet is a LAN architecture developed in 1976.
 It was commercially introduced in 1980 and standardized in 1985 as IEEE 802.3
 Bus and star topologies use Ethernet and Ethernet supports data transfer rates of 10Mbps.
 Latest versions of Ethernet support 100Mbps, 1Gbps, etc.


Figure 23: Ethernet evolution through four generations
There are mainly two types of addresses
1. Physical addresses
 MAC address
2. Logical addresses
 IP address
Media Access Control (MAC) address:
 Also called hardware addresses.
 Contains 6 bytes separated with colons or dashes
Ex: 00:A0:CC:23:AF:4A or 00-A0-CC-23-AF-4A
 They uniquely identify an adapter on a LAN.
Internet Protocol (IP) address:
 IP addresses serve as the location of websites on the internet as well as the workstations that
are connected to the web.
 IP addresses are made up of 4 bytes according to IPv4. Each byte is called an Octet.


Ethernet
evolution
Standard
Ethernet
(10Mbps)
Fast Ethernet
(100Mbps)
Gigabit
Ethernet
(1Gbps)
Ten Gigabit
Ethernet
(10Gbps)

30 | P a g e

There are 2 types of IP addresses
1. Static IP addresses
 Found on servers and remain the same
 A domain name server assigns a human readable web address to each static IP address
to make it more user friendly.
2. Temporary IP addresses
 Found only on PC’s are constantly changing each time it is logged on
 Temporary IP addresses are assigned by ISP each time it is logged on to the internet
becoz IP addresses are limited. Therefore cannot assign a user a permanent IP address.
Network/ Communication Protocols
An agreed se t of rules and procedures for transmitting data between two or more devices
Features determined by the protocol are;
 How the sending device indicates it has finished sending the message
 How the receiving device indicates it has received the message
 What is the type of error checking mechanism to be used
How networks can be classified?
 From topology
 From protocol
 From architecture

31 | P a g e

Lesson 02 Virtual LANs (VLANs)

Outline:
 Define VLANs
 List the benefits of VLANs
 Explain how VLANs are used to create broadcast domains
 Explain how routers are used for communication between VLANs
 List common VLAN types
 Define ISL and 802.1Q
 Explain the concept of geographic VLANs
 Configure static VLANs on switches
 Verify and save VLAN configurations
 Delete VLANs from a switch configuration
Motivation:

Figure 24: A large flat LAN
Typical problems of large LANs include
 Multicast and unknown MAC address traffic
 Management issues
 Security issues
 i.e. everybody shares everybody’s resources
Solution:
Make all departments in its L3 network. i.e. you need so many routers to connect all department
networks. This is highly costly. There comes Virtual LAN concept with L2 switches.

32 | P a g e

VLAN introduction
VLAN:
 Any broadcast domain that is partitioned and isolated in a computer network at the Data Link
Layer (L2)
 Logical Network Layer(L3) separation acting in Data Link Layer (L2)
 Every VLAN is essentially a Network Layer(L3) IP network

Figure 25: The concept of VLANs
Refer:
https://www.youtube.com/watch?v=Z8s_sxzw3zI
VLANs logically segment switched networks based on the functions, project teams, or applications of the
organization regardless of the physical location or connections to the network.

Figure 26: VLAN segmentation is independent of physical
connection or location

Figure 27: There are Data VLANs and Voice VLANs

33 | P a g e

*note
 VLANs are created to provide segmentation services traditionally provided by physical routers in
LAN configurations.
 VLANs provide scalability, security, and network management. Routers in VLAN topologies
provide broadcast filtering, security, and traffic flow management.
 Broadcast domain:
 A logical division of a computer network, in which all nodes can reach each other other by
broadcast at the data link layer (L2). A broadcast domain can be within the same LAN segment
or it can be bridged to other LAN segments.
*note
 A VLAN is a broadcast domain created by one or more switches.
 The network design in Figure 26 creates two separate broadcast switches, while the network
design in Figure 27 creates three separate broadcast switches.
Without VLANs Example 01



Figure 28: 3 LANS working separately without configuring it
as a VLAN
Each group is on a different IP network and on a
different switch.
Three switches had used to create the L3
separation
Without VLANs Example 02

2 subnets, but same VLAN
With VLANs Example 01

Figure 29: After configuring as 3 VLANs
Switch is configured with ports on the appropriate
VLAN. Still, each group on a different IP network,
they are on the same switch.


Without VLANs Example 02

2 subnets, 2 VLANs

34 | P a g e

Ports on a switch
Refer:
http://www.freeccnastudyguide.com/study-guides/ccna/ch7/7-3-types-switch-ports/
A switch port can be in one of two modes:
1. Access mode
 A port in access mode belongs to one specific VLAN and sends and receives regular
Ethernet frames in untagged form.
 The switch interfaces connected to devices such as desktops, laptops, printers etc, are
typically configured as access ports.
 Used to connect computers etc.
2. Trunk mode
 The distinguished feature of trunk ports is that they carry traffic from multiple VLANs at
the same time.
 Such interfaces are most commonly configured between two switches, or between a
switch and a router, or even between a server and a switch.
 Trunking is a great feature because a single physical link is shared by multiple VLANs still
allowing traffic isolation between VLANs.
 Used to coneect two switches.

Figure 30: Trunk port
 In absence of such feature we would have required one inter-switch per link or one
Access mode link between switches per VLAN.

Figure 31: Separate Access mode link between switches per each VLAN

35 | P a g e

There are two ways a switch port can settle down into one of the above modes. Those two ways are:
1. Static method
 You can manually configure a switch port to be in the access or trunk mode in the static
method.
 The network administrator is responsible for keying in the mapping between the ports
and VLANs.
2. Dynamic method
 You can let Dynamic Trunking Protocol (DTP) run on an interface to negotiate trunking in
the dynamic method.
 The ports are able to dynamically work out their VLAN configuration.
 This uses a software database of MAC address to VLAN mapping which the network
administrator must set op first.
 Trunking protocol examples are ISL 0r 802.1Q
*note
 Each switch port can be assigned to a different VLAN.
 Ports assigned to the same VLAN share broadcasts.
 Ports that do not belong to that VLAN do not share these broadcasts.
Static membership:
 Static membership VLANs are called port-based and port-centric membership VLANs.
 As device enters the network, it automatically assumes the VLAN membership of the port to
which it is attached.
 The default VLAN for every port in the switch is the management VLAN, i.e. VLAN1 and may not
be deleted.
 All other ports on the switch may be reassigned to alternate VLANs.
*important note

Figure 32: 2 VLANs 2 Subnets

36 | P a g e

VLANs are assigned on the switch port. There is no VLAN assignment done on the host usually.
In order for a host to be a part of that VLAN, it must be assigned an IP address that belongs to the
proper subnet. VLAN = Subnet
Assigning a host to the correct VLAN is a 2 step process:
1. Connect the host to the correct port on the switch.
2. Assign to the host the correct IP address depending on the VLAN membership.
Dynamic membership:
 Dynamic membership VLANs are created through Network management software.
 CiscoWorks 2000 or CiscoWorks for Switched Internetworks is used to create Dynamic VLANs.
 Dynamic VLANs allow for membership based on the MAC address of the device connected to
the switch port.
 As a device centers the network, it queries a database within the switch for a VLAN
membership.
Benefits of VLANs:
Key benefit of VLANs is that they permit the Network Administrator to organize the LAN logically instead
of physically.
The administrator is able to all of the following:
 Easily move workstations on the LAN
 Easily add workstations to the LAN
 Easily change the LAN configuration
 Easily control network traffic
 Improve security
*note
For the communication of two computers that are belonging to two different VLANS we need a router.

37 | P a g e

VLAN Tagging
There are two types of protocols:
Tagging Method Media Description
Inter Switch Link (ISL)
*also called CISCO
Proprietary
Fast Ethernet ISL header encapsulates
the LAN frames and
there is a VLAN ID field
in the ISL header
Frame is Lengthened
802.1Q Fast Ethernet IEEE defined Ethernet
VLAN protocol
header is modified
Cisco recommends using 802.1Q
802.1Q Trunking Protocol
A special tag is added to frame depending on the VLAN number.
If we did not tag the information, the switch will finds it difficult to distinguish between VLANs.
VLAN tags are added only when transmitting through trunk links.
Every 802.1Q trunk port must have one Native VLAN. It is the default VLAN. The traffic for the Native
VLAN does not get tagged.
Native VLAN
Native VLAN is an 802.1Q concept: frames belonging to Native VLAN are sent untagged through trunk
ports.
Native VLAN concept has been introduced as a way to provide backward compatibility to a device that
doesn’t support VLAN tagging: if a switch port is configured to be a trunk unconditionally without Native
VLAN concept only NIC that support VLAN tagging could be connected to the port.
Not all PC Network adapters support VLAN tags so the authors of 802.1Q standard introduced 802.1Q to
provide backward compatibility to allow a dumb device to connect to the network on single VLAN =
Native VLAN.
To be noted that Cisco ISL has no Native VLAN concept. 802.1Q is most used nowadays.
*note
Do practical with Cisco packet tracer.
 Creating a VLAN
 View the list of VLANs
 Assigning a Port to a VLAN
 Delete the VLAN membership of a port
 Assigning mode of a port access/ trunk etc

38 | P a g e

Lesson 03 Network Layer
The network layer is responsible for the source-to-destination delivery of a packet possible across
multiple networks.
If two systems are connected to the same link, there is usually no need fpr a network layer. However, if
the two systems are attached to different networks, there is often a need for the network layer to
accomplish source-to-destination delivery.
Important network device: Router
Device that does routing part in a VLAN is the router. Inside a LAN, if we don’t have different VLANs, we
don’t need a router, a switch is enough. However to connect a LAN to a WAM or internet we need a
router.
Inside a subnet only layer 2 is enough. i.e., physical address or the MAC address is enough.
To send beyond LAN, we need an additional address. i.e., a logical address or an IP address is needed.
Functions of router limited up to network layer.
If the congestion at router is very high, packets may get lost.

Figure 33: Functions of router limited up to network layer.
IP addresses