Switching: Difference between revisions

From Network Security Wiki
 
m (1 revision imported)
(No difference)

Revision as of 17:38, 14 August 2016


Basics

STP

  • STP Port States:
    • Blocking - A port that would cause a switching loop if it were active. No user data is sent or received over a blocking port, but it may go into forwarding mode if the other links in use fail and the spanning tree algorithm determines the port may transition to the forwarding state. BPDU data is still received in blocking state. Prevents the use of looped paths.
    • Listening - The switch processes BPDUs and awaits possible new information that would cause it to return to the blocking state. It does not populate the MAC address table and it does not forward frames.
    • Learning - While the port does not yet forward frames it does learn source addresses from frames received and adds them to the filtering database (switching database). It populates the MAC Address table, but does not forward frames.
    • Forwarding - A port receiving and sending data, normal operation. STP still monitors incoming BPDUs that would indicate it should return to the blocking state to prevent a loop.
    • Disabled - Not strictly part of STP, a network administrator can manually disable a port


  • RSTP Port Roles:
    • Root - A forwarding port that is the best port from non-root bridge to root bridge
    • Designated - A forwarding port for every LAN segment
    • Alternate - An alternate path to the root bridge. This path is different from using the root port
    • Backup - A backup/redundant path to a segment where another bridge port already connects
    • Disabled - Not strictly part of STP, a network administrator can manually disable a port


  • RSTP Port States:
    • Disabled - Interface is administratively shut down or disabled.
    • Discarding - No user data is sent over the port
    • Learning - The port is not forwarding frames yet, but is populating its MAC-address-table
    • Forwarding - The port is fully operational


  • STP Enhancements:
        This section is under construction.
  • PortFast -
  • UplinkFast -
  • BackboneFast -
  • STP Types:
        This section is under construction.


  • What is Etherchannel? What are the protocols used?
        This section is under construction.
  • What is behaviour of STP in Etherchannel?
        This section is under construction.

Root Bridge Election

Source: firewall.cx

        This section is under construction.

Native VLAN

        This section is incomplete and may be incorrect.
  • The VLAN that untagged traffic received on a trunk port will be forwarded to.
  • Assume that trunk port carrying VLANs 10, 11, and 12.
  • VLAN 10 is set as the native VLAN.
  • Any frame received on that port with an explicit tag will go into the corresponding VLAN.
  • Any frame that has no tag will be put into VLAN 10 since that's defined as the native VLAN.
  • This is used in case you are connecting a PC via IP Phone to a Switch.

ARP vs MAC Table

ARP Table MAC Table (or CAM Table)
IP to MAC resolution MAC to Port binding
Needed to forward L3 packets Used to Switch frames
Kept by L3 devices Kept only by L2 devices
No entry for dest IP's MAC address, machine will send ARP request If no entry, switch will flood the frame
Default timeout is 4 hours Default timeout is 5 minutes
Filled by each ARP reply Filled by source MAC of each frame passing through switch
  • A switch with Management VLAN assigned with IP address will have a ARP Table.
  • Router with a Switching module will have a MAC Table.

Unicast Flooding

  • Flooding occurs when the switch do not have destination mac-address in MAC Table
– not learnt that mac address
- entry expired & got flushed away
  • To ensure the frame reaches its intended destination, the switch will replicate that frame out of all ports, less the port where the frame was received.
  • By default, each mac-address table entry has a timeout timer of 5 minutes
  • This timer gets reset as relevant frames keep coming into the relevant port



{{#widget:DISQUS |id=networkm |uniqid=Switching |url=https://aman.awiki.org/wiki/Switching }}