Unit4 1 2019-20

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

Connecting LANs, Backbone Networks,

and Virtual LANs

• Connecting devices
• Backbone networks
• Virtual LANs
Five Categories of Connecting Devices

• Below the physical layer: passive hub


• At the physical layer: repeater or active hub
• At the physical and data link layers: bridge or two-layer switch
• At the physical, data link, network layers: router or three-layer switch
• At all five layers: gateway

15-2
Passive Hubs

• Passive Hub is just a connector


• Connects wires coming from different branches

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

1. Select the root bridge


• The one with the smallest built-in ID
2. Select the root port of each bridge
• The port with the least-cost path from the bridge to the root bridge
3. Choose a designated bridge for each LAN
• The bridge with the least-cost path from the LAN to the root bridge
• The corresponding port is the designated port
4. Mark the root port and designated port as forwarding port, others as
blocking port

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

• An IP address is a 32-bits long


• The IP addresses are unique and universal
• The address space of IPv4 is 232 or 4,294,967,296
• Binary notation: 01110101 10010101 00011101 00000010
• Dotted-decimal notation: 117.149.29.2

15-27
Example 1

• Change the following IP addresses from binary notation to dotted-decimal


notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111

• 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

• Change the following IP addresses from dotted-decimal notation to binary


notation.
a) 111.56.45.78
b) 221.34.7.82

• We replace each decimal number with its binary equivalent


a) 01101111 00111000 00101101 01001110
b) 11011101 00100010 00000111 01010010

15-29
Example 3

• Find the error if any in the following IPv4 addresses.


a) 111.56.045.78
b) 221.34.7.8.20
c) 75.45.301.14
d) 11100010.23.14.67

a) There must be no leading zeros


b) There can be no more than four numbers in an IPv4 address
c) Each number needs to be less than or equal to 255
d) A mixture of binary notation and dotted-decimal notation is not
allowed

15-30
Classful addressing

• In classful addressing, the address space is divided into five classes: A, B, C, D, E


• A new architecture, called classless addressing was introduced in the mid-1990s

15-31
Finding the address class

15-32
Classful Addressing: Example

• Find the class of each address.


a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111

• 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

• In classful addressing, a large part of the available addresses were wasted

•Flaw in the design


Class A: too large for almost any organization
Class B: is also too large for midsized organization
Class C: too small for many organizations
Class D: many addresses were wasted
Class E: few were used, resulting in the waste of addresses 15-34
Netid and Hostid

• IP address in classes A, B, and C is divided into netid and hostid

15-35
Mask: Default Mask

• The length of the netid and hostid is predetermined in classful addressing


• Default masking
• CIDR (Classless Interdomain Routing) notation or slash notation

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

• In IPv4 addressing, a block of addresses can be defined as x.y.z.t /n in which x.y.z.t


defines one of the addresses and the /n defines the mask.
• The first address in the block can be found by setting the rightmost 32 − n bits to 0s
• The last address in the block can be found by setting the rightmost 32 − n bits to 1s
• The number of addresses in the block can be found by using the formula 2 32−n

• 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

• IP addresses have levels of hierarchy


• Its like in the telephone network
– First three digits define the area code
– Next three digits define the exchange
– The last four digits define the connection of the local loop to the central office

15-42
Two-Level Hierarchy: No Subnetting

• Each address in the block can be considered as a two-level hierarchical


structure: the leftmost n bits (prefix) define the network; the rightmost 32 −
n bits define the host

• Prefix - The part of the address that defines the network


• Suffix - The part of the address that defines the host

• 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

• An organization that is granted a large block of addresses may want to create


clusters and divide the addresses between the different subnets.
• Each subnet must have its own mask
• Example:
• An organization is given the block 17.12.14.0/26, which contains 64 addresse
s. The organization has three offices and needs to divide the addresses into thr
ee subblocks of 32,16 and 16 addresses. The new masks can be found by
– Mask for the first subnet is n1, then 232-n1 must be 32, therefore n1 = 27
– Mask for the second subnet is n2, then 232-n2 must be 16, therefore n2 = 28
– Mask for the second subnet is n3, then 232-n3 must be 16, therefore n3 = 28

15-44
Three-Levels of Hierarchy: Subnetting [2]

•The subnet address can be found from one of the


addresses in the subnet 15-45
Three-Levels of Hierarchy: Subnetting [3]

• 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

More levels of hierarchy:


•The structure of classless addressing does not restrict the number of hierarchical
levels.

•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

•An ISP is granted a block of addresses starting


with 190.100.0.0/16. The ISP needs to distribut
e these addresses to three groups of customers
as follows:
1. The first group has 64 customers; each needs 256 addresses.
2. The second group has 128 customers; each needs 128 addresses.
3.The third group has 128 customers; each needs 64 addresses.

Design the subblocks and give the slash notatio


n for each subblock. Find out how many addres
ses are still available after these allocations.

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/24190.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)

•Number of granted addresses: 65,536


•Number of allocated addresses: 40,960
•Number of available addresses: 24,576

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

•ISP and NAT

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy