The Wayback Machine - https://web.archive.org/web/20241012113716/https://www.geeksforgeeks.org/switch-port-analyzer-span/
Open In App

Switch Port Analyzer (SPAN)

Last Updated : 11 Aug, 2020
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Switch Port Analyzer (SPAN) is switch specific tool that copies Ethernet frames passing through switch ports and send these frames out to specific port. Switch itself doesn’t analyze these copied frames, it send frames out of specific port to network analyzer. A Network analyzer may be purpose build hardware appliance or an application running on the host. The analysis of these frames are done to troubleshoot network. Sometimes frame analysis is also done to dig out contents of frame to find any malicious content hidden inside the frame.

Infact, you can also install network analyzer on your PC (eg. Wireshark network analyzer) and start analyzing Ethernet frames and 802.11 frames out of Ethernet NIC and wireless NIC respectively.

Working of Span :
Consider the figure given below containing switch, server, PC and network analyzer. Until the configuration of SPAN on switch, the frames flow normally from PC to server and vice-versa. But after the configuration of SPAN on switch, switch starts making copies of frames passing through its ports and send them to network analyzer.


Figure – Frame copying and forwarding in SPAN


Switch copies frames after transfer of frames out of port and then send it to network analyzer. The rule of “from which ports to copy frames and where to send copied frames” is defined in SPAN session. You can define many SPAN sessions on switch.

There may be more than one source ports but only one destination port in SPAN session. Port from where frames are copied is called Source port and Port out of which copied frames are send is called Destination port. SPAN session can be defined on ports for traffic flowing in both directions or in single direction. A span session can be defined on VLANs also, switch will then copies frames from all ports in that vlan. But you cannot define session containing both ports and vlans. A span session must contain either ports only or vlans only.

Remote SPAN and Encapsulated Remote SPAN :
Consider situation, what if destination port is not present on switch where span is configured. Cisco provides two solution for this problem, RSPAN and ERSPAN.

RSPAN uses vlan to encapsulate frames in 802.1Q frame header (header defining belonging of frame to specific vlan) and send it over the network. ERSPAN is applicable on Layer 3 switches, it encapsulates the span traffic in GRE tunnel and forwards the traffic to network.

Some Important Rules Regarding SPAN :

  • One SPAN session contains only one destination port.
  • No two SPAN sessions have same destination port.
  • Destination port can’t be used as source port.
  • Destination port doesn’t act normally, It no longer learn MAC-addresses.
  • A SPAN session may contain multiple source ports.
  • A SPAN session can not mix ports and vlans.


Similar Reads

