You are on page 1of 73

Chapter 4

Network Access Layer


OSI Data Link Layer

Exchange data
over common
media. PDU is a frame.
Getting it Connected
Connecting to the Network

 A physical connection can be a wired connection using a cable or a wireless


connection using radio waves.
 Switches and wireless access points are often two separate dedicated
devices, connected to a router.
 Many homes use integrated service routers (ISRs),
Getting it Connected
Network Interface Cards

 Network Interface Cards (NICs) connect a device to the network.


 Ethernet NICs are used for a wired connection whereas WLAN (Wireless
Local Area Network) NICs are used for wireless.
Fundamental Principles of Layer 1
Types of Physical Media

 Different types of interfaces and ports available on a 1941 router


Getting it Connected
Network Interface Cards

Connecting to the Wireless LAN with a Range Extender

 Wireless connection performance degrades as the distance to the access


point increases. A wireless extender improves signal strength and
bandwidth accordingly.
 IN the other hand , wired connectivity main disadvantage is mobility.
Getting it Connected
Network Interface Cards

Connecting to the Wireless LAN with a Range Extender

 Wireless devices must share access to the airwaves connecting to the


wireless access point.
• Slower network performance may occur
 A wired device does not need to share its access
• Each wired device has a separate communications channel over its
own Ethernet cable.
Data Link Layer

 Network Layer and above is software (IP, TCP, HTTP, etc.)

 Physical layer is implemented in hardware (converting bits to a transmission


signal)

 Data Link layer is implemented in both Software & Hardware.


Standards

 Upper layer TCP/IP standards are


defined by Internet Engineering
Task Force (IETF).

 Data link and physical layer are


defined by engineering
organizations ( ISO -IEEE - ITU –
ANSI ) as they describes how the
technology works:

• Ethernet, PPP, ISDN, Frame


Relay.
 Based on the number of users.
 The Geographical location
 Physical connection
• Hence, any technology is called
a layer 1,2 technology.
Supporting and Connecting to Upper Layer

 Two basic functions:

• It encapsulates and prepare upper layer


data to be transmitted over the media .

• Media Access Control (MAC) : How frame is


