Sunteți pe pagina 1din 74

lOMoARcPSD|827595

Comp247-notes - Summary Data Communications

Data Communications (Macquarie University)

StuDocu is not sponsored or endorsed by any college or university


Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)
lOMoARcPSD|827595

COMP 247 DATA COMMUNICATIONS


WEEK 1: INTRO TO DATA COMMUNICATIONS

WHY NETWORKS ARE IMPORTANT

• It is a necessity to have a network for every business, organisation.


• Modern organisations rely on the efficient transmission of data
• Enables distributed systems, real-time communication, e-commerce, and the Web

Data communications
means of electrical or optical transmission systems

• facilitate more efficient use of computers and improve the day-to-day control of a business
by providing faster information flow.

This contrasts with the broader term Telecommunications, which includes the transmission of voice
and video (images and graphics) as well as data and usually implies longer distances.

BASIC NETWORK COMPONENTS

There are three basic hardware components for a data communications network:

Client is a user device to access network and receive data from server
e.g., desktops, laptops, tablets, cell phones, etc.

Server is a device that stores and transmits data to a client


e.g., Web server, mail server, file server

Circuit is a pathway or connection between client and server


e.g., copper wire, fibre optic cable, wireless

Both the server and client also need special-purpose network software that enables them to
communicate.

• A switch, like a hub, is a device that connects a number of computers together to make
a LAN. Most switches operate at the data link layer.
• The router is a special device that connects two or more networks. The router enables
computers on this network to communicate with computers. Routers operate at the
network layer. A Router is concerned with forwarding a message to its final destination it
is thus a long-distance device

Such networks are called peer-to-peer networks because the computers function as equals, rather
than relying on a central server or host computer to store the needed data and software.

1|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

TYPES OF NETWORKS

L A N LANs) covers a clearly defined small area, such as one floor or work area, a
single building, or a group of buildings. LANs often use shared circuits, where all computers must
take turns using the same circuit.

B N BN most LANs are connected to a BN, a larger, central network


connecting to several other networks and may span hundreds of feet to several miles

W A N WAN is a computer network that covers relatively larger geographical


area such as a state, province or country. It provides a solution to companies or organizations
operating from distant geographical locations who want to communicate with each other for sharing
and managing central data or for general communication. Most organizations lease circuits and use
those to transmit their data.

Two other common terms are intranets and extranets.

I
An intranet is a LAN that uses the same technologies as the Internet (e.g., Web servers, Java, HTML)
but is open to only those inside the organization.
Open only those inside the organization
e.g., employees accessing budgets, calendars

E
An organization may use an extranet to provide secure and safe access to individuals who work for
different organizations but require company data.
e.g., A company providing access to outside suppliers/contractors

NETWORK MODELS

Network Models divide communication functions into layers. The two most important network
models are the Open Systems Interconnection Reference (OSI) model and the Internet model.

O “ I R M O“I

- Created by International Standards Organization (ISO) as a framework for computer network


standards in 1984
- Based on 7 layers

I M
- the Internet model collapses the top three OSI layers into one layer.
- Based on 5 layers
- Based on Transmission Control Protocol/ Internet Protocol (TCP/IP) suite

2|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

MESSAGE TRANSMISSION USING LAYERS

Each computer in the network has software that operates at each of the layers and performs the
functions required by those layers.

Each layer in the network uses a formal language, or protocol, that is simply a set of rules that define
what the layer will do and that provides a clearly defined set of messages that software at the layer
needs to understand.

- For example, the protocol used for Web applications is HTTP.

Protocol Data Unit (PDU) contains information that is needed to transmit the message through the
network.
Each layer adds a PDU
PDUs act like nested envelopes
Encapsulation occurs when a higher level PDU is placed inside of a lower level PDU

The figure shows how a message requesting a Web page would be sent on the Internet.

3|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Advantages of Layers

- Networking functionality is modular and the software/hardware at any layer can be more
easily substituted
- Easier to troubleshoot or make changes to one layer at a time
- Application developers only need to worry about the application layer in their programs

Disadvantages of Layers
- Inefficient because the encapsulation/de-encapsulation at each layer requires processing
- Inefficient because encapsulation in a PDU increases overhead at each layer

NETWORK STANDARDS

Standards ensure that hardware and software


The use of standards makes it much easier to develop software and hardware that
link different networks because software and hardware can be developed one layer at a time.

There are two types of standards: formal and de facto.

De jure standards

The formal standardization process has three stages: specification, identification of choices, and
acceptance.

Formalized by an industry or government body

De facto standards

In the communications industry, de facto standards often become formal standards once they
have been widely accepted.
• For example, Microsoft Windows is a product of one company and has not been formally
recognized by any standards organization, yet it is a de facto standard.

There are many different standards used in networking today.

The figure outlines some of the most commonly used data


communication standards. For a network to operate, many
different standards must be used simultaneously. The sender
of a message must use one standard at the application layer,
transport layer, network layer, data link layer, and the
physical layer.
Each layer and each standard is different, but all must work
together to send and receive messages.

4|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

The application layer is the application software used by the network user.

The transport layer takes the message generated by the application layer and, if necessary, breaks it
into several smaller messages. The (PDU) at the transport layer is called a segment.

The network layer addresses the message and determines its route through the network. The data
link layer formats the message to indicate where it starts and ends, decides when to transmit it over
the physical media, and detects and corrects any errors that occur in transmission.

The physical layer is the physical connection between the sender and receiver, including the
hardware devices (e.g., computers, terminals, and modems) and physical media (e.g., cables and
satellites).

Each layer, except the physical layer, adds a protocol data unit (PDU) to the message.

TRENDS

Bring your own device (BYOD)


Huge demand for employees to connect their personal smartphones, tablets, and other devices to
organizational networks

The Internet of Things


Everything connects to the network
Networks need to support the increased demands of these devices

IMPLICATIONS FOR MAN AGEMENT

N I
T
A

WHAT IS A NETWORK AN D WHY WE HAVE THEM?

There are many ways to describe and analyse data communications networks. All networks provide
the same basic functions to transfer a message from sender to receiver, but each network can use
different network hardware and software to provide these functions.

A network consists of two or more computers that are linked to share resources, exchange files, or
allow electronic communications. The computers on a network may be linked through cables,
telephone lines, radio waves, satellites, or infrared light beams.
Computer system is a memory hierarchy

5|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

- Basic problem is to get data to where it will be used


- Efficiency based on data being near processor
So, we have distribution mechanisms memory sticks, portable disk drives,

Memory hierarchy is an implementation issue


Applications should not worry about whether data comes from registers, cache, RAM, or virtual
memory nor whether data comes from tape or over network
• Computational models abstract these implementation details away
• Programmer is only concerned with variables abstract away hierarchy

We want the fact that different network technologies are used to be transparent to the user and
application.

Advances in technology are enabling us to consolidate these different kinds of networks onto one
platform, referred to as the converged network. Unlike dedicated networks, converged networks
can deliver voice, video streams, text, and graphics between many different types of devices over
the same communications channel and network structure.

- provides access to a wide range of alternative and new communication methods that enable
people to interact directly with each other almost instantaneously.
- This network infrastructure uses the same set of rules, agreements, and implementation
standards.

Traditional Networks (Left) and


Converged Network (Right)

Circuit-switched networks are connection oriented. This means that before communication can take
place a circuit needs to be established. For example, a landline telephone call establishes the circuit
when you dial the number and when the receiver answers. That number is the destination of the call
and is only needed in call establishment. This circuit is then exclusively used for that call.

With a packet switch network, no connections need to be made. Each packet is placed in the
network the important point is that each packet must carry the destination address with it.
Packet-switched networks make more efficient use of resources. Packet switching is more flexible

6|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

and uses modern technologies. Telephone calls can be sent over a packet-switched network. Thus,
we have convergence of these technologies, which is everything becoming packet switched.

PROTOCOL STACK

Because the protocols are used at different layers and are stacked on top of one another, the set of
software used to understand the different protocols is often called a protocol stack.
- Each layer specifies a different protocol for handling a function or subsystem of the
communication process.

3 important points
- There are many protocols in networks.
- Protocols are arranged in a layered fashion.
- Several protocols may work together in a protocol stack.

Transport and Network Layer Protocols TCP/IP are the standard transport and network protocols
T
route through the network), and segmenting (breaking large messages into smaller packets for
transmission and reassembling them at the destination).

Addressing Before you can send a message, you must know the destination address. It is extremely
important to understand that each computer has several addresses, each used by a different layer.
One address is used by the data link layer, another by the network layer, and still another by the
application layer.

Types of addresses

7|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

ADDRESSES IN THE INT ERNET

In the internet, this is a called an IP address IP stands for Internet Protocol


• IP is the network layer protocol for the internet, responsible for addressing and delivery of
messages

IPV4 ADDRESSES

• 32 bit (4 byte) addresses


• In the computer stored in binary, but for human convenience written in decimal
• A byte can hold values in the range 0-255
• Each byte in an IP address written separately, so an example IP address is  127.97.201.4

SECURITY

Securing a network infrastructure includes physically securing devices that provide network
connectivity, and preventing unauthorized access to the management software that resides on those
devices.

In order to achieve the goals of network security, there are three primary requirements:

• Ensuring confidentiality: only the intended and authorized recipients can access and read
data. This is accomplished by having a strong system for user authentication, enforcing
passwords that are difficult to guess, and requiring users to change their passwords
frequently.
• Maintaining communication integrity: ensure information has not been altered in
transmission, from origin to destination. Data integrity is made possible by requiring
validation of the sender and by using mechanisms to validate that the packet has not
changed during transmission.
• Ensuring availability: means having the assurance of timely and reliable access to data
services for authorized users. Network firewall devices, along with antivirus software, can
ensure system reliability and the robustness to detect, repel, and cope with such attacks.

8|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 2: THE INTERNET

THE INTERNET

The Internet is the most used network in the world, the Internet is a network of networks a set of
separate and distinct networks operated by various national and state government agencies, non-
profit organizations, and for-profit corporations. The Internet exists only to the extent that these
thousands of separate networks agree to use Internet protocols and to exchange data packets
among one another.

All networks that connect to the Internet must rigidly conform to an unyielding set of standards for
the transport and network layers; without these standards, data communication would not be
possible.

THE WORLD-WIDE WEB (WWW)

The WWW provides a graphical users interface and enables the display of rich graphical images, pictures,
video, and sound clips over the Internet. The internet is the transport mechanism that enables the
WWW and the other services.

In order for the requests from the Web browser to be understood by the Web server, they must use the
same standard protocol. The standard protocol for communication between a Web browser and a Web
server is Hypertext Transfer Protocol (HTTP).

INTERNET ARCHITECTURE

Basic Internet architecture. ISP = Internet service provider; MAE = metropolitan area exchange; NAP = network
access point

9|Page

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Internet service providers (ISPs) connect the networks of their customers to the Internet.

NAPs were originally designed to connect only national ISPs. These National ISPs (Tier 1 ISPs)
provide services for their customers and to Regional ISPs (Tier 2 ISPs). These regional ISPs rely on the
national ISPs to transmit their messages to national ISPs in other countries. Regional ISPs, in turn,
provide services to their customers and to Local ISPs (Tier 3 ISPs) who sell Internet access to
individuals.
ISPs are autonomous systems and share routing info using BGP

ISP backbone

Larger backbone connections operating at 10 gbps and experimenting with 40 Gbps and 160 Gbps
Requires faster backbone switches and routers
Internet peak traffic estimated to reach 1 Pbps by 2018

