Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

Data Communications

Connecting Devices

IT2210 Data Communication


Outline
 Introduction
 Modems
 Repeaters/Hubs
 Bridges/Switches
 Routers

IT2210 Data Communication


Introduction

IT2210 Data Communication


Expanding Networks
 Networks cannot be made larger by simply adding new
computers and more cables
 Less efficient !!
 Better Option
 Segment (divide) large LAN to form smaller LANs
 Connect LANs
 We need the networking devices
 Allow greater number of nodes to be connected
 They extend the network over which nodes can be connected
 They localize traffic on the network
 Allow easy diagnosis of networks

IT2210 Data Communication


What are internetworking devices?

 Internetworking devices are products used to


connect networks. As computer networks grow
in size and complexity, so do the internetworking
devices used to connect them.

IT2210 Data Communication


Modems

IT2210 Data Communication


Modems

• Allow computers to
communicate over a
telephone line
• Enable communication
between networks or
connecting to the world
beyond the LAN

IT2210 Data Communication


Why do we need Modems
• Cannot send digital signal directly to telephone line
• Sending end: MODulate the computer’s digital signal
into analog signal and transmits
• Receiving end: DEModulate the analog signal back into
digital form

IT2210 Data Communication


• Modems typically have the following I/O interface:
• A serial RS-232 communication interface
• An RJ-11 telephone-line interface (a telephone
plug)

RS-232 RJ-11 IT2210 Data Communication


Repeaters

IT2210 Data Communication


Repeaters

 A physical layer device that acts on bits but not on


frames or packets
 When a bit (0,1) arrives, the repeater receives it and
regenerates it, then transmits it onto all other interfaces
 Used in LAN to connect cable segments and extend the
maximum cable length
 Repeaters do not implement any access method
• If any two nodes on any two connected segments
transmit at the same time collision will happen
• Do not isolate and filter packets
 Cannot join segments with different access methods (e.g.
CSMA/CD and token passing)

IT2210 Data Communication


Function of a repeater

IT2210 Data Communication


A repeater connecting two segments of a LAN

A repeater connects segments of a LAN.


A repeater forwards every frame – there is no filtering.
A repeater is a regenerator, not an amplifier.

IT2210 Data Communication


Hubs

IT2210 Data Communication


Hubs

 Acts on the physical layer


 Operate on bits rather than frames
 Also called multiport repeater
 Hub receives a bit from an adapter and sends it to all the other adapters without
implementing any access method.
 Does not do filtering (forward a frame into a specific destination or drop it) just it
copy the received frame onto all other links
 The entire hub forms a single collision domain, and a single Broadcast domain
• Collision domain: is that part of the network (set of NICs) when two or more
nodes transmit at the same time collision will happen.
• Broadcast domain: is that part of the network (set of NIC) where each NIC
can 'see' other NICs' traffic broadcast messages.

IT2210 Data Communication


Interconnecting with hubs
 Backbone hub interconnects LAN segments
 Advantage:
• Extends max distance between nodes
 Disadvantages
• Individual segment collision domains become one large collision
domain  (reduce the performance)
• Can’t interconnect different Ethernet technologies because no
buffering at the hub

Here we have a
single collision
domain and a
single
broadcast
domain
A hub is a multi-port repeater, used in star-wired LANs (Ethernet).
Because of the amount of traffic and collisions, hubs can only be
used in small network configurations.
IT2210 Data Communication
Hubs Vs. Repeaters
 Hub are different than repeaters in the following:
• The provide network management features by
gathering information about the network and report
them to a monitoring host connected to the hub so
some statistics about the network (bandwidth usages,
collision rates, average frame sizes) can be generated.
• If an adapter is not working the hub can disconnect it
internally and the network will not be affected.

IT2210 Data Communication


Bridges/Switches

IT2210 Data Communication


Bridges/switches

 Acts on the data link layer (MAC address level)


 Used to divide (segment) the LAN into smaller LANs segments, or to
connect LANs that use identical physical and data link layers protocol
 Each LAN segment is a separate collision domain
 Bridge does not send the received frame to all other interfaces like hubs and
