0% found this document useful (0 votes)
37 views38 pages

Advanced Computer Networking

Advanced computer networking notes for bits pilani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views38 pages

Advanced Computer Networking

Advanced computer networking notes for bits pilani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Advanced Computer

Networks
Dr. P S RAO
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Contact Session 4
ROUTING & SWITCHING
IMP Note to Self

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


IMP Note to Students
 It is important to know that just login to the session does not guarantee the
attendance.
 Once you join the session, continue till the end to consider you as present in
the class.
 IMPORTANTLY, you need to make the class more interactive by responding
to Professors queries in the session.
 Whenever Professor calls your number / name ,you need to respond,
otherwise it will be considered as ABSENT

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


M3. # [M.Tech (Computing Systems & Infrastructure] ROUTING & SWITCHING

Pre-CH/ RL 3.2  Routing and switching Instructor Supplied Material


CS
During CS 4, 5  VLAN basics
CS  Routing between VLANs,
Trunking
 Tunneling (802.1Q, Q-in-Q)
 VLAN translation

Post- HW/Lab  Lab Capsule - VLAN


CH/CS

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Introduction to Routers and Routing
 A switch “switches” and a router “routes,” but what does this
exactly mean?
• when an Ethernet frame enters one of its interfaces where it
should send this Ethernet frame by looking at the destination
MAC address. Switches make decisions based on Data Link
layer information (layer 2).
• Routers have a similar task but, they look at the destination IP
address in an IP packet and send it out to the correct
interface. (Works at layer 3)
Switch Vs Router
 Why don’t we use MAC addresses everywhere and switch? Why do we
need to look at IP addresses and route them? Both MAC addresses and IP
addresses are unique per network device.

 We have two switches and to each switch are 200 computers connected.
Now, if all 400 computers want to communicate with each switch, has to
learn 400 MAC addresses. They need to know the MAC addresses of the
computers on the left and right sides. 7

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Switch Vs Router

 There are millions of devices! Would it be possible to have millions of


entries in your MAC-address table? For each device on the Internet? No
way! The problem with switching is that it’s not scalable; we don’t have any
hierarchy, just flat 48-bit MAC addresses.

 Instead of having a MAC address table with 400 MAC addresses we now
only need a single entry on each router for each other’s networks.
Switches use mac address tables to forward Ethernet frames, and
routers use a routing table to learn where to forward IP packets to. 8

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Routing Table

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Switch functions

Switches also:
• Process the Cyclical Redundancy Check (CRC)
• Filter out traffic that should not be forwarded, such as local unicast frames
• Prevent the forwarding of collisions
• Prevent the forwarding of frames with errors

Switches provide a collection of features that are part of most medium


and large networks:
• Virtual local area networks (VLANs)
• Simple network management protocol (SNMP)
• Remote management
• Statistics collection
• Port mirroring
• Security such as 802.1X port-based authentication
10

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Router Functions

• Just as a switch connects multiple devices to create a


network, a router connects multiple switches, and their
respective networks, to form an even larger network.
• These networks may be in a single location or across
multiple locations.
• When building a small business network, you will need
one or more routers.
• In addition to connecting multiple networks together, the
router also allows networked devices and multiple users
to access the Internet.

11

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


 There are three types of routing:
• static
• default
• dynamic
Static routing
• The network administrator manually uses static tables to
configure and select network routes.
• These routes are permanent and will not change until
manually configured.
• Static routing is useful when the network design or
parameters are expected to remain constant.
• However, the static nature of this routing technique can lead
to network congestion, decreased adaptability, and limited
network performance.
Default routing
• The router is configured to send all packets to a single router,
regardless of which network the packet belongs to.
• This is generally used with stub routers.
Dynamic routing

• It automatically adjusts routes based on the current state of the


route in the routing table.
• Dynamic routing uses protocols to discover network destinations
and the routes to reach them.
• The administrator configures a routing protocol on the router,
which automatically adds and manages the routing information in
the routing table.
• If any change occurs in the network, the routing protocol
automatically updates the related information in the routing table.
• Dynamic routing is a good option if the network size is large.
Types of Routing Algorithm
Basic concepts and fundamental of VLANs
 A LAN is a group of devices connected to a single Ethernet
network.
 A broadcast message is a message that reaches all devices
in the network.
 Devices use broadcast messages to perform many essential
tasks.
 The more devices you add to a network, the more broadcast
messages it will have.
 Broadcast messages reduce network performance.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Basic concepts and fundamental of VLANs
(Contd..)
 To improve network performance, administrators break the
LAN network into smaller LANs.
 When you break a large LAN into smaller LANs, you create