CONNECTING TO AN ISP

A point of presence (POP) is the location where an ISP provides service to its customers. The pop
I“P This connection may be via a dial-up modem over a
telephone line or via a higher-speed circuit such as DSL, cable modem, or a T1.
Authentication is performed at the POP.

INTERNET ACCESS TECHNOLOGIES

Internet access technologies cannot be used for general-purpose networking from any point to any
point.
• Some organisations use WAN technologies to connect to their ISP

Common broadband technologies to connect to ISPs include:


Digital subscriber line (DSL)
Cable
Fibre to the home
Wireless

Digital Subscriber Line (DSL) is a family of point-to-point technologies designed to provide high-
speed data transmission over traditional telephone lines. The reason for the limited capacity on
traditional telephone circuits lies with the telephone and the switching equipment at the end offices.

The actual cable in the local loop from a home or office to the telephone company end office
can provide much higher data transmission rates.
Data Link: PPP (Point to Point Protocol)

10 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Many DSL technologies exist, but the most commonly implemented include:

• Asymmetrical DSL
o 3 channels of different width
o Faster download than upload
o Bandwidth dependent on distance from equipment

• Very-high-data-rate DSL
o Like Adsl, but with higher data rates and shorter range
o Often paired with fibre circuits to the node
o May be used for HD TV in addition to data and voice transmission

Cable
Typically offered by cable television service providers, the Internet data signal is carried on the same
coaxial cable that delivers cable television. It provides a high-bandwidth, always-on connection to
the Internet. With cable modems, each user must compete with other users for the available
capacity.

- Data Over Cable Service Interface Specifications (DOCSIS)

Fibre to the Home


- A dedicated point-to-point fibre optic service
- Architecturally similar to DSL and cable
- Expensive to deploy and these networks are emerging slowly

Wireless
The most popular types of fixed wireless are WiMax and wireless DSL, which requires a line of sight
between the communicating transmitters.

WiMax is sometimes called the new 4G mobile Internet. It works similarly to Wi-Fi, in that it enables
mobile users to connect into the Internet at speeds of 40 to 70Mbps.

LTE L T E G

Satellite dishes require a clear line of sight to the satellite, so satellite service might not be an option
in heavily wooded areas or places with other overhead obstructions. The availability of satellite
Internet access is a real benefit in those areas that would otherwise have no Internet connectivity at
all.

11 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

INTERNET GOVERNANCE

Because the Internet is a network of networks, no one organization operates the Internet.

Internet Society (ISOC) is a non-profit organization founded in 1992 to provide leadership in


Internet-related standards, education, access, and policy. Standards are developed through four
related organizations governed by ISOC.

BUILDING THE FUTURE INTERNET

- The process of creating the backbone to allows higher connection speed to happen
- NBN will enables us to have a better connection than better before
- Besides providing very high-speed Internet connections, these networks are intended to
experiment with new protocols that one day may end up on the future Internet.

BIG CHALLENGES FOR M ANAGEMENT

- The internet continues to increase its capacity


- Broadband internet data rates continue to increase
- Knowing what technology to use mobile internet access is rapidly growing, disrupting the
ISP the market

12 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 3: LOCAL AREA N ETWORK

WHY USE A LAN?

Covers geographically small area


Owned and managed by one organisation
Simple physical and logical topology

There are two basic reasons for developing a LAN: information sharing and resource sharing.

Information sharing refers to having users access the same data files, exchange information via e-
mail, or use the Internet. The main benefit of information sharing is improved decision making,
which makes it generally more important than resource sharing.

Resource sharing refers to one computer sharing a hardware device (e.g., printer, an Internet
connection) or software package with other computers on the network to save costs.

An alternative is to install the software on the network for all to use. This would eliminate the need
to keep a copy on every computer and would free up disk space.

LAN COMPONENTS

The client is the input- I


typically provides users with access to the network and the data and software on the server.

The server (or host computer) stores data or software that can be accessed by the clients. In client-
server computing, several servers may work together over the network with a client computer to
support the business application. Servers are usually microcomputers but may be minicomputers or
mainframes.

Network Interface Cards (NIC) is a circuit board installed onto computer so it can be connected to a
network. Deals with physical characteristics of the connection, provides data-link layer software
(firmware).

Network cable - Each computer must be physically connected by network cable to the other
computers in the network. Most LANs are built with unshielded twisted-pair (UTP) cable, shielded
twisted-pair (STP), or fibre-optic cable. Wireless LANs run on infrared or radio frequencies,
eliminating the need for cables.

A hub or a switch provide an easy way to connect network cables by permitting new computers to
be connected to the network as easily as plugging a power cord into an electrical socket. Hubs and
switches act as repeaters. Signals can travel only so far in a network cable before they attenuate and
can no longer be recognized.

13 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

A switch unlike a hub allows for the logical separation of a collision domain. Switches replace the
shared medium of legacy Ethernet with a dedicated segment for each station.
• These segments connect to a switch
• A switch can connect many of these single station segments. Some switches today can
support hundreds of dedicated segments.
• Both logical and physical topology of the network becomes a star topology.

Access point (AP) is a radio transceiver that plays the same role as a hub or switch in wired Ethernet
LANs. The AP acts as a repeater to ensure that all computers within range of the AP can hear the
signals of all other computers in the WLAN.

Power flows over unused twisted pair wires

The network operating system (NOS) is the software that controls the network. Every NOS provides
two sets of software:

The server version of the NOS provides the software that performs and manages networking
functions,
The client version of the NOS provides the software that performs the functions associated
with the data link and the network layers and must interact with the application software

Provides directory services about LAN resources


Network profiles specify resources that devices and users can access

NETWORK TOPOLOGY

Topology is the physical and logical arrangement of a network.

There are three primary LAN topologies:

- Bus only one transmitter at a time and message goes to all other nodes
- Ring message travels around ring, not passed on by destination (intervening nodes see it
and pass it on)
- Star multiple messages at one time, message only seen by destination

In a bus topology, stations are arranged along a single length of cable, which can be extended at
either end or at both ends to accommodate more nodes.

- Lots of wiring
- Central point of failure

14 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

A ring topology connects all computers in a closed loop with each computer linked to the next. The
circuits are full-duplex or half-
the ring. Computers in the ring may send data in one direction or the other, depending on which
direction is the shortest to the destination.

- one disadvantage of the ring topology is that messages can take a long time to travel from
the sender to the receiver.

A star topology connects all computers to one central computer that routes messages to the
appropriate computer. The star topology is easy to manage because the central computer receives
and routes all messages in the network. ฀ Both logical and physical topology of the network
becomes a star topology

- However, the
computer must process all messages on the network.

All nodes connected to a single central point

Physical Topology: how the network is physically installed (physically connected):


hardware and cabling

Logical Topology: how the network works conceptually using protocols (software)

- Bus topology: only one transmitter at a time and message goes to all other nodes
- Star topology multiple messages at one time, message only seen by destination
- Ring message travels around ring, not passed on by destination (intervening nodes see it
and pass it on)

WHAT IS ETHERNET AND WHY IS IT IMPORTANT

Ethernet is a LAN Technology that is a link layer protocol in the TCP/IP stack. It describes how
network devices can format the data for transmission to other network devices on the same
network segment and how to put that data on the network connection.

15 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

• Ethernet was originally developed by DEC, Xerox, and Intel but has since become a standard
formalized by the IEEE as IEEE 802.3.
• Ethernet is a protocol that is used to transfer information at the datalink layer.

MEDIA ACCESS CONTROL

Media access control refers to the need to control when computers transmit. With point-to-point
full-duplex configurations, MAC is unnecessary because there are only two computers on the circuit
and full duplex permits either computer to transmit at any time. It is critical to ensure that no two
computers attempt to transmit data at the same time but if they do, there must be a way to
recover from the problem.

Contention based-access - where each sender can transmit but clashes are possible. Used in
ethernet (CSMA/CD). Better for LANS with few stations.

Controlled access - controlling access to shared resources and major control-access methods include
X-ON/X-OFF and polling. Works better for high volume networks.

Ethernet uses a contention-based protocol called CSMA/CD (Carrier Sense - Multiple Access /
Collision Detect). Frames can be sent by two computers on the same network at the same time.
O C - Tolerates, rather than avoids collisions. In basic Ethernet, all nodes are connected
to the bus.

Carrier Sense (CS): A


Only transmit when no other computer is transmitting

Multiple Access (MA):


• All computers have access to the network medium

Collision Detect (CD):


- Declared when any signal other than its own detected
- If a collision is detected
o Wait a random amount of time then resend it
o Must be random to avoid another collision

• Broadcast Domain: a logical division of a computer network, in which all nodes can reach
each other by broadcast at the datalink layer. Broadcast domains can be on the same LAN
segment or it can be bridged/switched to other LAN segments.
- Repeaters are layer 1 physical devices (boost signal)

A LAN forms a collision domain.

16 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

HUB-BASED ETHERNET

W E A computers are connected to


one half-duplex circuit running the length of the network that is called the bus. It broadcasts the
frames to all ports

Hub not appropriate when:

- There is heavy network traffic.


- Segments are using different LANs.
- You need any kind of data filtering.

SWITCH-BASED ETHERNET

Switched Ethernet is identical to traditional Ethernet, except that a switch replaces the hub.
W E gical star and a physical star. A switch is an
intelligent device with a small computer built-in that is designed to manage a set of separate point-
to-point circuits. It is a multipoint bridge that uses MAC addresses to processes and forward data at
the DLL.

• Raise the bandwidth


• Separate the collision domain

That means that each circuit connected to a switch is not shared with any other devices; only the
switch and the attached computer use it.

When a switch receives a frame from a computer, it looks at the address on the frame and compares
the destination address on the frame to the addresses in its forwarding table to find the port
number on which it needs to transmit the frame.

17 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

It dramatically improves network performance because each computer has its own dedicated point-
to-point circuit, rather than the one common shared multipoint circuit in traditional hub-based
Ethernet. Because there are only two devices on each point-to-point circuit, the probability of a
collision is lower.

There are three modes in which switches can operate.

Store and forward switching frames retransmitted after entire frame is received and error check is
complete
• Slower, but fewer errors

Cut-through switching frames retransmitted as soon as destination address read


• Low latency, but some capacity wasted

Fragment-free switching frames retransmitted once the header (first 64 bytes) is received and
has no errors
• Compromise between store and forward and cut through
• higher latency

MAC IN SWITCHED ETHERNET

Each of the circuits connected to the switch is a separate point-to-point circuit connecting the switch
to one computer

The switch and the attached computer must share this circuit. MAC is done in the same manner as
traditional Ethernet: each computer listens before it transmits, and if no one is transmitting, it
transmits.

Each circuit shared by a computer and the switch

Multiple messages can be sent at the same time.


Computer A can send a message to computer B while computer C sends a message to
computer D
Real difference between switch and hub
Two computers send frames to the same destination at the same time
o Switch stores the second frame in memory until it finishes sending the first, then
forwards the second

IMPROVING LAN PERFORMANCE

Every LAN has a bottleneck, a narrow point in the network that limits the number of messages that
can be processed. The bottleneck will lie in either the network server or the network circuit.

Server performance can be improved with a faster NOS that provides better disk caching, by
buying more servers and spreading applications among them

18 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

CPU NIC

Circuit capacity can be improved by using faster technologies and by segmenting the network into
several separate LANs.
Overall LAN performance also can be improved by reducing the demand for the LAN by moving files
LAN

19 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 4 PHYSICAL LAYER

THE PHYSICAL LAYER INTRO

The Physical Layer deals with transporting bits between two machines.

Physical Layer protocols are focused on transmitting and receiving digital data across a transmission
medium. The circuits are usually a combination of both physical media (e.g., cables, wireless
transmissions) and special-purpose devices that enable the transmissions to travel through the
media.

There are two fundamentally different types of data that can flow through the circuit: digital and
analog. Computers produce digital data that are binary, either on or off, 0 or 1.
In contrast, telephones produce analog data whose electrical signals are shaped like the sound
waves they transfer; they can take on any value in a wide range of possibilities, not just 0 or 1.

Data can be transmitted through a circuit in the same form they are produced. Most computers, for
example, transmit their digital data through digital circuits to printers and other attached devices.
Likewise, analog voice data can be transmitted through telephone networks in analog form.

CIRCUITS

Circuit configuration is the basic physical layout of the circuit. There are two fundamental circuit
configurations: point-to-point and multipoint. In practice, most complex computer networks have
many circuits, some of which are point-to-point and some of which are multipoint.

Figure illustrates a point-to-point configuration

This type of configuration is used when the computers generate enough data to fill the capacity of
the communication circuit. Each computer has its own circuit to any other computer in the network
(expensive).

Figure shows a multipoint circuit

20 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

This type of configuration is used when each computer does not need to continuously use the entire
capacity of the circuit. The disadvantage is that only one computer can use the circuit at a time.
When one computer is sending, or receiving data, all others must wait. The advantage of multipoint
circuits is that they reduce the amount of cable required and typically use the available
communication circuit more efficiently.

DATA FLOW

Circuits can be designed to permit data to flow in one direction or in both directions.

Simplex is one-way transmission, such as that with radios and TVs.

Half-duplex is two-way transmission, but you can transmit in only one direction at a time. E.g
walkie-talkie link; only one computer can transmit at a time.

Full duplex refers to the transmission of data in two directions simultaneously. E.g -telephone

COMMUNICATION MEDIA

The medium (or media, if there is more than one) is the physical matter or substance that carries the
voice or data transmission.

There are two basic types of media.

Physical matter that carries transmission.

Guided media are those in which the message flows through a physical media such as a twisted pair,
coaxial cable, and optical fibre; the media "guides" the signal.

Unguided (Wireless) media are those in which the message is broadcast through the air, such as
infrared, microwave, or satellite.

GUIDED MEDIA

Twisted-pair cable insulated pairs of wires that can be packed quite close together. The wires
usually are twisted to minimize the electromagnetic interference between one pair and any other
pair in the bundle.

• Inexpensive and carries high amount of traffic and lower error rates. Commonly used for
telephones and LANs
• Range 100m +

21 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Coaxial cable is less prone to interference and errors than basic low-cost twisted-pair wires. Coaxial
cables cost about three times as much as twisted-pair wires but offer few additional benefits other
than better shielding.

• Used mostly for cable TV


• Range 10-100km

Although twisted-pair is the most common type of guided media, fibre-optic cable also is becoming
widely used. This technology uses high-speed streams of light pulses from lasers or LEDs (light-
emitting diodes) that carry information inside hair-thin strands of glass called optical fibres.

• Has extremely high capacity, ideal for broadband


• Works better under harsh environments
o it is not as fragile or brittle, it is not as heavy or bulky, and it is more resistant to
corrosion

TYPES OF OPTICAL FIBRE

The earliest fibre-optic systems were multimode, meaning that the light could reflect inside the
cable at many different angles. Multimode cables are plagued by excessive signal weakening and
dispersion. Early multimode fibre was usually limited to about 500 meters.

Graded-index multimode fibre reduces the spreading problem by changing the refractive properties
of the fibre to refocus the signal, and can be used over distances of up to about 1000 metres.

Single-mode fibre-optic cables transmit a single direct beam of light through a cable that ensures
the light reflects in only one pattern, in part because the core diameter has been reduced from 50
microns to about 5 to 10 microns.

UNGUIDED (WIRELESS) MEDIA

Transport electromagnetic waves without using a physical conductor. Signals are normally broadcast
through air and thus are available to anyone who has a device capable of receiving them.
Electromagnetic spectrum ranging from 3KHz to 900 THz is used for wireless communication.

Three types of wireless media:


- radio waves, microwave, Infrared

22 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Radio Waves are used for multicast communications, such as radio and television, and paging
systems.  cheapest for short distances
Omnidirectional: When an antenna transmits radio waves, they are propagated in all directions.
Radio waves transmitted by one antenna are susceptible to interference by another antenna that
may send signals using the same frequency.

Microwaves transmission is an extremely high-frequency radio communication beam that is


transmitted over a direct line-of-sight path between any two points. Microwaves are used for
unicast communication such as cellular telephones, satellite networks, and wireless LANs.
Unidirectional: When an antenna transmits microwave waves, they can be narrowly focused.
- Requires that sending and receiving antennas be aligned.
- Propagation is line of sight.
- not susceptible to interference.

M
Very high frequency waves can penetrate walls.

Infrared transmission uses low-frequency light waves to carry the data through the air on a direct
line-of-sight path between two points. Communications between devices in close proximity to each
other- keyboards, mice, PCs and printers. For wireless LAN use, infrared is defunct.
- Generally used for short range communication, line-of-sight.

SIGNALS

Signals, electromagnetic or optical, are used to transmit data. A signal can be viewed as a function of
time (time domain) and as a function of its frequencies (frequency-domain).

A periodic signal is one which repeats itself


exactly. s(t+T) = s(t).

Symbol represents one or more bits, a signal


level representing that.

Periodic signals

 Continous (analog)

 Discrete (digital)

23 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

An analog signal is a continuous electrical signal in the form of wave. The wave is known as carrier
wave. Telephone line is most commonly used media for analog signals.

A digital signal is discrete it takes distinct values that change abruptly. Digital signals are faster and
efficient. They provide low error rates. They also provide high transmission speed and high-quality
voice transmission.

Two characteristics of an analog wave are as follows:

• Frequency: the number of times a wave repeats during a specific time interval is known as
frequency.
• Amplitude: the height of wave within a given period of time is known as amplitude.

Signal Modulations

Modulation T
fundamental modulation techniques: amplitude modulation, frequency modulation, and phase
modulation.

Amplitude modulation

Frequency modulation

Phase modulation

SIGNALS (802.11)

Frequency Hopping Spread Spectrum (FHSS) is method of transmitting radio signals by rapidly
switching carrier waves among many frequency channels, using pseudorandom sequence known to
both transmitter and receiver.

Direct Sequence Spread Spectrum (DSSS) is a spread spectrum modulation technique used to
reduce overall signal interference. The spreading of this signal makes the resulting wideband
channel more noisy, allowing for greater resistance to interferences. Introduces pseudo-random
noise into signal to closely resemble static and the original signal is not extracted until pseudo-
random sequence is known

24 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

DIGITAL TRANSMISSION OF DIGITAL DATA

Computers produce binary data. Standards ensure both sender and receiver understand the data.

Coding A character is a symbol that has a common, constant meaning. Characters are represented
by groups of bits that are binary zeros (0) and ones (1).
• Digital coding bit patterns
• High-level representation logical

Signalling electrical or optical patterns used in the transmission of codes through a medium
• Low-level representation physical

The groups of bits


called a coding scheme, or simply a code.

Digital transmission is the transmission of binary electrical or light pulses in that it only has two
possible states, a 1 or a 0. A
to send a 1 and a 0), and the symbol rate (how many symbols will be sent per second).

BIT RATE VERSUSES BAUD RATE

Bitrate is the number of bit intervals in one second. This is generally expressed in bps (bits per
second). Bitrate, as the name implies, describes the rate at which bits are transferred from one
location to another. In other words, it measures how much data is transmitted in a given amount of
time.

Baud rate (symbol rate) is the number of symbol changes or signalling events across the
transmission medium over a certain period of time.

BIT RATE

Bit rate measures the number of bits per second


- Bits are represented by 2 symbols 0 and 1 per unit time
- But we can have more signal levels and thus more symbols

BAUD RATE

Baud rate measures number of symbols per second


- this gives the effective number of symbols that can be transmitted
- a 2400 baud rate means that the channel can change signal levels up to 2400 times per
second.

25 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

BANDWIDTH

Bandwidth is the difference between the highest and lowest frequencies in a band. In common
usage, bandwidth refers to circuit capacity; when people say, they need more bandwidth, they need
a higher transmission speed.

Example

฀Telephone system 300-3400 Hz, thus bandwidth of 3100 Hz.


- Voice over telephone is recognizable and understandable
- However, it is distorted
- The wider the bandwidth, the less the distortion.

DIGITAL SIGNALLING

The figure four types of digital transmission techniques.

With unipolar signaling, the voltage is always positive or negative. The figure illustrates unipolar
technique in which a signal of 0 volts (no current) is used to transmit a zero, and a signal of +5 volts
is used to transmit a 1.

In bipolar signaling, T
technique is called nonreturn to zero (NRZ) because the voltage alternates from +5 volts (a symbol
indicating a 1) and 5 volts (a symbol indicating a 0) without ever returning to 0 volts.

The second bipolar technique is called return to zero (RZ) because it always returns to 0volts after
each bit before going to +5 volts or 5 volts

In general, bipolar signaling experiences fewer errors than unipolar signaling because the symbols
are more distinct.

Ethernet uses Manchester encoding. Manchester encoding is a special type of bipolar signaling in
which the signal is changed from high to low or from low to high in the middle of the signal. A
change from high to low is used to represent a 0, whereas the opposite is used to represent a 1.

TRANSMISSION TECHNIQ UES

Three techniques:
- Serial vs parallel transmission
- Modulation
- Multiplexing techniques

26 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

TRANSMISSION MODES

Serial transmission means that a stream of data is sent over a communication circuit sequentially in
a bit-by-bit fashion.

- Single wire
- slower than parallel mode
- Used in networks

Can be used over longer distances since bits stay in the order they were sent

Parallel transmission is the way the internal transfer of binary data takes place inside a computer.
Multiple wires, each wire sending one bit at the same time as the others.

• If the internal structure of the computer is eight-bit, then all eight bits of the data element
are transferred between main memory and the central processing unit simultaneously on
eight separate connections.
Used to directly connect devices but mostly replaced with USB, FireWire, and Thunderbolt
now

Used for short distances (up to 6 meters) since bits sent in parallel mode tend to spread out over long
distances due to very slight variations in speed.

DATA TYPE VS TRANSMISSION TYPE

27 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

ANALOG TRANSMISSION OF DIGITAL DATA

A well known example using phone lines to connect PCs to the Internet

- Pcs generate digital data


- Local-loop phones use analog transmission technology
- Modems translate digital data into analog signals

MODULATION

When we transmit data through the telephone lines, we use the shape of the sound waves we
transmit (in terms of amplitude, frequency, and phase) to represent different data values.

M tics to encode information


Carrier wave: Basic wave transmitted through the circuit (provides a base which we can deviate)

Basic ways to modulate a carrier wave:

Amplitude Modulation Changing the height of the wave to encode data

• One bit is encoded for each carrier wave change


• A high amplitude means a bit value of 1 Low amplitude means a bit value of 0.
• More susceptible to noise than the other modulation methods.

Frequency Modulation (FM) Changing the frequency of carrier wave to encode data
• One bit is encoded for each carrier wave change
• Changing carrier wave to a higher frequency encodes a bit value of 1
• No change in carrier wave frequency means a bit value of 0

Phase Modulation (PM) Changing the phase of the carrier wave to encode data
• One bit is encoded for each carrier wave change