placed on the media “ the node turn that will
use the media “ and error detection.

 Different protocols and adapters ( Ethernet ,


wireless, point-to-point protocol , high-level
data link control , frame relay need different
MAC methods and frame format .
Layer 2 Protocols

 MAC addresses are only used for local delivery “who is next”.

 Addressing in this layer depends on the logical topology.

• Point-to-point topologies, with just two interconnected nodes, do not require


addressing.

• Multi-access topologies can connect many nodes on a common media.


Addressing is required for these typologies

 When the frame to be transported to another segment, the frame is re-


encapsulated by the receiving device and forwarded.

12
Controlling Transfer Across Local Media

WAN Header WAN


Trailer

LANHeader
LAN Header Packet LAN Trailer

The router

Accept the frame and check CRC.


Decapsulate it to packet. Check the
routing table to know the destination
exit interface &
Construct a new frame for the media.
Forward the new frame.
Controlling Transfer Across Local Media

The protocol can be configured on the


device and determines the type of
encapsulation (MAC method).
Sample: Data Link Layer Frames

Point-to-Point Protocol (PPP)


High Level Data Link
Control Protocol (HDLC)

Frame Relay
Different media… Protocol
Different characteristics…
Different MAC method…

Ethernet
Protocol
The Frame
Data Link Frame : Header , data and trailer.

Header differs
as media
changes

 Start and stop indicator fields : Start of communication bits .


 Addressing fields : Physical MAC addresses “ Destination Address denote which
device will receive the frame next ” .
 Type field - The type of the upper layer service PDU contained in the frame.
 Priority/Quality of Service field - Indicates a particular type of communication Flow
control services fields.
 Data field -The frame payload (Network layer packet).
Framing- The Trailer

 The signals on the media could be subject to change the bit values due to :

 Interference.
 Distortion.
 Loss.

18
Framing: Role of the Trailer

Frame Check Sequence (FCS): Use CRC to detect transmission errors.

 Sending device uses an algorithm on the bits of the header


and data portions and place the result in FCS field.
 Receiving device use the same algorithm to check if the same
result achieved . Frame discarded if values do not match.

 CRC errors in more than one bit may cancel each other out when the CRC
is calculated.

 Upper layer protocols would then be required to detect and correct this data
loss.

Trailer
Header Data FCS Stop
Data Link Sub-layers

 Data Link layer has two sub - layers :

• Upper Logical Link Control (LLC) – This upper sublayer communicates with
the network layer. It places information in the frame that identifies which
network layer protocol is being used for the frame. This information allows
multiple Layer 3 protocols, such as IPv4 and IPv6, to utilize the same network
interface and media.

• Lower Media Access Control (MAC) - MAC addressing , proper framing that
fits the media , delimiting of data and contention methods protocols at this
20
layer are implemented within the electronics of the network adapters.
Media Access Control

 Media Access Control protocols - Define and regulate the rules of how the nodes
share and access the media and the placement of data frames onto the media.

 This depends on : If more than two nodes share the media?

 If so, how? (Switches, hubs, etc.) Logical Topology

21
Physical Topology : The physical arrangement “connection “ of
the nodes.

Star using Ethernet


switch or hub or
serial star

But might be also


Bus or point to point
WAN Logical Topologies

WAN connections are usually in one of the following topologies

 Point to Point :The very popular simplest WAN topology , a permanent link
between two endpoints.

 Hub and Spoke: A WAN version of the star topology in which a central site
interconnects branch sites using point-to-point links.

 Mesh: The high available topology that requires every end system be
interconnected to every other system. Therefore the administrative and
physical costs can be significant. Each link is essentially a point-to-point link
to the other node.
Point-to-Point topology

 A point-to-point topology connects two nodes directly together. Frames from


one devices are for the device at the other end. /30 subnets are common.

• The media access control protocol can be very simple.


• Protocols: PPP, HDLC, Frame Relay.

 Point-to-point topologies is considered as a tunnel , it does not require special


addressing.

24
Logical Point-to-Point Networks

 Logical Point-to-point networks may include intermediate devices.

 The logical connection created between two network devices (in some cases) may
be a virtual circuit.

• The two nodes exchange the frames with each other.

• Data Link Destination address is the device at the other end of the virtual
circuit.

25
Duplex Transmissions

 Simplex Transmission: One way and one


direction only.

• One way street.

 Half-duplex Transmission: Either way is


permitted , but only one way at a time.

• Ethernet hubs use half-duplex.


• You have to wait until the way is empty.

 Full-duplex Transmission: Both ways at the


same time.

• Ethernet switches use full-duplex.


• Most serial links are full-duplex.
26
FYI-Added now until to check where
FYI- Legacy Ethernet are these later

Hub “ Shared media” Switch “ not shared”


FYI- Full-duplex

 Most switches operate at full-duplex but can operate in half-duplex.

 In full-duplex, the station ignores any collision detect signals that come from the
transceiver , it assumes no collisions. “No CSMA/CD”

 The two stations must be configured for full duplex , if a hub is connected to a
switch, the switch port must be in half-duplex.

 Choose always a full duplex NIC supported for your computer.

28
FYI- Half-duplex, Full-duplex Issue

Switch A or Hub A Switch B

Half-duplex Full-duplex

 Switch A senses a collision (the half-duplex side) and stops sending the frame.
 Switch B (Assumes no collisions) doesn’t care and keeps on sending frames.
 Data ends up being transmitted only one-way most of the time, with collisions
constantly happening on Switch A, causing performance issues on the network.
(Remember, most network communications is bi-directional.
 You might notice this problem when the collision light (or output) on Switch
always on indicating a very large number of collisions detected on that port.

29
FYI- Configuring Speed and Duplex

 Negotiation between NIC and switch port.

• Duplex: Full-duplex or Half-duplex


• Speed: 10/100/1000 Mbps
• Autonegotiation

 Both sides of a link should have


auto-negotiation on, or both sides
should have it off.

30
FYI- Legacy Ethernet

• Ethernet with hubs is designed to work with collisions.

• Half Duplex communication managed by CSMA/CD.


• Use only 50%-60% of the available 10 Mbps of bandwidth because of
collisions and latency.

• Ethernet with switches is designed to eliminate collisions.

• Full-duplex Ethernet offers 100% of the bandwidth in both directions.


10 Mbps Ethernet: This produces a potential 20 Mbps throughput, which
results from 10 Mbps TX and 10 Mbps RX.
LAN Logical Topology
 A logical topology - The virtual way
devices are connected and the way
network transfers frames between
nodes.

• Defines the Data Link layer


protocols , framing and media
Access control.

 Contention based
 CSMA/CD 802.3
 CSMA/CA 802.11
 Controlled
 Token Ring 802.5
 FDDI 802.4

32
Placing Data on Frames
– Logical Topologies
There are TWO basic media access control methods for sharing the media:

Controlled - Scheduled or deterministic access , stations will have the turn to send
data even if they have nothing to transmit i.e. Token Ring , etc.. (No collisions)
Performance of these types of networks are low because stations have to wait its
role . Frames for these technologies are large in size because it contains a lot of
data that organize data transmission.

Contention-based (Multi Access) - All nodes compete for the use of the medium
(non-deterministic) whenever they have data to send using CSMA.

• It is less overhead than controlled media usage.


• An example is (CSMA) that is used to prevent collision.
• Non-shared multiple access control require little or no control before placing
frames onto the media. Ex: point-to-point topologies involves only 2 nodes.
• The Data Link layer has to consider also whether the communication is half or
full-duplex.

33
Multiple –Access Topology

 In multi-access topology , there are multiple nodes .

 Only data from one node can be placed on the medium at a time.

 Carrier Sense Multiple Access (CSMA) first detect if the media is carrying a signal.

 If a signal is detected, it means that another device is transmitting , wait and try
again after a short time period.

 If no carrier signal is detected, the device can transmits its data.

 It is possible that the CSMA process will fail when two devices transmit at the same
time. This is called a data collision. Data will then be corrupted and will need to be
resent.

 Protocols: CSMA/CD – Ethernet Hubs , wireless 802.11 CSMA/CA , Frame Relay


Multipoint are examples.

34
Multiaccess Logical Topology

 Multi-access networks require an address to specifically identify the destination


that will receive the data next.

A sends to E
Check for other
transmissions 2222 6666

Media available

Transmit
X
X X I’ll wait……

Media NOT available

Check for other


B needs to send to D transmissions
Access – contention methods

 CSMA/Collision Detection (CSMA/CD) (Used by Ethernet 802.3).

The device monitors the media for the presence of a data signal.
If the media is free, the device transmits data.

If signals of another transmitting device detected at the same time, all devices
stop sending and try again later.

 CSMA/Collision Avoidance (CSMA/CA) ( Used by wireless 802.11).

The device examines the media for the presence of a data signal.

If the media is free, the device sends a notification across the media of its intent
to use it. The device then sends the data.

36
LAN Topologies
Controlled Access
Ring Topology

Yes
Is it for me?

No
A sends to D
Is it for me?

No

Is it for me?

 Token Passing media access control


• Each node in turn receives a frame.
• If data link destination address is not for that device, passes frame to next
node.
• The Data Link layer "sees" a logical ring topology. The actual physical cabling
topology could be another topology.
• Before sending data , device should have the token.
Bandwidth

LAN typically uses a high bandwidth technology

• Supporting large number of hosts

WAN

• A high bandwidth that might be more expensive technology as it crosses large


geographic areas (cities or multiple cities, for example).

• The cost results in lower bandwidth capacity.

• The need for high bandwidth on WANs is increasing due to video, voice, and
other applications.

39
Ethernet Protocol for LAN

 Ethernet is a layer 1,2 most widely used LAN technology defined in IEEE 802.2
and 802.3 standards and supports data bandwidths of 10, 100, 1000 & 10,000
Mbps.
40
Point-to-Point Protocol for WANs

 (PPP) is one of the serial WAN protocol used to deliver frames between two nodes.

 PPP connections might be fiber optic lines, satellite , as well as for virtual
connections.

 PPP also build sessions that allows two nodes to negotiate options within the PPP
session. This includes authentication, compression, and multilink (the use of
multiple physical connections). The sessions will allow supporting various layer 3
protocols

 PPP doesn’t assign an individual station address , but uses a broadcast address.

41
Wireless LAN IEEE 802.11 protocol.

 Uses (CSMA/CA) to control access and contention .


 CSMA/CA specifies a random backoff procedure for all nodes that are waiting to
transmit.
 It used Data Link acknowledgements to confirm that a frame is received
successfully.
 Support authentication, association (connectivity to a wireless device), and
privacy (encryption).

42
Physical layer tasks

• The Data Link layer must specify the start and the end of each frame .

• However, the Physical layer may add its own signals to indicate the beginning
and end of the frame.
Purpose of the Physical Layer
Physical Layer Media

The physical layer produces the representation and groupings of bits for each
type of media as:
• Copper cable: The signals are patterns of electrical pulses.
• Fiber-optic cable: The signals are patterns of light.
• Wireless: The signals are patterns of microwave transmissions.
Physical layer standards

 The physical layer standards defined :

• Encoding and Signaling : How should the data and control signal be.

• Media , connectors and NIC : defines the physical , electrical and mechanical
properties and pinouts.
Encoding and signaling
Encoding : converting a stream of data bits “data or control” into a predefined code
(groupings of bits) at the transmitter , data is decoded at the receiver.

• Codes should be in a predictable pattern to be recognized by the receiver.


• This provides better error detection.
• This helps to distinguish data from control bits .

Signaling : The Physical layer must generate the electrical, optical, or wireless
signals that represent the "1" and "0" on the media. This also includes
representing bits on the medium by changing Amplitude, Frequency or Phase .
Data Carrying Capacity
Data transfer speed can be measured in 3 ways:

- Bandwidth - (Ideal). (Depends on the physical char. And switching technology)

• The amount of data flowing across a network segment in a given time.


• Determined by the properties of the medium and the technology used .
• Basic unit is bits per second (bps) : 1 Kbps = 1,000 bps.

- Throughput – The actual transfer of bits across the media over a given time .
Differs than ideal due to the amount and type of traffic and the latency created by
the number of devices between the source and destination.

throughput cannot be faster than the slowest link of the path

- Goodput - It is the real measure of usable data transferred over a given period of
time . Goodput is throughput minus traffic overhead for establishing sessions,
acknowledgements, and encapsulation.

-Latency - refers to the amount of time, to include delays, for data to travel from
one given point to another.
47
Coaxial cable

 Got its name from the fact that there are two conductors on the same access.

 Good for high frequency radio/video signals , carries data between wireless
radios and antennas , cable TV and Internet connections.

 Used formerly in Token LANs – died out as UTP was cheaper and gave higher
speeds.

 Often now combined with fibre in the network , (optic Hybrid Fiber Coax (HFC
network is a network which incorporates optic fiber along with coaxial cable to
create broadband networks).
Media
 Copper cable (twisted pair and coaxial)
 Fibre optic cable
 Wireless

Coaxial cable and connectors


 Central conductor.
 Insulation.
 Copper braid acting as return path for current and also as shield against
interference (noise).
 Outer jacket.
Which media?

Different Physical layer implementations that support multiple media types:


UTP (Category 5, 5e, 6, and 7) , Fiber-optics or wireless.

 Cupper has Low resistance for electrical current.


 Cost: UTP is cheaper than fiber optic
 Ease of installation: UTP is easier.
 Length: Cupper UTP is limited up to 100m (Attenuation) , fiber optic longer
 Bandwidth: A fiber cable may be used for a server connection for high bandwidth.
 EMI/RFI noise: may need fiber optic , affects wireless strongly.
 High capacity link: may need fibre optic.
 UTP inside building. Fibre optic might be used inside or outside.
Copper Cabling
Characteristics of Copper Media

1 2

4
3

 Signal attenuation - the longer the signal travels, the more it


deteriorates - susceptible to interference
 Crosstalk - a disturbance caused by the electric or magnetic fields of a
signal on one wire to the signal in an adjacent wire.
Copper
Cabling
Copper
Media

 Counter the negative effects of different types of interference some


cables are wrapped in metallic shielding
 Counter the negative effects of crosstalk, some cables have opposing
circuit wire pairs twisted together which effectively cancels the crosstalk.
Noise
Electrical signals on copper cable are subject to interference (noise).

 Electromagnetic (EMI) from device ,fluorescent lights, electric motors is avoided by


shielding , twisting and routing copper cable away from areas that produce noise)
and selecting the proper cable category for the required application .

 Radio Frequency (RFI) from radio transmissions. (Avoided by shielding the cable).
 Crosstalk caused by magnetic field from adjacent pairs of wires in the cable or
nearly cables. Twisting of wire pairs cancel unwanted signals and eliminate
crosstalk.
 Careful termination – putting connectors on cables correctly.
Type Use

Category 1 (1Mhz) Voice Only (Telephone Wire)

Category 2 (4Mhz) Data to 4 Mbps (LocalTalk)

Category 3 (16Mhz) Data to 10 Mbps (Ethernet)

Category 4 Data to 20 Mbps (16 Mbps Token Ring)


(20Mhz)

Category 5 Data to 100 Mbps (Fast Ethernet)


(100Mhz)

Category 5e Data to 1000Mbps (Full Duplex Fast Ethernet and


(100Mhz) Gigabit Ethernet-Minimum acceptable for nowadays
applications)
Category 6 Data to 1000Mbps (more stringent specifications
(250Mhz) for crosstalk and system noise)

54
UTP Cabling
UTP Cabling Standards
Unshielded twisted pair (UTP) cable
 Eight wires twisted together into four pairs and with an outer jacket.
 Jackets protects copper from physical damage.
 Commonly used for Ethernet LANs.
 The number of twists per metre is carefully controlled. (Protect from
interference)
Straight through cable Crossover cable
 Both ends the same  Wire 1 swaps with 3
 Connect PC to switch or hub  Wire 2 swaps with 6
 Connect router to switch or hub  Connect similar devices to each other
 Installed cabling is straight through.  Connect PC to router , switches to
 Connects unlike devices DCE-DTE. hubs , DTE to DTE or DCE to DCE.
Cabling – Show the straight-through and cross-over cables

Straight-through cable

router Cross-over cable

switch switc
h

hub hub hub hub hub hub

58
Cross over

 One end must be terminated as EIA/TIA


T568A pin-out, and the other end is
terminated with T568B pin-out.

 The cross over cable is used to connect:

• Switch to switch
• Switch to hub
• Hub to hub
• Router to router Ethernet port
connection
• Computer to computer
• Computer to a router Ethernet port
UTP cable

 Straight through cable – same both ends


 Crossover cable – 1 swaps with 3, 2 swaps
with 6

Why cross over?

 The Transmit pin needs to be connected to the


receive pin.
 The crossing over can happen in the cable or
inside a device.
RJ45 connectors
Plugs on patch cables (crimped).

Sockets to terminate installed cabling (punch down).

Jacket must be fixed inside the RJ45 so as not to reveal wires to noise.
Rollover cable
 Cisco proprietary.
 Wire order completely reversed.
 Console connection from PC serial port to router –
to configure router.
 Special cable or RJ45 to D9 adaptor.

Shielded twisted pair (STP and


Screened TP - SCTP)
 Wires are shielded against noise.
 Difficult to install than UTP.
 Much more expensive than UTP.
 If the cable is improperly grounded,
the shield may act like an antenna
and pick up unwanted signals.
 Recommended for 10 Gbps
Ethernet.
Fiber Media
 Uses glass or plastic core and clad to guide light impulses from source to destination.
 Capable of very large raw data bandwidth rates. “Used for backbone connections and
supports long distance”
 The cladding surrounds the actual glass or plastic fiber and is designed to prevent
light loss from the fiber and is a glass that reflect light beams.
 Preferred in areas of electrical hazards as it doesn’t interfere with EMI.

Fibre optic cable


 Transmits flashes of light.
 No RFI/EMI noise problem.
 Several fibres in cable.
 Paired for full duplex.
Single mode fibre optic
 Glass core 8 – 10 micrometres diameter.
 Laser light source produces single ray of light.
 Distances up to 100km.
 Photodiodes to convert light back to electrical signals

Multimode fibre optic

 Glass core 50 – 60 micrometres diameter.


 LED light source produces many rays of light at different angles, travel at
different speeds.
 Distances up to 2km , limited by dispersion, and speeds of10Gbps.
 Photodiode receptors.
 Cheaper than single mode and usually used inside campus.
Fibre optic connectors

Straight tip (ST) connector Subscriber connector (SC)


single mode multimode

Duplex multimode lucent connector (LC) Multimode lucent connector


Fiber optics applications in industry

• Enterprise Networks : Used for backbone cabling to connect infrastructure


devices.

• FTTH and Access Networks: Fiber to the home very high speed broadband
service .

• Long-Haul NetworksUsed by service providers to connect cities and countries at a


very high speed terrestrial connections of 10 Gbps.

• Submarine Networks: Used to offer very high speed in undersea environment.


Common fiber-optic termination errors

 Misalignment – When joining two fiber cables.


 End gap - the media do not completely touch at the connection.
 End finish - the media ends are not well polished or dirt is present at the
termination.

Testing cables

Twisted pair cables tester Optical Time Domain Reflectometer (OTDR)


to test wire map , cable for fibre optic cables
length & crosstalk
Which cable for the LAN?

Implementation issues Copper media Fibre-optic


Bandwidth supported 10 Mbps – 10 Gbps 10 Mbps – 100 Gbps
Relatively short Relatively High
Distance
(1 – 100 meters) (1 – 100,000 meters)
High
Immunity to EMI and RFI Low
(Completely immune)
High
Immunity to electrical hazards Low
(Completely immune)
Media and connector costs Lowest Highest
Installation skills required Lowest Highest
Safety precautions Lowest Highest
Within building only
Within/between buildings
Used for “distance issues”

Two fibers are required to support full duplex operation


Wireless Media
 Frame bits are represented as radio or microwave frequencies .

 No cost of installing cables where hosts are free to move around (Mobility).

70
Wireless Media
 Wireless LAN requires the following network devices:

Wireless adaptors
- Wireless Access Point (AP).
- Wireless NIC.

Wireless problems

 Interference from other wireless communications,


cordless phones, fluorescent lights, microwave ovens.

 Coverage area: Best for open area as building materials


can block signals.

 Security is a major issue. Wireless access point

71
Wireless Media
Types of Wireless Media
• IEEE 802.11 standards
• Commonly used in wireless LANs
• Uses CSMA/CA
• Variations include:
• 802.11a: 54 Mbps, 5 GHz
• 802.11b: 11 Mbps, 2.4 GHz
• 802.11g: 54 Mbps, 2.4 GHz
• 802.11n: 600 Mbps, 2.4 and 5 GHz
• 802.11ac: 1 Gbps, 5 GHz
• 802.11ad: 7 Gbps, 2.4 GHz, 5 GHz, and 60 GHz

• IEEE 802.15 standard


• Usually called as WPAN “Wireless personal
area Network”
• Supports speeds up to 3 Mbps
• Provides device pairing over distances from
1 to 100 meters.

• WIMAX - IEEE 802.16 standard


• World wide interoperability for Microwave
access.
• Provides speeds up to 1 Gbps
• Uses a point-to-multipoint topology to
provide wireless broadband access.
FYI- Wireless Media
802.11 Wi-Fi Standards

Maximum Backwards
Standard Frequency
Speed compatible

802.11a 54 Mbps 5 GHz No

802.11b 11 Mbps 2.4 GHz No

802.11g 54 Mbps 2.4 GHz 802.11b

802.11n 600 Mbps 2.4 GHz or 5 GHz 802.11b/g

1.3 Gbps 2.4 GHz and 5.5


802.11ac (1300 Mbps) GHz
802.11b/g/n

7 Gbps 2.4 GHz, 5 GHz


802.11ad (7000 Mbps) and 60 GHz
802.11b/g/n/ac

You might also like