Unit4 1 2019-20
Unit4 1 2019-20
Unit4 1 2019-20
• Connecting devices
• Backbone networks
• Virtual LANs
Five Categories of Connecting Devices
15-2
Passive Hubs
15-3
Repeater
• A repeater operates only in the physical layers
• A repeater connects segments of a LAN
• A repeater forwards every frame; it has no filtering capability
• The repeater is a two-port device that extends the LANs’ physical length
15-4
Function of a Repeater
• A repeater is a regenerator, not an amplifier
15-5
Repeaters/Hubs
15-6
Active Hubs
• An active hub is actually a multiport repeater
• It is normally used to create connections between stations in a star topology
• Hubs can also be used to create multiple levels of hierarchy; removing the
length limitation of 10Base-T (100m)
15-7
Bridges
• A bridge operates in both physical and data link layers
• A bridge has filtering capability: Having a table used in filtering decisions
• A bridge can check the physical (MAC) addresses in a frame.
• A bridge does not changes physical (MAC) addresses in a frame
15-8
Bridges
• Transparent bridges
– A bridge in which the stations are completely unaware of the bridge’s
existence
– Three criteria for a transparent bridge according to IEEE 802.1d
specification
• Frames must forward from one station to another
• The forwarding table is automatically made by learning frame
movements in the network
• Loops in the system must be prevented
15-9
Transparent Bridges: Learning
15-10
Loop Problem in a Learning Bridge
15-11
Transparent Bridges: Spanning Tree
• Spanning tree is a graph in which there is no loop
• To solve the looping problem, IEEE spec requires that bridges use the
spanning tree algorithm
15-12
Spanning Tree: Graph Representation
15-13
Spanning Tree:Finding the Shortest Path
15-14
Spanning Tree: Forwarding and
Blocking Ports
15-15
Source routing bridges
• A sending station defines the bridges that the frame must visit
• Not very common today
• It can prevent loops in a system with redundant bridges
15-16
Bridges Connecting Different LANs
Many technical issues to connect LANs using different protocols at the
data link layer
• Frame format – each LAN type has its own frame format
• Maximum data size – no protocol in the data link layer allows
fragmentation and reassembly of frames
• Data rate – the bridge must buffer the frame to compensate for the
difference in data rates
• Bit order – some send MSB first in a byte, others send LSB first
• Security - sometimes bridges may have to decrypt the frames before
forwarding it to LANs not using encryption methods
• Multimedia support and QoS – some LANs support
15-17
Two-Layer (Layer 2) Switch
• Layer 2 switch is an N-port bridge
• Ethernet switch or LAN switch
• Switched Ethernet (←)
• Full-duplex switched Ethernet (↓)
15-18
Two-Layer and Three-Layer Switch
• Two-Layer Switch : bridge with many ports
– Filtering based on the MAC address of the frame it received
– Builds switching table by “learning” host addresses from source addresses
of incoming packets
– Unknown destination addresses are flooded out other ports
– Broadcast frames are flooded out other ports
• Router
– Three-layer device that routes packets based on their logical (network
layer) address.
– Builds routing table by neighbor routers using routing protocols
– Unknown IP packets are discarded
– Broadcast frames are discarded
• Three-Layer Switch : a router, but a faster and more sophisticated
– Router and three-layer switch interchangeably
• Gateway: computer that operates in all five layers
– Can provide security
– Can connect between two different models 15-19
Backbone Network: Bus Backbone
• The topology of the backbone is a bus
• To connect different buildings in an organization
• If a station in a LAN needs to send a frame to another station in the same LAN,
the corresponding bridge block the frame from reaching the backbone
• Each bridge connected to the backbone has a table showing the stations in the
LAN side of the bridge
15-20
Star Backbone
• Collapsed or switched backbone
• The topology of the backbone is a star; the backbone is just one switch
• Mostly used as a distribution backbone inside a building
15-21
Connecting Remote LANs
• When a company has several offices with LANs
• Remote bridges
• A point-to-point link acts as a LAN in a remote backbone connected by remote
bridges
15-22
Virtual LANs
• LAN configured by software, not by physical wiring
• VLANs create broadcast domains
15-23
Example
• Membership is characterized by port numbers, MAC addresses, IP addresses,
multicast IP addresses or a combination of the above
15-24
VLAN
• Membership
– Membership is characterized by port numbers, MAC addresses, IP addresses,
Multicast IP addresses, or a combination of the above
• Configuration
– VLAN can be configured in one of three ways: manual, semiautomatic, and
automatic
• Communication between switches
– Each switch must know not only which station belongs to which VLAN, but also
the membership of stations connected to other switches
– Three methods are devised: table maintenance, frame tagging, and TDM
• Advantages of VLAN
– Cost and time reduction
– Creating virtual workgroups
– Security
15-25
Network Layer: Logical Addressing
1) IPv4 Addresses
2) IPv6 Addresses
IPv4 Addresses
15-27
Example 1
• We replace each group of 8 bits with its equivalent decimal number and
add dots for separation:
• a. 129.11.11.239
• b. 249.155.251.15
15-28
Example 2
15-29
Example 3
15-30
Classful addressing
15-31
Finding the address class
15-32
Classful Addressing: Example
• Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
15-33
Classes and Blocks
15-35
Mask: Default Mask
15-36
Subnetting
• Divide a large block of addresses into several contiguous groups and assign each
group to smaller networks called subnets
• Increase the number of 1s in the mask
•Supernetting
• Combine several class C blocks to create a larger range of addresses
• Decrease the number of 1s in the mask (/24 /22 for C addresses)
15-37
Classless addressing
• Classful addressing has created many problems
• Many ISPs and service users need more addresses
• Idea is to have variable-length blocks that belong to no class
• Three restrictions on classless address blocks;
– The addresses in a block must be contiguous, one after another
– The number of addresses in a block must be a power of 2
– The first address must be evenly divisible by the number of addresses
15-38
Mask and Address Blocks
• Example: 205.16.37.39/28
– The binary representation is 1100110 00010000 00100101 00100111
– If we set 32 − 28 rightmost bits to 0, we get 11001101 00010000 00100101 00100000
205.16.37.32 (First address)
– If we set 32 − 28 rightmost bits to 1, we get 11001101 00010000 00100101 00101111
205.16.37.47 (Last address)
– The value of n is 28, which means that number of addresses is 2 32−28 or 16
15-39
Another way to find first address, last address and
the number of address
• The mask for /28 can be represented as 11111111 11111111 11111111 11110000 (28
- 1’s and 4 - 0’s)
• The first address can be found by ANDing the given addresses with the mask
– Address: 11001101 00010000 00100101 00100111
– Mask: 11111111 11111111 11111111 11110000
– First address: 11001101 00010000 00100101 00100000
• The last address can be found by ORing the given address with the complement of th
e mask
– Address: 11001101 00010000 00100101 00100111
– Mask complement: 00000000 00000000 00000000 00001111
– Last address: 11001101 00010000 00100101 00101111
• The number of addresses can be found by complementing the mask, interpreting it as
a decimal number and adding 1 to it
– Mask complement: 00000000 00000000 00000000 00001111
– Number of addresses: 15+1=16
15-40
Network Address
• The first address in a block is normally not assigned to any device; it is used as the
network address that represents the organization to the rest of the world
15-41
Hierarchy
15-42
Two-Level Hierarchy: No Subnetting
• The prefix is common to all addresses in the network; the suffix changes
from one device to other
15-43
Three-Levels of Hierarchy: Subnetting
15-44
Three-Levels of Hierarchy: Subnetting [2]
• For three levels of hierarchy the number of subnet bits can vary
• For subnet 1 only one bit is used as subnet prefix
• For subnet 2 and 3, two bits are used
•The address allocation is done by a global authority called Internet Corporation for
Assigned Names and Addresses (ICANN) 15-46
•Address Allocation and Distribution: Example
15-47
•Solution
•Group 1
•For this group, each customer needs 256
addresses. This means the suffix length is
8 (28 = 256). The prefix length is then 32 -
8 = 24.
•01: 190.100.0.0/24 190.100.0.255/24
•02: 190.100.1.0/24 190.100.1.255/24
•…………………………………..
•64: 190.100.63.0/24190.100.63.255/24
•Total = 64 256 = 16,384 15-48
•Solution (Continued)
•Group 2
•For this group, each customer needs 128 addres
ses. This means the suffix length is 7 (27 = 128).
The prefix length is then 32 - 7 = 25. The addre
sses are:
•001: 190.100.64.0/25 190.100.64.127/25
•002: 190.100.64.128/25 190.100.64.255/25
•003: 190.100.127.128/25 190.100.127.255/25
•Total = 128 128 = 16,384
15-49
•Solution (Continued)
•Group 3
•For this group, each customer needs 64 address
es. This means the suffix length is 6 (26 = 64). T
he prefix length is then 32 - 6 = 26.
•001:190.100.128.0/26 190.100.128.63/26
•002:190.100.128.64/26 190.100.128.127/26
•…………………………
•128:190.100.159.192/26 190.100.159.255/26
•Total = 128 64 = 8,192
15-50
•Solution (Continued)
15-51
15-52
Network Address Translation: NAT
• NAT enables a user to have a large set of addresses internally and one
address, or a small set of addresses, externally.
Range Total
10.0.0.0 to
224 • Addresses for private
10.255.255.255
networks
172.16.0.0 to
220
172.31.255.255
192.168.0.0 to
216
192.168.255.255
19-53
Addresses Translation
• Address translation for source address of outgoing packet and for destination
address of incoming packet
15-54
Translation Table
• Using (1) one IP address, (2) a pool of IP address, and (3) both IP addresses and
port numbers
15-55
Five-Column Translation Table
19-56
IPv6 Addresses
• Despite all short-term solutions, such as classless addressing, DHCP (Dynamic
Host Configuration Protocol), and NAT, still address-hungry
• An IPv6 address is 128 bits long
• Hexadecimal colon notation:
• Abbreviation:
15-57
IPv6 Address Space
15-58
IPv6 Addresses
• Unicast addresses: define a single computer
– Two types: geographically based and provider-based
– Prefixes for provider-based unicast address
– Type id (3 bits), Registry id (5 bits)
• Multicast addresses:
• define a group of hosts
15-59
IPv6 Addresses
• Anycast addresses: define a group of nodes
– Unlike multicast, a packet is delivered to only one of the members of the anycast group,
the nearest
• Reserved addresses:
• Local addresses:
private networks
15-60