28 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

• C
• N

MULTIPLEXING

Link refers to a physical path

Channel refers to a portion of a link that carries a transmission between a given pair of lines. ฀
Multiple channels are shared over a single link

Multiplexing is a set of techniques that allows simultaneous transmission of multiple signals across a
single data link.
• save money by reducing the amount of cable

Frequency division multiplexing (FDM) makes a number of smaller channels from a larger

Guardbands needed to separate channels


To prevent interference between channels
Unused frequency bands wasted capacity

Used for analogue transmission

Time Division Multiplexing - shares a communication circuit among two or more terminals by having
them take turns, dividing the circuit vertically.

The figure shows the same four terminals connected using


TDM, with each terminal sending one character at a time

Used for digital transmission

Statistical time division multiplexing (STDM) is the exception to the rule that the capacity of the
multiplexed circuit must equal the sum of the circuits it combines.

29 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

• Solves problem with TDM if one timeslot is not being used, can be used by other
participants.

SECURITY ISSUES

Vulnerability a device can be attached to a network cable to monitor the data on the cable.
Threat
Attack the attacker locates a network cable and attaches a passive monitoring device. He captures

Control physically secure the network cables, use cables that are mor
into, encr

30 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 5: DATA LINK LAYER

The Data link layer is responsible for moving a message from one computer or network device to the
next computer or network device in the overall path from sender or receiver. It controls the way
messages are sent on the physical media. Both the sender and receiver have to agree on the rules or
protocols that govern how they will communicate with each other.

A data link protocol performs three functions:


Controls when computers transmit (media access control)
Detects and corrects transmission errors (error control)
Identifies the start and end of a message by using a PDU (message delineation)

Physical Layer
Data-link Layer
Transport Layer
Application Layer

SERVICES

Link Layer Services


Fundamentally, the link layer provides services to the network layer.
Characterised by:
Acknowledgement or no acknowledgement
Connectionless or connection oriented

FRAMING

Data link layer is responsible for making physical link reliable and, to do so, it breaks up network
layer data stream into small blocks, a process called segmentation, and adds header and frame flag
to each block to form a frame, a process called encapsulation

Header generally contains three parts or fields:


Address: address of sender and/or receiver
Error detecting code: a checksum of the frame for error detection
Control: additional information to implement protocol functions

The ways we can delineate frames:

Byte count: uses a field in the header to specify the number of characters in the frame. When the
data link layer at the destination sees the character count, it knows how many characters follow, and
hence where the end of the frame is.
Problem if byte count is corrupted, receiver loses frame boundaries completely

Flag byte: We can use the ASCII character STX, start of transmission, or ETX, end of transmission to
delimit frames. The problem is if those patterns occur in the data. The solution is . This

31 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

E“C character. This tells the receiver to treat the


I E“C E“C
Used in byte-oriented protocols.

Example:

T bytes used in an ASCII character-oriented protocol are DLE STX (Data Link Escape, Start of TeXt) to
start the frame, then DLE ETX (Data Link Escape, End of TeXt) at the end. If a DLE occurs in the data, sender
stuffs a second DLE in the character stream.

Flag bits: U . T
beginning and end of a frame. If a sequence of six ones is detected by the receiver, it thinks the
frame has ended. Here only a single bit needs to be stuffed in to break the sequence of 1 bits. The
r
This is used by bit-oriented protocols like SDLC and HDLC.
Example:

The sender starts the frame with the bit pattern


That

T
a 0 into the stream. The receiver, when it sees a

PHYSICAL LAYER CODING VIOLATIONS

The final framing method is physical layer coding violations and is applicable to networks in which
the encoding on the physical medium contains some redundancy. In such cases normally, a 1 bit is a
high-low pair and a 0 bit is a low-high pair. The combinations of low-low and high-high which are not
used for data may be used for marking frame boundaries.

In Manchester encoding a transition must happen within the time frame to indicate whether the bit is 1 or 0
(recall for the receiver it is easier to detect a change than an absolute level). If there is no transition in a bit
frame, this is not a valid bit, so is a coding violation and can be used to signal the end of a frame.

32 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

MEDIA ACCESS CONTROL (MAC)

Media access control refers to the need to control when computers transmit. With point-to-point
full-duplex configurations, media access control is unnecessary because there are only two
computers on the circuit and full duplex permits either computer to transmit at any time.

Important when more than one computer wants to send data

It is critical to ensure that no two computers attempt to transmit data at the same time but if they
do, there must be a way to recover from the problem. There are two fundamental approaches to
media access control: controlled access and contention.
Controlled Access
Controlling access to shared resources
Commonly used by mainframes
o Determines which terminals have access to mainframe at a given time
Also used by some LAN protocols
o Token ring, FDDI
Major controlled-access methods
o X-ON/X-OFF and polling

X-ON / X-OFF An older controlled access protocol


Still used between a computer and a printer
Still used on some half-duplex circuits

Polling is the process of sending a signal to a client (a computer or terminal) that gives it permission
to transmit or asks it to receive.

Roll-call polling checks each client to see if it wants to transmit. This involves waiting as the system
poll and waits for a response, therefore needing a timer to prevent lock up by the clients not
answering.

Hub Polling (Token Passing) is where one computer starts the poll and then passes the token
(unique series of bits) to the next computer and this continues in a cycle until the polling cycle
reaches the first computer and starts all over again.

Contention is the uncontrolled method. Computers wait until the circuit is free and then transmit
whenever they have data to send.

Contention is commonly used in


Ethernet LANs.
Stations must themselves detect a
free line
Collisions can occur
Works well in most, but not all
situations

33 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

This shows uncontrolled (contention) versus controlled access. For high volume networks, controlled access
works better. But for LANS with few stations, contention works better. This is due to static and dynamic
factors. The static factor is the number of stations on the multi-drop line. The dynamic aspect is how heavily
(how many messages) the line is used.

ERROR CONTROL

The data link layer is responsible for the handling of network errors caused by problems in
transmission.

Human errors, such as a mistake in typing a number, usually are controlled through the application
program. Network errors, such as those that occur during transmission, are controlled by the
network hardware and software.
There are two categories of network errors:
corrupted data
lost data

Networks should be designed to (1) prevent, (2) detect, and (3) correct both corrupted data and lost
data.Errors appear in bursts. In a burst error, more than 1 data bit is changed by the error-causing
condition. In other words, errors are not uniformly distributed in time. Although an error rate might
be stated as 1 in 500,000, errors are more likely to occur as 100 bits every 50,000,000 bits.

ERROR CAUSES AND PREVENTION

Source Cause Prevention


Line Outages Storms, accidents Redundant circuits, multiple
routers
White Noise (hiss) Movement of electrons Increase signal strength
Gaussian Noise
Impulse Noise Sudden increases in electricity Shield or move wires
(Spikes)
Cross-talk Multiplexer guard bands too small or Increase the guard bands, shield
wires too close together or move wires
Echo Poor connection Fix connection, tune equipment
Attenuation Signal decreased over distance Use repeaters or amplifiers

ERROR DETECTION

The only way to do error detection is to send extra data with each message. We could transmit
whole message again and compare both, but that would be wasteful, so we do some calculation,
which is added to the message.

The receiving end does the same calculation on the received message and compares its calculation
I I

34 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

match, an error has occurred. Error-detection methods are parity checking, longitudinal, checksum,
and cyclic redundancy checking.

Parity (Row Parity) is the adding of an extra bit to each block (7 or 8 bits) transmitted. Simple but

Longitudinal Redundancy Check


Longitudinal Redundancy Check (LRC) is the extension of a simple parity where you add extra byte to
the block of data which is made up of the parity bits that make up the entire message.
- Picks up many more errors
- Hamming codes used for correction

Checksum
- add result to end of data
- bit block can be 8, 16, 24, 32, 64 bits long
- the longer the better
- IP and TCP uses 16 bits

Cyclic Redundancy Check (CRC)


- Complex calculation on block of bits
- Polynomial check
- CRC is usually done in hardware (special calculation circuits) for speed
- CRC is more complex than checksum, but more effective, detecting greater than 99.99% of
errors depending on block size.

Check Effectiveness
Row Parity 50%
LRC (Column parity) Better than row parity
Checksum 95%
CRC > 99.99%
ERROR CORRECTION TEC HNIQUES

With Retransmission, a receiver that detects an error simply asks the sender to retransmit the
message until it is received without error. This is often called Automatic Repeat reQuest (ARQ).

There are two types of ARQ: stop-and-wait and continuous


Stop and Wait ARQ (half duplex)
- Sender sends a message, waits for acknowledgment,
sends the next message
- Receiver receives the message and sends an
acknowledgement, then waits for the next message

The advantage of stop-and-wait ARQ is that it only requires a


half-duplex channel.

35 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

The disadvantage is that it wastes time waiting for ACKs, resulting in low throughput.
Continuous ARQ (full duplex)
- Sender continues sending packets without waiting
for the receiver to acknowledge
- Receiver continues receiving messages without
acknowledging them right away

- Continuous ARQ requires a full duplex channel


because packets are sent continuously until a NAK
is received.
- Continuous ARQ offers greater throughput
e -and-wait ARQ at the cost of
greater memory requirements.

Continuous ARQ is sometimes called sliding window because of the visual imagery the early network
designers used to think about continuous ARQ.

Sliding window protocol allows multiple frames to be in transit at one time.

Sender assigns a sequence number (SeqNum) to each frame; number ranges from 0 to 2n-1, so
SeqNum will fit in n bits.

Sender maintains three variables:

• Window size (WS)


• SeqNum of next acknowledgement expected (NAE)
• SeqNum of last frame sent (LFS)

Receiver maintains:
• Window size
• SeqNum of last frame acceptable (LFA)
• SeqNum of next frame expected (NFE)

DATA LINK PROTOCOLS

Asynchronous transmission often is referred to as start-stop transmission because the transmitting


computer can transmit a character whenever it is convenient, and the receiving computer will accept
that character.
- Thus, sends extra information to delineate frames

36 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

- Allows medium to be idle for arbitrary periods between frame transmissions


- Used for older devices  connect dumb terminals to computers
- Overhead of 3 bits per 7 bits 30%

Figure: Asynchronous transmission. ASCII = United States of America Standard Code for Information
Interchange

With Synchronous transmission, all the letters or data in one group of data is transmitted at one
time as a block of data. This block of data is called a frame.

- N
- Typically about a thousand characters (bytes) long
- Includes addressing information, especially useful in multipoint circuits

The start and end of each frame (synchronization) sometimes is established by adding
synchronization characters (SYN) to the start of the frame.
Used to help the receiver recognise incoming data.

37 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 6: NETWORK LAYER

The Network layer and transport layer are responsible for moving messages from end to end in a
network. They are so closely tied together that they are usually discussed together. Transmission
Control Protocol/Internet Protocol (TCP/IP), is the most commonly used set of transport and
network layer protocols.

The key concept at the network layer is the network address, which provides this information. In
TCP/IP, the network address is the IP address.

TCP/IP

Most common protocol suite, used by the Internet.


o Almost 70% of all backbone, metropolitan, and wide area networks use TCP/IP
o Most common protocol on LANs (passed IPX/SPX in 1998)
o Technology for connecting dissimilar systems.

Reasonably ef cient and error free transmission


o Performs error checking
o T end-to-end delivery assurance
o Compatible with a variety of data link layer protocols

INTERNET PROTOCOL

The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains addressing information
and some control information that enables packets to be routed. IP is documented in RFC 791 and is
the primary network-layer protocol for the universal addressing of hosts in an internet network.