VLANs.
 VLANs are smaller LANs.
 VLANs create a boundary for broadcast messages.
 A broadcast message generated in a VLAN reaches all
devices inside the VLAN.
 It does not go outside the VLAN.
 If two devices belong to different VLANs, they do not
exchange broadcast messages.

18

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


VLAN

19

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


VLAN

• A switch will never allow traffic to cross a VLAN boundary.


• Assigning different ports to different VLANs allows you to re-use a single physical
switch for multiple purposes.
• This is the first major function of a VLAN.
• Each virtual switch, or VLAN, is simply a number assigned to each switch port.
• Any switch port which is not explicitly assigned a VLAN number, resides in
the default VLAN. Which for most vendors corresponds to VLAN 1.
20
• A switch will never allow traffic to cross a VLAN boundary
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
• A Switch which supports VLANs will also include the VLAN # for each entry of the MAC
Address Table.
• A simple representation of a single entry in a MAC address table of a VLAN aware switch
would be:
VLAN# | MAC Address | Port.
• Each VLAN maintains their own independent MAC address table.
• A single VLAN can span across multiple rooms, floors, or office buildings.

21

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Function of a VLAN

 VLANs allow you to extend the smaller Virtual switches across


multiple Physical switches.

 The primary benefit of extending a VLAN to different physical switches is that


the Layer 2 topology no longer has to be tied to the Physical Topology.
 A single VLAN can span across multiple rooms, floors, or office buildings.
22

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


• Each connected switch port in the topology is a member
of only a single VLAN.
• This is referred to as an Access port.
• An Access port is a switch port that is a member
of only one VLAN.
• Whenever the switch receives any traffic on an Access
port, it accepts the traffic onto the configured VLAN.
• Whenever the switch receives any traffic on an Access
port, it accepts the traffic onto the configured VLAN.

23

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Trunking
 In order to extend a VLAN to the second switch, a connection is made
between one Access port on both switches for each VLAN. While functional, this
strategy does not scale. Imagine if our topology was using ten VLANs, on a 24 port
switch nearly half of the ports would be taken up by the inter-switch links.
Instead, there is a mechanism which allows a
single switch port to carry traffic from multiple
VLANs. This is referred to as a Trunk port. A
Trunk port is a switch port that carries traffic
for multiple VLANs.

 Typically, switch ports connected to end-host


devices are configured as Access ports (e.g.,
workstations, printers, servers).
Conversely, switch ports connected to other
network devices are configured as Trunk
ports (e.g., other switches, routers).
24

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Trunking (Contd..)

 whenever a Switch is sending frames out a Trunk port, it adds


to each frame a tag to indicate to the other end what VLAN that
frame belongs to. This allows the receiving switch to read the
VLAN tag in order to determine what VLAN the incoming traffic
should be associated to.

25

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


802.1Q Tunneling (Q-in-Q) Configuration
• IEEE 802.1Q, often referred to as Dot1q, is the
networking standard that supports virtual local area
networking (VLANs) on an IEEE 802.3 Ethernet network.
• The standard defines a system of VLAN tagging for
Ethernet frames and the accompanying procedures to be
used by bridges and switches in handling such frames.
• The minimum size of a QinQ packet is 1508 bytes, which
comprises two four-byte VLAN tags and one 1500-byte
standard Ethernet frame.

26

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


802.1Q Tunneling (Q-in-Q) Configuration

• Two routers called R1 and R2,


are the customer sites that we
want to connect through the
service provider network
• service provider network
consists of SW1, SW2, and SW3.
• Our customer wants to use
VLAN 12 between the two sites
and expects our service provider
to transport this from one site to 27

another. BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
802.1Q Tunneling (Q-in-Q) Configuration

• Every frames from Customer is tagged with the SP allocated VLAN tag for customer.
• So, every frames from customer will have two VLAN tag in the SP Networks.
• The inner tag is the customers real VLAN tag, and the outer tag is the SP VLAN Tag
allocated to the customer.
• In the SP Edge Switch that facing to the Site B, the outer VLAN tag is stripped, and
the frames is forwarded to the Customer Site B switch.

28

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


802.1Q Tunneling (Q-in-Q) Configuration (Contd..)

29

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


VLAN translation
• In the different locations of the customer, the same VLAN tag means the
same.
• But there is a service provider network between the customer locations.
Customers and the service provider use different VLAN tags in their networks.
• So, here there must be VLAN mapping or in other words VLAN translation
must be done in the edge of the network.

30

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Question #1:
If Host A sends a frame to Host B, will Host
B receive it?

31

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Answer
• Yes, Host B will receive the frame that Host A sends.
• To understand why, you will need to have a solid understanding of when a Switch
sends a frame tagged or untagged, and what a switch does when it receives a
frame that is tagged or untagged.