Difference between Root Port and Designated Port
Root Port and Designated Port are very important concepts in network switching, along with the Spanning Tree Protocol, which would have been like a runaway train causing loops and not allowing for effective data flow. Root Port is that one port on a switch that takes the shortest path toward the Root Bridge, whereas Designated Port controls which i
5 min read
Difference Between Trunk Port and Access Port
When it comes to networking, two terms that are “access port” and “trunk port" arises in our mind. They both sound familiar but both of these types have different functions. While commonly associated with Cisco, access ports and trunk ports are standard networking concepts utilized across various network equipment vendors. Access Port is a port tha
4 min read
Configuring Port Security on Cisco IOS Switch
Overview :Switch is a network device, which is configured to connect and maintain communication channel between various devices. Ethernet ports are present on a switch, which are used to connect devices, such as Router, computer system and Laptop in the network. To connect all these network, Ethernet cables are used. MAC address of these connected
4 min read
What is a Switch Port?
A network switch is a piece of hardware that allows computers to communicate with one another. It accepts physical connectors from computers and other network devices and then uses packet switching to receive and forward data. Connecting different devices to the ports on a network switch allows them to communicate with one another via data transfer
2 min read
Difference between LAN Switch and SAN Switch
Nowadays, a lot of organizations have started to build their own network storage system to fulfill the ever-lasting demands of data storage performance. Local Area Network (LAN) and Storage Area Network (SAN) are the most used storage network system. LAN is a set of computers and peripheral devices that share a common communications link or wireles
5 min read
Port Security in Computer Network
Attackers' task is comparatively very easy when they can enter the network they want to attack. Ethernet LANs are very much vulnerable to attack as the switch ports are open to use by default. Various attacks such as Dos attack at layer 2, address spoofing can take place. If the administrator has control over the network then obviously the network
3 min read
Type-C Port in Computer Network
Type-C (or USB-C) is a 24-pin USB connector system. This is distinguished by its two-fold rotationally symmetrical connector. The USB Type-C Specification 1.0 was published by the USB Implementers Forum (USB-IF). It was finalized in August 2014. A device that implements USB-C does not necessarily implement USB Power Delivery, USB 3.1, or Alternate
4 min read
Port Address Translation (PAT) on Adaptive Security Appliance (ASA)
Port Address Translation (PAT) is a type of Network address translation (NAT) used when there is a shortage of public IP addresses .One of the public IP address of the same subnet or the interface address is used for translation. Port Address Translation (PAT): This is also known as NAT overload. In this, many local (private) IP addresses get trans
5 min read
SSH Port Forwarding
SSH Port forwarding is a method used for securing TCP/IP connections. The TCP/IP packets can be tunneled through a SSH link making the data obscure thus protecting the link from attacks. SSH Port forwarding can be also seen as a form of Virtual Private Network(VPN). Types of Port Forwarding: There are 2 main types of port forwarding: Local Port For
2 min read
Port Address Translation (PAT) mapping to Private IPs
In this article we will be learning how exactly a Home network works. In the beginning we should keep in mind that when we connect our Laptops, Smart Phones Tablets etc to the home network all get a IP address. This IP address which is assigned to these devices is not public IP address rather they are private IP address. This home network is a Loca
4 min read
Port Forwarding on Router and Why do we need It
Router port forwarding is used to allow the remote computers to connect to a specific service or computer on a Local Area Network. Now the question is why do we need it. And we will discuss all of these things one by one. Use Cases : Suppose you are at the office and want to connect to your computer which is present in your house, the computer pres
4 min read
How Spanning Tree Protocol (STP) Select Designated Port?
Spanning tree protocol is a type of communication protocol that functions to build a loop-free topology, which means the arrangement of elements in a computer network. STP commonly works for layer-2 bridges and switches. It also provides a backup link for the network system if the active link fails. Layer-2 devices send the data in the form of fram
3 min read
What is a Designated Port?
The switch with the best path to the root switch is set to forwarding. That switch is referred to as the designated switch, and its port is referred to as the designated port. A designated port is a port that can have the lowest path cost on a Local Area Network(LAN) segment. Each segment has a port called a single port that is used to reach the ro
3 min read
Spanning Tree Port States
Spanning tree protocol prevent looping of frames around LAN by placing ports of switch in different states based on the criteria such as selection of root switch, switch's root cost, etc. There are five Spanning Tree Port States : 1. Blocking State : Switch port enters the blocking state at time of election process, when a switch receives a BPDU on
3 min read
Designing a Serial port configuration using cisco packet tracer
This article concerns the step-by-step designing of serial port configuration in cisco packet tracer using serial interfaces se0/0/0 or se0/0/1. In the end, it will also discuss how to check the network connectivity by transferring PDU’s between remote PCs. Objectives:To Configure serial port in cisco packet tracer using 2 routers and 2 PCs.Simulat
3 min read
What is Port Blocking within LAN ?
Port Blocking is the action performed by an Internet Service Provider (ISP) to identify and block the Internet traffic by using the Port Number and Transfer Protocol. Port Blocking within LAN refers to restricting the users from accessing a set of Services within the local area network. This may include blocking physical ports like USB, removable d
3 min read
How to Add Port in Router in CISCO Packet Tracer?
Cisco Packet Tracer is a tool built by Cisco and it provides network simulation to practice simple and complex networks. The main purpose of the Cisco Packet Tracer is to help students learn the principles of networking and demonstrate the networking concepts. Router is a networking device that works in the network layer and can connect two differe
2 min read
Advanced NAT Techniques: Port Address Translation (PAT)
Network Address Translation (NAT) is a networking technique used in routers to modify network address information in packet headers while in transit, Its main purpose is to enable the conservation of public IP addresses and facilitate communication between devices in private or local networks and the public Internet. now a days NAT is commonly impl
6 min read
What is Network Port?
In today's technological age, data stands out as a crucial asset, and to make regular advancements, we need to share data among ourselves. We can share data in two ways either using wired connections or the internet. In wired connections, we use connectors called physical ports for the transfer of data, power, and signals from one device to another
8 min read
How To Find Your Port Number ?
Answer: We can find port number using command line Tool, and using resource monitor.Methods For Find the Port Numbers On Your Device1. Using Command Line Tool like Netstat'Netstat' stands for Network Statistics and displays our computer's current network connection and port activation. Below are the steps: Open Command Prompt: On a Windows machine,
2 min read
Difference Between IP Address and Port Number
In computer networking, two fundamental concepts are crucial for understanding how devices communicate over a network. IP addresses and port numbers are the characteristic features of TCP/IP and their definition is as follows. An IP address is a unique address assigned to each machine that is connected to a network to locate the machines and commun
4 min read
Difference Between SSH Local and Remote Port Forwarding
SSH stands for "Secure Shell" or "Secure Socket Shell". It is a cryptographic network protocol that allows two computers to communicate and share the data over on insecure network such as the Internet. SSH protocols protect the network from various attacks. Local Port ForwardingLocal Port Forwarding is the common type of port forwarding. It is used
6 min read
Difference Between Network Address Translation (NAT) and Port Address Translation (PAT)
In the world of networking, most of the uses of IP addresses are important due to the limited availability of IPv4 addresses which is a part of network address translation. Two technologies that have been developed to address this problem are Network Address Translation and Port Address Translation. These technologies not only help to keep IP addre
6 min read
Can TCP and UDP sockets use the same port?
Answer: Yes, both TCP and UDP can use the same port number on the system simultaneously as they are distinct protocols. The transport layer of the TCP/IP stack differentiates between the TCP and UDP traffic allowing both to coexist on the same port number without conflict. However, they will not interfere with the each other because they handle com
3 min read
Inter VLAN Routing by Layer 3 Switch
Prerequisite - Access and trunk ports Normally, Routers are used to divide the broadcast domain and switches (at layer 2) Operate in a single broadcast domain but Switches can also divide the broadcast domain by using the concept of VLAN (Virtual LAN). VLAN is the logical grouping of devices in the same or different broadcast domains. By default, a
5 min read
Inter-Switch Link (ISL) and IEEE 802.1Q
VLANs are used to divide broadcast domain at layer 2. By default, all the switch ports are in VLAN 1. Configuration of VLANs other than VLAN 1 then to carry traffic of these VLANs, user has to make a switch port trunk which is connected to another switch. If the frame is forwarded out to an access link then it is considered that the frame belongs t
4 min read
Switch functions at layer 2
Prerequisite - Switch The switch is a layer 2 device that works on the basis of the MAC address (physical address) of a device. Switch mainly performs these functions: Learning - The switch learns the MAC address of the device on the switch port on which it receives the frame.Forwarding - The switch does 2 types of message forwarding: (a) Unicast:
4 min read
How to Create and Delete VLAN on Cisco Catalyst Switch?
Virtual Local Area Networks (VLANs) are used in computer networks to divide a physical network into many logical networks, enhancing security, flexibility, and scalability. This article will walk you through the steps of adding and removing VLANs from a Cisco Catalyst Switch. Steps To Create and Delete VLAN on Cisco Catalyst Switch Step 1: Open the
4 min read
What is ISL(Inter-Switch Link)?
ISL stands for Inter-Switch Link which is one of the VLAN protocols. The ISL is proprietary of Cisco and is used only between Cisco switches. It operates in a point-to-point VLAN environment and supports up to 1000 VLANs and can be used over Fast Ethernet and Gigabit Ethernet links only. Applications: ISL is used in Cisco switches for VLAN switchin
4 min read
Cisco Switch Configuration basic commands
Prerequisite - Switch Functions A switch is a layer 2 device used to forward packet from one device to another within the network. It forwards the packet through one of its ports on the basis of destination MAC address and the entry in the MAC table. Following basic commands are used to configure a new switch : 1. Changing the hostname of a switch
2 min read
Article Tags :