IP is the basic transport mechanism for routing IP packets between hosts.


IP delivers packets from source host to destination host
o end-to-end, not link-to-link

CONNECTIONLESS (DATAGRAM)

What makes IP unreliable?

This layer provides a connectionless, unreliable packet based delivery service. It can be described as
connectionless because packets are treated independently of all others (aka datagrams). The service
is unreliable because there is no guarantee of delivery. Packets may be silently dropped, duplicated
or delayed and may arrive out of order. The service is also called a best effort service, all attempts to
deliver a packet will be made, with unreliability only caused by hardware faults or exhausted
resources.
• Thus, end points must recover from these conditions

38 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

• that is part of the role of the transport layer


• Packet switching can provide both connectionless and connection-oriented modes (UDP vs
TCP).

VIRTUAL CIRCUITS

฀ The alternative is virtual circuits


-to-
o performance-wise
o network actions along source-to-dest network

All packets for that transmission take the same route over the virtual circuit that has been set up for
that particular transmission.
All packets follow this route:

this makes routing simpler less time consuming


rather than destination address, packets contain a virtual circuit identifier
฀ This makes it similar to circuit switching, even though circuit is over a packet-switched network.
however, connections are logical rather than physical
Multiple virtual circuits can exist between stations

TYPES OF VIRTUAL CIRCUITS

Virtual circuits are usually permanent virtual circuits (PVCs), which means that they are defined for
frequent and consistent use by the network. A permanent virtual circuit (PVC) is a continuously
dedicated virtual circuit. They do not change unless the network manager changes the network.
A switched virtual circuit (SVC) is a temporary virtual circuit that is established and maintained only
for the duration of a data transfer session.

VIRTUAL CIRCUIT DATA RATE(S)

Users specify the rates per PVC via negotiations

The committed information rate (CIR) is the data rate the PVC must guarantee to transmit. If the
network accepts the connection, it guarantees to provide that level of service.

Most connections also specify a maximum allowable rate (MAR), which is the maximum rate that
the network will attempt to provide, over and above the CIR. The circuit will attempt to transmit all
packets up to the MAR, but all packets that exceed the CIR are marked as discard eligible (DE). If the
network becomes overloaded, DE packets are discarded. Bursty data traffic must be supported by
packet switched networks

39 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

PACKET-SWITCHED SERVICE PROTOCOLS

There are five types of packet-switched services: X.25, Frame Relay, Asynchronous Transfer Mode
(ATM), IP/MPLS, Ethernet/ IP packet networks.

Multi-Protocol Label Switching is an approach to improving QoS and the movement of packets with
different layer-2 protocols through TCP/IP networks.

• Uses some of the concepts of ATM


• Supports IP and other packet protocols directly
• not a separate network as ATM so does not require new expensive hardware
• Designed to work with a variety of commonly used layer-2 protocols

The advantage of MPLS is that it can easily integrate layer-2 protocols and also provide QoS in an IP
environment. It operates faster than traditional routing and also enables traffic management by
enabling the network manager to specify FEC based on both the IP address and the source or
destination port.

VIRTUAL PRIVATE NETW ORK

A virtual private network (VPN) provides the equivalent of a private packet-switched network over
the public Internet. It involves establishing a series of PVCs that run over the Internet so that the
network acts like a set of dedicated circuits over a private packet network.

Encapsulate the packets sent over these tunnels using special protocols that also encrypt the IP
packets they enclose.

The primary advantages of VPNs are low cost and flexibility. Because they use the Internet to carry
messages, the major cost is Internet access. Likewise, anywhere you can establish Internet service,
you can quickly put in a VPN.

There are two important disadvantages. First, traffic on the Internet is unpredictable. Sometimes
packets travel quickly, but at other times, they take a long while to reach their destination. Second,
because the data travels on the Internet, security is always a concern. Most VPN networks encrypt
the packet at the source VPN device before it enters the Internet and decrypt the packet at the
destination VPN device.

How is the encapsulation technique used in VPN different from the usual encapsulation procedure
discussed in this course so far?

When packets move across the Internet, anyone can read what they contain. VPNs provide security
by encapsulating (i.e., surrounding) packets in a separate, secure packet that is encrypted. No one
can read the encapsulated data without knowing the password that is used to decrypt the packet.
Layer-2 and layer-3 VPNs work very similarly, except that layer- VPN

40 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

starting with the layer-2 packet while layer-3 VPNs encapsulate tarting with the
layer-3 packet.

It is said that packet-switched services and dedicated-circuit services are somewhat similar from
the perspective of the network designer. Why?

Network managers build packet-switched networks using PVCs, most packet-switched networks
behave like dedicated circuit networks. They are both based on a single connection to the common
carrier and provide similar transmission speed and reliability. However, because virtually all data-
intensive networks use PVCs, this means that the network is actually built using virtual circuits that
are the software equivalent of the hardware-based dedicated circuits.

IP DATAGRAMS

The basic transfer unit in the IP layer is called an IP datagram. A datagram is divided into header and
data areas.

The IP datagram travels encapsulated in transport-layer data


from TCP and UDP
Datagrams are forwarded through the network

IP datagrams sent to data-link layer


data-link layer encapsulates in data-link layer frames
data-link layer delivers to next hop

Two versions currently in use:


• IPv4: uses 32-bit addresses.
• IPv6: Mainly developed to increase IP address space due to the huge growth in Internet
usage (128-bit addresses)

Both versions have a variable-

- Max size depends on the data-link layer protocol.


- E x message size is 1,492 bytes
- thus max size of TCP message:

NETWORK LAYER FUNCTI ONS

Addressing (static)
- Each node on the path between source and destination must have an address
- Internet Addresses
- Assignment of addresses
- Translation between network-layer addresses and other addresses (address resolution)

41 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Routing (static and dynamic)


- Routing protocols
- Information gathering about network topology

Forwarding (dynamic)
- Process of deciding what path a packet must take to reach destination

IP ADDRESSING

The IP addressing scheme is integral to the process of routing IP datagrams through an internetwork.
Each host on a TCP/IP network is assigned a unique 32-bit logical address that is divided into two
main parts: the network number and the host number.

• IP address identi es a system s location on the network

E IP ID ID

Network ID Identi es systems that are located in the same network.


- All devices on the same network must have the same network ID.
- The network ID must be unique to the Internet.

Host ID Identi es a device within a network.


- The host id must be unique within the network ID.

IP ADDRESS FORMAT:

Written Representation

• Each IP address is 32 bits long and is written as four 8-bit elds, called octets (= byte).
• Octets are separated by periods . .
• Each octet represents a decimal number in the range 0-255
o Referred to as Dotted-Decimal Notation

Example of an IP address in binary and dotted decimal formats.

42 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

• Binary Format: 10000011 01101011 00000011 00011000


• Decimal Format: 131.178.3.24
DOTTED DECIMAL NOTATION

• Used to make IP addresses easier to understand for human readers


• Breaks the address into four bytes and writes the digital equivalent for each byte

Example: 128.192.56.1

SUBNET MASK

Network ID and host ID within an IP address are separated with a subnet mask.

A subnet mask is 32 bits that separates the network ID from the host ID.
• Each host on a TCP/IP network needs a subnet mask.

A 32-bit mask uses consecutive bit groups of all ones (1) to identify the network ID and all zeroes (0)
to identify the host ID portions of an IP address.

Class A mask
• 11111111 00000000 00000000 00000000
• 255.0.0.0

Class B mask
• 11111111 11111111 00000000 00000000
• 255.255.0.0

Class C mask
• 11111111 11111111 11111111 00000000
• 255.255.255.0

SUBNET MASK: EXAMPLES

Subnet: 75.61.10.34
Subnet mask: 255.000.000.000 or in binary: 11111111.00000000.00000000.00000000
Network ID: 75.0.0.0

Subnet: 149.61.10.34
Subnet mask: 255.255.000.000 or in binary: 11111111.11111111.00000000.00000000
Network ID: 149.61.0.0

43 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

A subnet is a physical segment in a TCP/IP environment that uses IP addresses derived from a single
network ID.
• Dividing the network into subnets requires that each segment uses a different network ID, or
subnet ID.
• A unique subnet ID is created for each segment by partitioning the bits in the host ID into
two parts.
o One part: I segment as a unique network.
o O

Each part (subnet) of the network typically has its own router

- now about internal subnets
Subnets are always smaller than the main network (of whichever class A, B or C)

Two kinds of Subnetting:


- Fixed-length subnetting
- Variable-length subnetting

SUBNETTING IN IPV4

Fixed-length: All the subnetworks in a given network use the same subnet mask

Variable-length: Different subnetworks in a given network use subnet masks of different length

FIXED-LENGTH SUBNETTING:

A network may be divided up into equally-sized subnets


- similar sized departments/faculties

FL“M in that all subnets are the same size thus for larger-sized departments we will
B

VARIABLE-LENGTH SUBNETTING

A network may be divided up into different-sized subnet


- Complicated and error prone
- Flexible
- Each subnet must be assigned its own subnet mask

SUBNETTING PROCEDURE

• “ ID
• Create a modi ed (custom) subnet mask for the network
• Determine the valid subnet ID s for the network
• Determine the valid ranges of IP addresses for each subnet on the network

44 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

ADDRESS ALLOCATION

Types of addresses:
Address Example Software Example Address
Application URL www.mq.edu.au
Internet IP Address 137.111.13.34
Data Link MAC Address 00:0C:00:F5:03:5A

These addresses must be translated from one type to another (for a message to travel from sender
to receiver). This translation process is called address resolution.

Assignment of Addresses

INTERNET ADDRESSES

ICANN (Internet Corporation for Assigned Names and Numbers) is responsible for managing the
assignment of network layer addresses and application layer addresses.
- directly manages a set of Internet domains
- authorizes private companies to become domain name registrars for those domains.

Example: Macquarie University


- URLs that end in .mq.edu.au
- IP addresses in the 137.111.x.x range (where x is any number between 0 and 255)

Each organization must assign the IP addresses it has received to specific computers on its networks.
In general, IP addresses are assigned so that all computers on the same LAN have similar addresses.

Regional Address registries authorised by ICANN


- So we have a hierarchy each with progressively smaller subnets

45 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

DYNAMIC ADDRESSING

With this approach, a server is designated to supply a network layer address to a computer each
time the computer connects to the network. This is commonly done for client computers but usually
not done for servers.

Addresses automatically assigned to clients only when they are connected to the network
- Eliminates permanently assigning addresses to clients
- When the computer is moved to another location, its new IP address is assigned
automatically
- M IP dress space

Address Allocation Summary


• In a small network, your network administrator might assign addresses and go around to
s.
• Link local addresses were designed for IPv6 and make more sense there.
• In IPv4 it is only used if host cannot contact a DHCP server to facilitate local communication.
• DHCP allocates local subnet addresses
• For a global and permanent Internet address contact local authority which has been
allocated a range by ICANN.

ADDRESS RESOLUTION

To send a message, the sender must be able to translate the application layer address (or server
name) of the destination into a network layer address and in turn translate that into a data link layer
address. This process is called address resolution.

TCP/IP uses two different approaches, one for resolving application layer addresses into IP addresses
and a different one for resolving IP addresses into data link layer addresses.

• The network (IP) layer uses IP addresses


• Networks can only forward addresses with hardware addresses (Ethernet, MAC address)
• We do not want to manually maintain tables mapping IP to MAC addresses.

Address Resolution Protocol (ARP): The network-layer protocol standard for data link layer address
resolution requests.