• It starts with Host A sending the frame untagged since hosts do not understand
VLAN tags, nor do they know what VLAN is configured on the switch port they are
connected to.

• Switch T receives the untagged frame on an Access Port in VLAN #3. Switch T
therefore considers the frame to be in VLAN #3. The port below Switch T is a
Trunk port, which means all traffic leaving the port must have a VLAN tag. Except
for traffic on the Native VLAN, which in this case is VLAN #7 – not the VLAN that
our frame is on. Therefore, the frame leaves Switch T tagged for VLAN #3.

32

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Answer (Contd..)
• Switch V receives the tagged frame and reads the tag to determine the
frame belongs to VLAN #3. Switch V then forwards the frame untagged out
the Access Port in VLAN #3 — all traffic leaving an Access port is untagged.
• Switch X receives the untagged frame on an Access Port in VLAN #4. Since
there is no tag, Switch X associates the frame to VLAN #4. Switch X then
forwards the frame out the Trunk port, but since this Trunk port has a Native
VLAN of VLAN #4, the frame is sent untagged.
• Switch Y receives the untagged frame on an Access Port in VLAN #6.
Switch Y now considers the frame to be in VLAN #6. Switch Y then forwards
the frame out a Trunk port, but since this Trunk port has a Native VLAN of
VLAN #6, the frame is sent untagged.
• Switch Z receives the untagged frame on an Access Port in VLAN #9.
Switch Z now considers the frame to be in VLAN #9. Switch Z then forwards
the frame out an Access port – which is always sent untagged.
• Host B then finally, successfully, receives the untagged frame.

33

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Question #2:
If Host A sends a Broadcast, which hosts
will receive it?

34

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Answer
• The following hosts will receive a broadcast frame sent from Host A:
• C, F, H, I, B

• Note: Host J and Host K also receive the broadcast, but when they receive the frame, it will include a
VLAN tag. Some hosts are able to receive frames with VLAN tags, and some hosts are not — it
depends on whether the host understands 802.1q VLAN tags.

• To explain this answer, you must first fully understand Question #1 and its answer. Once you have
fully grasped why a frame from Host A is able to get to Host B, you can then try to understand
Question #2 and the explanation below.

• The key is to determine what VLAN# each switch will consider the broadcast frame to be a part of.
From there, you can easily determine whether the hosts to the left or right will receive the frame. We
already know from Question #1 that what is sent by Host A will make its way through each switch in
the topology, so all there is to consider is whether the other hosts will receive it.

• Again, it starts with Host A sending the frame untagged to Switch T.

• Switch T considers the frame in VLAN #3. Therefore, it does forward the broadcast out the Access
port in VLAN #3, and does NOT forward the frame out the Access port in
35

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Answer (Contd..)
• VLAN #2. Host C receives it, Host D does not.

• Switch V considers the frame in VLAN #3. Therefore, it does NOT forward the broadcast out the Access port in
VLAN #5, and does forward the broadcast out the Access port in VLAN #3. Host E does not receive the frame,
Host F does.

• Switch X considers the frame in VLAN #4. Therefore, it does NOT forward the broadcast out the Access port in
VLAN #3, and does forward the broadcast out the Access port in VLAN #4. Host G does not receive the frame,
Host H does.

• Switch Y considers the frame in VLAN #6. It does forward the frame out both Trunk ports. However, if the Trunk
port is configured with a Native VLAN that matches the frame, then the frame is sent untagged. Therefore, when
Host I receives the frame, it receives the frame without a VLAN tag and is able to understand the L2 header.
When Host J receives the frame, it includes a VLAN tag. Host I is able to receive and process the frame as
normal, but Host J is only able to receive the frame if Host J supports 802.1q VLAN tags.

• Switch Z considers the frame in VLAN #9. It does forward the frame out the Trunk port with Native VLAN #8, but
it does so with a VLAN Tag. Host K can only process the frame if Host K understands 802.1q VLAN tags. Switch
Z does NOT forward the frame out the Access Port in VLAN #3, therefore Host L never receives the broadcast
frame.

• Finally, since we’ve already answered the first question, we know Host B will receive a frame that Host A sends.

36

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


VLAN Range

37

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Disadvantages of VLANs

 VLANs help control broadcast traffic, tighten security,


ease administration and improve performance. But they
have some disadvantages, too
• Limit of 4,096 VLANs per switching domain
• Managing spanning tree structures
• VLAN identification with wall jacks and APs
• poor planning- which makes the overall VLAN plan
overly complicated, brittle and difficult to maintain as
needs and underlying network equipment change.

38

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

You might also like