repeaters, but it performs filtering which means:
 Whether a frame should be forwarded to another interface that leads to
the destination or dropped
 This is done by a bridge table (forwarding table) that contains entries for the
nodes on the LAN
 The bridge table is initially empty and filled automatically by learning
from frames movements in the network
 An entry in the bridge table consists of : Node LAN (MAC) Address,
Bridge Interface to which the node is connected to, the record
creation time
IT2210 Data Communication
Switches

 N-Port bridge where N is equal to number of stations


 Usually used to connect individual computers not LANs like
bridge
 Allows more than one device connected to the switch directly
to transmit simultaneously
 Can operates in Full-duplex mode (can send and receive
frames at the same time over the same interface)
 Performs MAC address recognition and frame forwarding in
hardware (bridge in software)
Isolated
collision
domains

IT2210 Data Communication


Bridges (Switches) Vs. Hubs

A Hub sending a packet form F to C.


A Switch sending a packet from F to C

IT2210 Data Communication


Switches Learning Process

IT2210 Data Communication


Switch learning process
 When the switch receives a frame, it compares the source address of the frame
with each entry in the forwarding table
• If No match is found, the bridge will add to the table the frame source
address and the Interface on which the frame was received.
• If a match is found, the bridge updates the Interface number on which the
frame was received if it is different from the one in the table also it updates
the record time
 Then, the switch compares the destination address of the frame with each entry
in the forwarding table (MAC table)
• If a match is found then
• The bridge compares the interface number on which the frame was
received and the interface number in the table, if they are different the
bridge forwards the frame through the interface number stored in the
table. Otherwise, if they are the same the switches discards (drops) the
frame.
• If no match is found, the switch floods the frame on all interfaces except the
one on which the frame was received.
IT2210 Data Communication
Learning MAC Addresses

IT2210 Data Communication


Learning MAC Addresses (cont.)

IT2210 Data Communication


Filtering Frames
PC-D sends a frame back to PC-A and the switch learns PC-D’s MAC
address.

IT2210 Data Communication


Filtering Frames (cont.)
Since the Switch MAC Address table contains PC-A’s MAC Address, it
sends the frame out only port 1.

IT2210 Data Communication


Filtering Frames (cont.)
PC-A sends another frame to PC-D. The switch’s table now contains
PC-D’s MAC address, so it sends the frame out only port 4.

IT2210 Data Communication


Some switch features

 Switch forwards a frame with broadcast address to all


devices attached to the whole network (single broadcast
domain)
 Increases reliability (how?), performance (how?), and
security (how?)
 (“plug-and-play”): no configuration necessary at
installation of switch /switch or when a host is removed
from one of the LAN segments
 Disadvantage: switch does not allow multiple paths
between LAN segments or between any two devices.

IT2210 Data Communication


Switch Spanning Tree

IT2210 Data Communication


Prior to spanning tree application

Switch