• ARP resolves a logical IP address to a physical hardware (MAC) address.


• A computer may have multiple MAC addresses, if it has multiple ways of connecting to a
network (eg a wired link and a wireless link)
• A machine in a network has MAC address(es) and IP address(es)

46 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

IPV6 ADDRESSING

IPv6 increases the IP address size from 32 bits to 128 bits to support more levels of the addressing
hierarchy, a much greater number of addressable nodes, and simpler auto-configuration.

IPv4 uses 4 bytes (32-bit) addresses:


• Total of 232 or 4.2 billion possible addresses
• IP addresses often assigned in (large) groups

Giving out many numbers at a time


• IPv4 address space has been used up quickly
• e.g., Macquarie University: uses a Class B IP address space (65,000 addresses; many more
than needed)

IPv6 uses 16 bytes (128-bit) addresses:


• addresses, a very large number
• Little chance this address space will ever be used up

IPv6 currently not used much


• Explosion of mobile devices will force IPv6 adoption.

CIDR

Classless Inter-Domain Routing (CIDR) supports two important features that benefit the global
Internet routing system:

• eliminates the traditional concept of Class A, Class B, and Class C network addresses and
replaces them with the generalized concept of a network prefix.
• CIDR supports route aggregation where a single routing table entry can represent the
address space of thousands of traditional classful routes. This allows a single routing table
entry to specify how to route traffic to many individual network addresses.

For example
- 131.181.40.0/21
- Remaining 11 bits for machines in network

ROUTING

Routing is the process of determining the route or path through the network that a message will
travel from the sending computer to the receiving computer. Every computer that performs routing
has a routing table developed by the network manager that specifies how messages will travel
through the network.

Collects information about topology of network

47 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

- Uses information from other routers to build routing tables


- Sends information on to other routers

Routers are IP aware, and packets are processed by the IP implementation


Routers only look at the part of the IP address that identi es the network
- only the network ID needs to be stored in the routing tables
- the network part in address extracted by masking

TYPES OF ROUTING

Centralised routing all routing decisions are made by one central computer or router. Centralized
routing is commonly used in small, mainframe-based network. All computers are connected to the
central computer, so any message that needs to be routed is simply sent to the central computer,
which in turn retransmits the message on the appropriate circuit to the destination.

Decentralised routing (distributed) Decisions made by each node independently of one another
- Information is exchanged to build routing tables and used by Internet

Static routing is decentralized, which means that all computers or routers in the network make their
own routing decisions following a formal routing protocol. Routing decisions are made in a fixed
manner by individual computers or routers. The routing table is developed by the network manager,
and it changes only when computers are added to or removed from the network.
- Used on relatively simple networks

Dynamic routing- Uses routing tables (at each node) that are updated dynamically
- Based on route information exchanged between routing devices.
- improve network performance by routing messages over the fastest possible route

ROUTING PROTOCOLS

A routing protocol is a protocol that is used to exchange information among computers to enable
them to build and maintain their routing tables.

It can be useful to know all possible routes to a given destination. Dynamic routing protocols
become impractical because of the amount of network traffic they generate. For this reason,
networks are often subdivided into autonomous systems of networks.

An Autonomous system is simply a network operated by an organization that runs one part of the
Internet.

TYPES OF ROUTING PROTOCOLS:

Interior (to single AS) routing protocols (RIP, OSPF, EIGRP)


- Operate within a network (autonomous system)
- Provide detailed info about each node and paths

48 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Exterior protocols (between ASs) routing protocols (BGP)


- Operate between networks (autonomous systems)
- provide information about only the preferred or the best routes
DYNAMIC ROUTING ALGORITHMS

Distance vector dynamic routing:


- Uses the least number of hops to decide how to route a packet
- Used by Routing Information Protocol (RIP)

Link State
- computers or routers track the number of hops in the route, the speed of the circuits in each
route, and how busy each route is.
- Provides more reliable, up to date paths to destinations
- Used by Open Shortest Path First (OSPF)
- M DV

IP ROUTING PROTOCOL

Routing Information Protocol (RIP) is a dynamic distance vector interior routing protocol that is
commonly used in smaller networks, such as those operated by one organization. The network
manager uses RIP to develop the routing table. When new computers are added, RIP simply counts
the number of computers in the possible routes to the destination and selects the route with the
least number. RIP is used by both TCP/IP and IPX/SPX.

Open Shortest Path First (OSPF) is a dynamic link state interior routing protocol that controls the
routing process and allows routers to respond quickly to changes in the Network. OSPF is more
‘IP
broadcast messages. Instead, it selectively sends
status update messages directly to selected
computers or routers. OSPF is the preferred
interior routing protocol used by TCP/IP.

49 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Figure: Routing on the Internet with Border Gateway Protocol (BGP),


Open Shortest Path First (OSPF), and Routing Information Protocol (RIP)

Exterior routing protocol

Border Gateway Protocol (BGP) is a dynamic distance vector exterior routing protocol used on the
Internet to exchange routing information between autonomous systems.
- Far more complex than interior routing protocols
- Provide routing info only on selected routes (e.g., preferred or best route)
- Privacy concern
- Too many routes

PACKET FORWARDING

Routers:

Responsible for packet forwarding


Forward packet to next router (next hop)
- Which next hop gets it closer to its destination
- Next router decides where to send the packet after that and so on
- Distributed recursive algorithm
Routers perform the following for each packet:

1) Remove the link-layer header


2) Find the destination IP address in the IP header
3) Lookup the IP address in the routing table to find the next hop
4) Determine link-layer address of the next hop
5) Add link-layer header to packet
6) Queue packet for sending
7) Send or drop packet (if link is congested)

HOW DO ROUTERS WORK

A router knows about other routers on the network and can choose the most efficient path for the
data to follow. This efficient path may change as network devices change and as traffic comes and
goes.
A router gets most of its intelligence from routing tables.
Routing tables are stored on the router and contain information about the following:
- paths (routes) to particular networks
- How to h
- Priorities for certain connections

50 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

FORWARDING

Process of identifying the path a packet takes through the network from sender to receiver
- No one device knows whole path
- path discovered by hop-to-hop routing
- A router can accommodate multiple active paths and choose among redundant paths
Routing Tables
- Used to make routing decisions
- shows which path to send packets on to reach a given destination
- kept by computers making routing decisions
Routers
- Special purpose devices used to handle routing decisions on the Internet
- Maintain their own routing tables

Forward Processing

IP searches the routing table for the route that is the closest match to the destination IP address.

The most speci c to the least speci c route is searched for in the following order:
- A route that matches the destination IP address (host route).
- A route that matches the network ID of the destination IP address (network route).
- The default route.

SECURITY

Vulnerability IP
Threat receiving information that appears to come from a trusted source
Attack send IP packets into a network with spoofed source address of another computer on that
network
Control somehow you need to stop packets with an IP address of inside the network being allowed
in from outside. This can be done with a protection device it examines the source
IP d internal source IP addresses

51 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 7: TRANSPORT LAYER

The transport layer links the application software in the application layer with the network and is
responsible for the end-to-end delivery of the message. The transport layer accepts outgoing
messages from the application layer and segments them for transmission.

Figure shows the application layer software producing an SMTP packet that is split into two smaller TCP
segments by the transport layer.

Transport Layer sets up connections called sessions or virtual circuits, responsible for segmentation
and reassembly. Interacts with application layer. Two ways of establishing communication -
connection oriented(TCP), connectionless (UDP).

Transport layer will break a message into series of packets - at least TCP will do this, UDP does not
do packetization.

It determines how to break application data into packets that networks can deliver, sends packets to
and accepts packets from the network layer, manages flow control, and because it is meant to
provide error-free data transmission handles retransmission of dropped or garbled packets as well
as acknowledgement of all packets that arrive.

52 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

The Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the two main
I I IP
between two end systems into a reliable delivery service between two processes. TCP and UDP are
connection protocols used for data traversing the Internet but provides different services to
applications.

The TCP is a connection-oriented protocol, and is commonly referred to as TCP/IP due to the
importance of this protocol in the Internet Protocol suite.

TCP is all about being reliable where pack


becomes loss or corrupted while in transmission. With UDP it is all about sending packets
continuously minus the error-checking and not waiting for packets to be received and sent.
Therefore, if a network requires packets to be sent to its destination without any loss or hiccups it
should favour TCP over UDP.

The User Datagram Protocol (UDP) is an alternative communication connection-less protocol in


which the integrity is guaranteed only on the single datagram.

• It uses IP to deliver packets to upper-layer applications and provide transmission among


computers with minimal error corrections.
• T
delivery.
• Appropriate for transmitting short packets of information in real-time instead of exact data
replication.
• Commonly used streaming audio and video because it allows broadcast packet transmission.

PORTS (IPC)

These ports are software ports between application layer and transport layer. They identify the
destination application. Ports are used for IPC Inter Program Communication.

A port in the transport layer is where an application sends and receives data.

IP only delivers packets from one host to another.

Ports: Linking to Application Layer


TCP/UDP may serve many Application Layer protocols at the same time
• Problem: Which application layer process to send a message to?
• Solution: Port numbers located in TCP/UDP header fields; 2-byte each (source, destination)

PORT TYPES

53 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Statically assigned ports Servers


• Well-known ports for servers (web, ftp, telnet, etc).
• Used for frequently-used services
• Predetermined
• Have an assigned value of less than 256

Dynamically assigned ports Clients


• Available for user applications
• The application has to inform user application of the port number being used
• Associated with client server applications

SOCKET

Socket provides the programming interface (API) between the Application and Transport layers.


• Functions as an endpoint for network communication.

An application creates a socket by specifying three items:


- Type of service
o Reliable connection-oriented transport service -TCP
o Unreliable connectionless transport service -UDP
- IP address of the host
- Port the application is using

PACKETIZATION AND REASSEMBLY

B
N

TCP CONNECTIONS

A TCP session is initialized through a 3-way handshake process.

The purpose of the 3-way handshake is to:

• Synchronize the sending and receiving of segments.


• Inform the other host of the amount of data it is able to receive at once (flow control)
• Establish a virtual connection.

54 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Three-way handshake process

The initiating host requests a session by sending out a segment with the synchronization (SYN) set to
on. (SYN segment)
• The client chooses a random sequence number and sends this to the server.
• A sequence number to indicate the starting byte for a segment it may send.

The server acknowledges the request by sending back a segment (SYN+ACK segment) with
• The synchronization flag set to on.
• A sequence number to indicate the starting byte for a segment it may send.

TCP/UDP/IP Characteristics

55 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 7: APPLICATION LAYER

APPLICATION LAYER

The Application layer is the software that enables the user to perform useful work. The software at
the application layer is the reason for having the network because it is this software that provides
the business value.

An Application architecture is the way in which the functions of the application layer software are
spread among the clients and servers in the network.

Functions of Application Layer:


▪ Data storage Storing of data generated by programs (e.g., files, records)
▪ Data access logic Processing required to access stored data (e.g., SQL)
▪ Application logic Business logic such as word processors, spreadsheets
▪ Presentation logic Presentation of info to user and acceptance of user commands

There are many ways in which these four functions can be allocated between the client computers
and the servers in a network.
In host-based architectures, the server (or host computer) performs virtually all functions.

Figure: Host-based architecture: The clients merely captured


keystrokes, sent them to the server for processing, and accepted
instructions from the server on what to display.

Problems with Host-based Arch


The server must process all messages, which can severely limit network performance. Response
time becomes slower, and network managers are required to spend increasingly more money to
upgrade the server.

In client-based architectures, the client


computers perform most functions.

Figure: Client-based architecture


Example: Using a word processing package on a PC
and storing data files on a server

▪ Was popular in 1980s with the widespread use of PCs, LANs, and programs such as
spreadsheets and word processors

56 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Problems with Client-Based Arch.


All data on the server must travel to the client for processing.
Example: when the client program is making a database query, the ENTIRE database must travel to
the client before the query can be processed.
▪ Results in poor network performance by moving lots of data across network

In client-server architectures, the functions are shared between the servers and clients.

Advantages:
▪ Easier to design
▪ enable software and hardware from different vendors to be used together
▪ Allow hardware and software from different vendors to be used together
▪ More efficient because of distributed processing

Disadvantages:
▪ Difficulty in getting software from different vendors to work together smoothly
▪ May require Middleware, a third category of software

MIDDLEWARE

Software that connects two otherwise separate applications.

▪ Functionally bridge the gap between application programs and the lower-level hardware
and software infrastructure in order to coordinate how parts of applications are connected
and how they interoperate
▪ Enable and simplify the integration of components developed by multiple technology
suppliers

For example, there are a number of middleware products that link a database system to a Web
server.

- This allows users to request data from the database using forms displayed on a Web
browser, and it enables the Web server to return dynamic Web pages based on the user's
requests and profile.