•When using switches, the network should not contain any loop (there should be
exactly one path from any LAN to any other LAN
•Loops can cause number of frames in the LAN to increase indefinitely

IT2210 Data Communication


Loop problem in a learning switch

IT2210 Data Communication


Applying spanning tree

Step 1: Every bridge has an ID. Select the bridge with smallest ID.This is the root
bridge.
Step 2: Mark one port of each bridge (except root bridge) as the root port. Root
port is the port with least-cost path from the bridge to the root bridge (marked with
one star).
Step 3: For each LAN, choose a designated bridge. A designated bridge has the
least-cost path between the LAN and root bridge (the arrows). Mark the
corresponding port that connects the LAN to its designated bridge the designated
port (two stars). IT2210 Data Communication
Forwarding ports and blocking ports

Step 4: Mark the root port and designated port as forwarding ports, the others as
blocking ports (every port with 1 or 2 stars keep, ports with no stars drop).
Note - there is only 1 path between any two bridges.

 For any connected graph there is a spanning tree that maintains connectivity
but contains no closed loops
 Loops are logically disabled by the minimum spanning tree algorithm
IT2210 Data Communication
Switch Forwarding Methods

IT2210 Data Communication


Store-and-Forward Switching
 Features of Store-and-Forward
Switching:
• Error Checking– After receiving the
entire frame, the switch compares the
frame-check-sequence (FCS) value in
the last field against its own FCS
calculations. Only error-free frames
are forwarded
• Automatic Buffering– ingress port
buffering provides the flexibility to
support any mix of Ethernet speeds.
 Example-Store-and-Forward is Cisco’s
primary LAN switching method.

IT2210 Data Communication


Cut-Through Switching
 Rapid Frame Forwarding - The switch can
make a forwarding decision as soon as it has
looked up the destination MAC address.
• Frames with errors are forwarded.

IT2210 Data Communication


Switch VLANS

IT2210 Data Communication


Problems with flat network
 Broadcast domain become too large
 No security control for individual switch ports
 Inflexible because subnets are created only with
addition of routers

Net B
Net A Net C
Router
A flat
Net D
network
IT2210 Data Communication
What does VLAN do?
 Create smaller broadcast domains by grouping
users according to
• Location
• Department
• etc
 Improve security by preventing anyone in the
same LAN from monitoring the network traffic
(eavesdropping)

IT2210 Data Communication


Broadcast in flat network

Receive Receive Receive


Switch

Receive
Receive
Receive
Router Switch

Receive
Receive
Switch
BROADCAST

IT2210 Data Communication


Broadcast in VLAN
VLAN A VLAN B VLAN C

Switch
RECEIVE

Router Switch RECEIVE

Switch
BROADCAST

IT2210 Data Communication


VLAN Definitions
 VLANs can segment LAN devices without
regard for the physical location of the user or
device.
• In the figure, IT users on the first, second,
and third floors are all on the same LAN
segment. The same is true for HR and
Sales users.
 A VLAN is a logical partition of a Layer 2
network.
• Multiple partitions can be created and
multiple VLANs can co-exist.
• The partitioning of the Layer 2 network
takes place inside a Layer 2 device,
usually via a switch.
 VLANs are mutually isolated and packets can
• Each VLAN is a broadcast domain that only pass between VLANs via a router.
can span multiple physical LAN
segments.
• Hosts on the same VLAN are unaware of
the VLAN’s existence.
IT2210 Data Communication
Broadcast Domains with VLANs and Routers

 VLAN implementation on a switch causes certain actions to


occur:
• The switch maintains a separate bridging table for each VLAN
• If the frame comes in on a port in VLAN 1, the switch searches the
bridging table for VLAN 1
• When the frame is received, the switch adds the source address to the
bridging table if it is currently unknown
• The destination address is checked so a forwarding decision can be
made
• For learning and forwarding, the search is made against the the address
table for that VLAN only
 If the destination IP address of an IP packet is on a different
VLAN (subnet), a router or Layer 3 switch must route the
packet
IT2210 Data Communication
Broadcast Domains with VLANs and Routers

Inter-VLAN Communication Requires a Router

IT2210 Data Communication


Benefits of VLANs

IT2210 Data Communication


Advantages of Switches

• Switches divide a network into several isolated


channels (or collision domains)
• Reduce the possibility of collision
• Collision only occurs when two devices try to get access to one
channel
• Can be solved by buffering one of them for later access
• Each channel has its own network capacity
• Suitable for real-time applications, e.g. video conferencing
• Since isolated, hence secure
• Data will only go to the destination, but not others

IT2210 Data Communication


Limitations of Switches

• Although contains buffers to accommodate bursts


of traffic, can become overwhelmed by heavy
traffic
• Device cannot detect collision when buffer full
• CSMA/CD scheme will not work since the data channels are
isolated, not the case as in Ethernet
• Some higher level protocols do not detect error
• E.g. UDP
• Those data packets are continuously pumped to
the switch and introduce more problems

IT2210 Data Communication


Routers

IT2210 Data Communication


Routers
 Operates at network layer = deals with packets not frames
 Connect LANs and WANs with similar or different protocols
together
 Switches and bridges isolate collision domains but forward
broadcast messages to all LANs connected to them. Routers
isolate both collision domains and broadcast domains
 Deals with global address ( network layer address (IP)) not local
address (MAC address)
 Routers Communicate with each other and exchange routing
information
 Determine best route using routing algorithm by special software
installed on them
 Forward traffic if information on destination is available
otherwise discard it (not like a switch or bridge)

IT2210 Data Communication


Routers connecting independent LANs and WANs

Routers

IT2210 Data Communication


A Router is a Computer/Router CPU and OS
Routers require:
 Central processing units (CPUs)
 Operating systems (OSs)
Memory consisting of:
• Random-access memory (RAM)
• Read-only memory (ROM)
• Nonvolatile random-access memory (NVRAM)
• Flash
 Example- The Cisco Internetwork Operating System (IOS) is the system
software used for most Cisco devices regardless of the size and type of the
device.
Inside of a Router

IT2210 Data Communication


Connect to a Router
Double-wide eHWIC slots eHWIC 0 AUX LAN
port interfaces

Console
RJ45 USB
Ports
Two 4 GB flash card slots Console
USB Type B

IT2210 Data Communication


How do routers differ from
bridges?
 Routers differ from bridges in several respects.
First, bridging occurs at the data link layer or layer
2,while routing occurs at the network layer or
layer 3 of the OSI model.
 Second, bridges use physical or MAC addresses to
make data forwarding decisions. Routers use a
different addressing scheme that occurs at layer
three

IT2210 Data Communication


Examples of Routing-RIP
• RIP (Routing Information Protocol) ― the oldest one
• Use no. of hops between nodes to determine best path
• Does not consider the network congestion condition
• Broadcast every 30 sec the routing table to neighbouring
routers to convey routing information
• RIP is limited to interpreting a maximum of 16 hops
• Not suitable for large network (e.g. Internet)
• Can create excessive network traffic due to broadcasting
• May take a long time to reach the far reaches

IT2210 Data Communication


Directly Connected Routing Table Entries

Route source – Identifies how the network was learned by the router.

Destination network – Identifies the destination network and how it was


learned.

Outgoing interface – Identifies the exit interface to use to forward a


packet toward the final destination. IT2210 Data Communication
Layer-3 Switches

• Layer-3 switches operate in both layer 2 (data link layer) and 3 (network
layer)
• Can perform both MAC switching and IP routing
• A combination of switch and router

IT2210 Data Communication


Wireless Access Points

IT2210 Data Communication


Wireless?
 A wireless LAN or WLAN is a wireless local area
network that uses radio waves as its carrier.
 The last link with the users is wireless, to give a
network connection to all users in a building or
campus.
 The backbone network usually uses cables

IT2210 Data Communication


Common Topologies

The wireless LAN connects to a wired LAN

 There is a need of an access point that bridges wireless LAN traffic into the wired
LAN.
 The access point (AP) can also act as a repeater for wireless nodes, effectively
doubling the maximum possible distance between nodes.

Wireless Access Point has


1- Built-in network adapter.
2- Antenna.
3- Radio transmitter.

IT2210 Data Communication


Physical and Data Link Layers
Physical Layer:
 The wireless NIC takes frames of data from the
link layer, scrambles the data in a predetermined
way, then uses the modified data stream to
modulate a radio carrier signal.
Data Link Layer:
 Uses Carriers-Sense-Multiple-Access with
Collision Avoidance (CSMA/CA).

IT2210 Data Communication


Summary

• Repeaters are the least expensive way to expand a


network, but they are limited to connecting two segments
• Bridges function similar to repeaters, but can understand
the node addresses
• Switches can be considered as multiport bridges, can
divide a network into some logical channels
• Routers interconnect networks and provide filtering
functions. They can determine the best route

IT2210 Data Communication


References
 Textbook
 Behrouz Forouzan, Data Communications and Networking,
5th edition, McGraw - Hill, 2012 – Chapter -17

IT2210 Data Communication


Thank you

IT2210 Data Communication

You might also like