57 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Middleware provides a standard way of communicating that can translate between software from
different vendors. It manages the message transfer from clients to servers and insulates network
changes from the clients ((e.g., adding a new server).

Examples of standards for Middleware:


Distributed Computing Environment (DCE)
Common Object Request Broker Architecture (CORBA) .Net

MULTI-TIER ARCHITECTURES

Involve more than two computers in distributing application program logic

- 2-tier architecture
- 3-tier architecture
o 3 sets of computers involved
- N-tier architecture
o more than three sets of computers used

Advantages
- Better load balancing:
o More evenly distributed processing
- More scalable:
o Only servers experiencing high demand need be upgraded
Disadvantages
- Heavily loaded network:
o More distributed processing means more data exchanges
- Difficult to program and test due to increased complexity

3-TIER ARCHITECTURE

58 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

THIN VS THICK CLIENT S

Another way of classifying client-server architectures is by examining how much of the application
logic is placed on the client computer.

THIN:
▪ A thin-client approach places little or
no application logic on the client.
▪ Thin clients are much easier to
manage.
▪ The best example: World Wide Web
architecture (uses a two-tier, thin
client architecture)

THICK:
▪ approach places all or almost all of the application logic on the client

CHOOSING AN ARCHITEC TURE

Sometimes fixed by organizational policy or existing systems

▪ New or replacement system


o Can choose best architecture
▪ Existing system
o Might have migration process
▪ Three major factors
o Infrastructure cost
o Development cost
o Scalability

Host-Based Client-Based Client-


Server
Cost of infrastructure High Medium Low
Cost of development Low Medium Medium
Scalability Low Medium High

ADDRESS RESOLUTION

Server Name Resolution


- Have already seen how to convert IP address to MAC address
- What did we use for that?

To convert application addresses (URLs) to IP addresses use DNS


- www.yahoo.com 204.71.200.74

59 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

DNS DOMAIN NAME SERVICE

DNS is a hierarchy of name servers


▪ Databases containing directories of internet addresses (such as domain names) and their
corresponding IP addresses
Large organisations maintain their own name servers
▪ smaller organisations rely on name servers provided by their ISPs

When a domain name is registered, registering organisation must provide registrar of IP address of
the DNS server that will provide DNS information in new domain
▪ Example: Domain name: mq.edu.au

HOW DNS WORKS

฀ For example, resolving a URL


฀ First identify internet name in URL
฀D
▪ Use the corresponding IP address
▪ Each client maintains a server address table
o containing names used and
corresponding IP addresses

฀ Desired name not i


▪ Use DNS to resolve the address
▪ Sends a DNS request packet to its local DNS
server
▪ name in Local DNS server
o Sends IP address back to the client

฀ name NOT in local DNS server


▪ Sends DNS request packet to the next highest
name server in the DNS hierarchy
▪ Usually the DNS server at the top-level domain (such as the DNS server for all .edu domains)
▪ name NOT in the name server
o Sends DNS request packet ahead to name server at the next lower level of the DNS
hierarchy

APPLICATIONS

Electronic mail (or e-mail) was one of the earliest applications on the Internet and is still among the
most heavily used today.

The most commonly used standard is SMTP (Simple Mail Transfer Protocol).
• Main email standard for
▪ Originating user agent and the mail transfer agent
▪ Between mail transfer agents

60 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

• Originally written to handle only text files


• Usually used in two-tier client-server architectures

Post Office Protocol (POP) and Internet Mail Access Protocol (IMAP)
▪ Main protocols used between the receiver user agent and mail transfer agent
▪ Main difference: with IMAP, messages can be left at the server after downloading them to
the client

HOW SMTP WORKS

TWO-TIER ARCHITECTURE

User agents (also called e-mail clients)


▪ Run on client computers
▪ Send e-mail to e-mail servers
▪ Download e-mail from mailboxes on those servers
▪ Examples: Eudora, Outlook, Netscape Messenger

Mail transfer agents (also called mail server)


▪ Used by e-mail servers
▪ Send e-mail between e-mail servers
▪ Maintain individual mailboxes.

61 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

HOST-BASED ARCHITECTURE

▪ An old method used on UNIX based hosts


▪ Similar to client-server architecture, except
▪ Client PC replaced by a terminal (or emulator)
o Sends all keystrokes to the server
o Display characters received from the server
▪ All software reside on server
o Takes client keystrokes a
o Creates SMTP packets and sends them to next mail server

FILE TRANSFER PROTOC OL (FTP)

File Transfer Protocol (FTP), is an old application that enables you to send and receive files over the
Internet. FTP requires an application layer program on the client computer and a FTP server
application program on a server.
▪ Commonly used today for uploading web pages

Many packages available using FTP


▪ WS-FTP (a graphical FTP software)

FTP sites
฀ Closed sites
▪ Requires account name and password
฀ Anonymous sites
▪ Account name: anonymous; pwd: your email address

SECURITY

Vulnerability: Bugs in server software

Threat: particular messages cause problems on server

Attack: attacker connects to server to find out version, sends known problem messages

Control D -to-date

62 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 8: WIRELESS LANS

WLAN: A communications network that provides connectivity to wireless devices within a limited
geographic area.

• Transmissions do not need to be in line-of-sight (presumably like microwave or infrared).


• Must have an Access Point (often called base station). Functionality of base station is like a
switch. Stations operating on different frequencies are like stations on a different wire
(channels).
• A wire is a channel, rather like a river is a channel

Infrared LANs offer some advantages more secure because it does not go through walls (opaque
objects).

• Problem is limited distance and affected by weather conditions because it must be line-of-
sight.
• Portability means you disconnect from network to move from location A to B. This is typical
of wired LANs, but also WiFi.
• Mobility means you have continuous access to network while on the move. Wired access
WF you are mobile as long as you are within a WiFi
domain, but outside you lose access until you get to another domain. Mobile phone network
gives better coverage.

On the wired bus, client gains access to medium by CSMA/CD. It is called a contention medium
because you have to contend for the medium before you gain access to transmit and receive data.
For any medium, the accessors are in competition for that medium. Same concept for wireless. But
happens over wireless.

IEEE 802.11

IEEE WF
• Standard developed by IEEE for wireless networking.

Topology:
Basic Service Set (BSS) is a collection of stations that want to communicate to each other. There are
two kinds of Basic Service Sets:

Infrastructure BSS (BSS) - A BSS may be isolated or connected to a larger network via a backbone,
multiple BSSs may be connected in this way.

Independent BSS (IBSS) (ad hoc network) - is an ad hoc set of stations communicating directly to
each other (peer-to- B““ L
because no outside connectivity (internet). Has no central controller, range limitations and no relay
functions.

63 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Extended Service Set (ESS) is a set of infrastructure BSSs, where the APs communicate amongst
themselves to forward traffic to one BSS to another. This extends the range which is achieved using
a distribution system

A Distribution System connects access points in an extended service set. A distribution system is
usually a wired LAN but can be wireless LAN.

BSS + Distributed System = ESS

802.11 PHYSICAL LAYER

Two types of Signals


• Radio Frequency (RF)
o Infrared
• RF Transmission

Transmission techniques
• Frequency Hopping Spread Spectrum (FHSS)
• Direct Sequence Spread Spectrum (DSSS)
• Orthogonal Frequency Division Multiplexing (OFDM)
• Code-Division Multiple Access (CDMA mobile phones)

PROBLEM 1: SIGNAL DEGRADATION PROBLEMS:

Noise where unwanted signal(s) block your wanted signal if they are on the same frequency.

Multi-path fading is signals bouncing off objects which can combine to strengthen or cancel a signal.
Can be alleviated using path diversity. However, this technique is used to spread signal over multiple
paths.

Orthogonal Frequency Division Multiplexing (OFDM) is a method of encoding digital data on


multiple carrier frequencies. No guard bands are needed, thus OFDM makes better use of the
bandwidth. Uses a low signal rate in each subchannel.

Multiple Input - Multiple Output (MIMO) is when the same frequency is transmitted from multiple
antennas which combine signal to reinforced to some places and weakened at others. Both ends use
multiple antennas to send and receive signals.

Code-division multiple access (CDMA) is when several transmitters can send information
simultaneously over a single communication channel. Several users share a band of frequencies. E.g.
mobile phones.

64 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Infrared Transmission Blocked by solid objects like walls and behaves like visible light rather than
radio. Infrared in wireless technology is electromagnetic energy at a wavelength, somewhat longer
than those of red light.

Advantages
• More secure
Immune to certain interferences
Has Large bandwidth
Disadvantages
• Limited Range
• Propagation Limitation

Uses
• “ terfere with nearby equipment
• For LAN use infrared is defunct
• Remote controls no government licensing of spectrum required

Medium Access Control Controls the access of medium, and how is the MAC coordination is done

Centralized - A controller grants access to medium and a station must get permission from controller
to access medium

Distributed - No centralized controller - all stations participate in coordination


• C
• Centralized relatively simple, distributed complex (adv)
• Centralized single point of failure, bottleneck, not distributed. (disadv)

PROBLEM 2: TRANSMISSION COLLISIONS

Our second problem is that of multiple transmissions occurring at the same time causing collisions.

The purpose of the Medium Access Control (MAC) sublayer is key to the solution of this. It controls
when and how we can access the medium.

Two MAC coordination techniques can be used:

• Distributed Coordination Function (DCF) requires a station wishing to transmit to listen for
the channel status for a DIFS interval. If the channel is found busy during the DIFS interval,
I P C “ M
is contention based. Used in independent and infrastructure BSS.

• Point Coordination Function (PCF) is optional and is centralized - poll based - meaning
stations cannot transmit frames unless the AP polls them first. PCF builds on facilities of DCF.

65 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Hidden node problem is where station A and B are not in range of each other but communicate
between a Hub or AP.

Address Resolution Protocols used by IPv4 specifically to map IP network addresses to hardware
addresses using data link protocols

CSMA/CA for wireless LANs is the Collision avoidance using RTS/CTS

• Request to Send (RTS) - When a station has data to transmit, waits DIFS interval and asks
coordinator (AP) permission to transmit by sending RTS.
• Clear to Send (CTS) - Coordinator (AP) grants permission by sending CTS

PROBLEM 3 - MOBILITY

Keeping track of users as they move around. Coordination of access points is done over a
distribution system.

Physical WLAN Design considerations called Site Surveys that checks the:
- Feasibility of desired coverage
- Potential sources of interference
- Locations of wired LAN and power sources
- Estimate number of APs required

Notes: horizontal and vertical mapping for multiple floors to reduce AP interference

PROBLEM 4 SECURITY

• Security is a cross-cutting concern


• Wireless is a broadcast signal
• Especially important for wireless network

Types of WLAN Security

Service Set Identifier (SSID) is required by all clients to include this in every packet as plain text. It is
easy to break

Wired Equivalent Privacy (WEP) - requires user to enter key manually to NIC or AP. Communication
E networks not for
businesses.

Wi-Fi Protected Access (WPA and WPA-2) new standard


• Master key obtained through EAP.
• User node and AP negotiate a secret session key using the master key.
• Session key has limited lifetime. (Temporary Key Integrity Protocol)
• Uses AES (Advanced Encryption Standard).

66 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 9: BACKBONE NET WORKS

Backbone network (aka enterprise or campus-wide network) is a network that connects other
networks together.

COMPONENTS

There are two basic components to a BN: the network cable and the hardware devices that connect
other networks to the BN. The cable is essentially the same as that used in LANs, except that it is
often fiber optic to provide higher data rates. The hardware devices can be computers or special-
purpose devices that just transfer messages from one network to another.

Switches
Most switches operate at the data link layer. They connect two or more network segments that use
the same data link and network protocol. They understand only data link layer protocols and
addresses. They may connect the same or different types of cable.

Routers operate at the network layer. Routers connect two or more network segments that use the
same or different data link protocols but the same network protocol. They may connect the same or
different types of cable. Routers strip off the data link layer packet, process the network layer
packet, and forward only those messages that need to go to other networks on the basis of their
network layer address
• Fundamental problem that limits network size at the physical layer is distance. Therefore,
use repeaters or hub to boost signal, results in fast and low latency.

Bridges - connect several LANs together to make one large LAN. This reduces collision domain and
broadcast domain becomes both connected networks. Bridges can also seperate LANs into smaller
to help accommodate load and isolate networks to increase reliability.
• B

• Bridges handle all kinds of network packets and routers only handle their network protocol.
• Bridges record addresses of where message came from and the arrival time of the frame.
(backward learning)

Gateways operate at the network layer and use network layer addresses in processing messages.
Gateways are more complex than switches or routers because they are the interface between two
or more dissimilar networks. Gateways connect two or more networks that use the same or
different (usually different) data link and network protocols.
- Transport Gateways connect two stations using different transport-layer protocols
- Application Gateways work on application level e.g. convert emails to SMS for mobiles.

67 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 10: METROPOLITA N AND WIDE AREA NETW ORK

A and creates a temporary


circuit. When the session is completed, the circuit is disconnected. E.g. Telephone system, phone
POT“ P O T “ D I“P

Integrated Services Digital Network (ISDN) is a set of communication standards for simultaneous
digital transmission of voice, video, data, and other network services over the traditional circuits of
the public switched telephone network. Generally, I“
D know P -switched networks.

There are three phases of communication in circuit-switched services:

• Circuit establishment > data transfer > circuit disconnect

Issues with Circuit Switching in POTS, ISDN and PBX:


• Varying quality links
• Slow speed
• Pay per use

For short exchanges, it is too much overhead, but good for long exchanges as it saves overhead
for deciding path to take for each packet because once a connection is established it does not
have to work out the path for traffic.
No congestion problems during data transfer and packets arrive in order (adv)
Data flows through - no need to store and analyse packets at hops (adv)
Since the circuit is not shared, the capacity may be wasted (disadv)

Local loops: connection between customer premise to the common carrier network

DEDICATED CIRCUIT NETWORKS VS PACKET SWITCHED NETWORKS

Circuit networks: They are full-duplex circuits using routers and switches to connect the locations
together to form a network.
Uses -
permanently.
Permanent Lease (vs circuit switched) - Flat fee per month*, unlimited traffic

Point-to-point links and require more care in network design


- Design: Ring, star, mesh

Services include:
- T carriers: Most commonly used dedicated digital circuits in North America

68 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Packet Switched Networks: Packets getting sent back and forth

Enable multiple connections to exist simultaneously between computers over the same physical
circuits. (not wasting network capacity)
• Users pay a fixed fee for the connection to the network plus charges for packets transmitted
• Users buy a connection into the common carrier network and connect via packet
assembly/disassembly device (PAD).

Packet switching takes advantage of short bursts of data that occurs during communicating by
maximising the use of a shared network.

PACKET ROUTING METHO DS: PACKETS GOING TO A PLACE

Connectionless (datagram)
- No need for circuit setup - just send packet into network
- Individual packets can follow different routes with same source and destination
- Adds a destination and sequence number to each packet
- Packets reassembled at destination (using sequence numbers)
- packets may arrive out of order, as it is unreliable and packets can also be lost or corrupted.

Connection-oriented (Virtual Circuit (VC))


- Establishes an end-to-end circuit between sender and receiver before the packets are sent
- All packets for the transmission take the same route over the VC established
- Same physical circuit can carry many VCs

Issues between these two:


- Packets can arrive out of order
- Shared circuit - congestion
- Packets have upper size limit, so no one can dominate medium
- Packets must be analysed before sending on

69 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

WEEK 11 AND 12 : NETWORK/INTERNET S ECURITY

SECURITY

Vulnerability a weakness that makes targets susceptible to an attack


Software vulnerabilities
• Bugs buffer overflows, format string vulnerabilities, off-by-one errors
• Insecure session management
• unencrypted passwords, credit card numbers
• Weak password reset procedures
Hardware vulnerabilities
Locks, doors left ajar, unattended devices
Lost and stolen laptops and mobile devices

Threat the expressed potential for the occurrence of a harmful event such as an attack

Previously identified threats manifest in different ways in an organisation:


Business continuity
D
- Loss or reduction in network service Could be minor or temporary (a circuit failure)
Destruction of data
- Viruses destroying files, crash of hard disk
Disasters (Natural or manmade disasters)
- May destroy host computers or sections of network

Unauthorised access
H
M
‘ I

Attack an action taken against a target with the intention of doing harm.
An attack can be active or passive.
A active attack" attempts to alter system resources or affect their operation.
A passive attack" attempts to learn or make use of information from the system but does not
affect system resources. (E.g., see: wiretapping.)
An attack can be perpetrated by an insider or from outside the organization;
An "inside attack" is an attack initiated by an entity inside the security perimeter
An "outside attack" is initiated from outside the perimeter, by an unauthorized or
illegitimate user of the system

70 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

Control somehow you need to stop packets with an IP address of inside the network being allowed
T it examines the source
IP address of packets owing through it and rejects spoofed internal source IP addresses.

ENCRYPTION

Encryption is the process of disguising information whereas decryption is the process of restoring it
to readable form. When information is in readable form, it is called plaintext; when in encrypted
form, it is called cyphertext. Encryption can be used to encrypt files stored on a computer or to
encrypt data in transit between computers.

There are two fundamentally different types of encryption: symmetric and asymmetric.

With symmetric encryption, the key used to encrypt a message is the same as the one used to
decrypt it.

• Uses the same algorithm and key to both encrypt and decrypt a message

With asymmetric encryption, the key used to decrypt a message is different from the key used to
encrypt it.

• U
o a public key used to encrypt messages
o a private key used to decrypt them

DIGITAL SIGNATURE

Digital signatures - variation of public key encryption. A digest of a message encrypted with the

Public key encryption can be used not only for encryption but also for authentication, via digital
signatures, which prove that a message really comes from its purported sender and that it has not
been altered.

T the sender carries out a computation using both his private key and the
message itself. This creates the digital signature. To verify the signature, the receiver performs a
I
relation results, the signature is proven to be genuine and not damaged or modified in transit.

PUBLIC KEY INFRASTRUCTURE

PKI begins with a certificate authority (CA), which is a trusted organization that can vouch for the
authenticity of the person or organization using authentication. The CA issues a digital certificate
CA T
-mail or Web. The receiver checks for revocation with CA.

71 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

FIREWALL, IDS, IPS

Firewall: protect your network from unsafe incoming traffic and protect other networks from any

• Use firewalls to achieve selective border control

Types of firewalls
• packet filter (packet level firewalls): Examines the source and destination address of
packets passing through and allows only packets that have acceptable addresses to pass.
Functionality is usually built into router.
o Stateful packet inspection identifies packets with particular connections
o Deep packets inspection looks at data inside the packets to detect problems or
violations of the protocol

• Application level (application gateway): Acts as intermediate host computer between


outside clients and internal servers. Forces anyone to login to this firewall and allows access
only to authorized applications.

Intrusion Detection System (IDS): They are able to detect actions such as repeated failed access
attempts or changes to system, and normally operate by accessing log files or monitoring real-time
system usage.

• host IDS clients must install every host of the network, tailored to specific host
configuration. Host-based IDSs do not depend on network bandwidth and are used for
smaller networks, where each host dedicates processing power towards the task of system
monitoring.

Intrusion Prevention Systems (IPS): a mechanism that tries to block intrusion attempt or attack that
can cause damages in computational resources. The objective of the IPS is mainly to prevent attacks
against the place being protected. It should be easily adjustable and be integrated in the same way
to the network of the organization.

IP Security Protocol (IPSec) is an encryption protocol which can be used with other application layer
protocols. A and B generate and exchange two random keys using an Internet Key Exchange(IKE),
combine keys and then negotiate encryption using DES or 3DES. They then transmit data using either
transport mode (IP payload encrypted only) OR tunnel mode (entire IP packet is encrypted)

DOS ATTACKS / DDOS PREVENTION

72 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)


lOMoARcPSD|827595

In a DoS attack, an attacker with malicious intent prevents users from accessing a service.

Types of Attacks

SYN Flood exploits weaknesses in the TCP connection sequence, known as a three-way handshake.
T “YN T
acknowledges the message by sending an acknowledgement (ACK) flag to the initial host, which then
closes the connection. In a SYN flood, however, spoofed messages are sent and the connection

A UDP flood targets random ports on a computer or network with UDP packets. The host checks for
the application listening at those ports, but no application is found.

ICMP reflection attack exploits Internet Protocol (IP) and Internet Control Message Protocol (ICMP)
using a malware program called smurf. It spoofs an IP address and using ICMP, it pings IP addresses
on a given network.

DDoS Botnet attack: An attacker takes over many computers (called bots), typically by using
malicious software. The attacker uses these bots (which form a botnet) to deliver a coordinated
stream of information requests to a target computer, causing it to crash.

LINK AND END-TO-END ENCRYPTION

Encryption can be performed at different communication levels, each with different types of
protection and implications. Two general modes of encryption implementation are link encryption
and end-to-end encryption.

Link encryption: Encryption and decryption of all traffic happens at each end of a communications
line.

• Advantage: All traffic over all communications links is secure.


• Disadvantage: the message must be decrypted each time it enters a packet switch.
• The message is vulnerable at each switch.
• Many keys must be provided.

End-to-End Encryption: Messages are encrypted by the sender at the point of origin and only
decrypted by the intended receiver.

• Advantage: Provide a degree of authentication and flexibility to the user in choosing what
gets encrypted and how
• Disadvantage: Headers, addresses, and routing information are not encrypted, and
therefore not protected.

73 | P a g e

Downloaded by Kristina Blazevska (kike.blazevska@gmail.com)

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