Switching Query

Discussion in 'Routing & Switching' started by kammodo, Oct 1, 2008.

  1. kammodo

    kammodo Nibble Poster

    56
    0
    33
    I am configuring a cisco switch at the moment. Its just a layer 2 switch, 2960. I have been told that it is good practice to configure a default gateway on the switch to route packets outside the network. The great mystery to me is, ip addresses are a layer 3 issue. How is the switch able to check the layer 3 destination address? Same goes for the management VLAN. Do layer 2 switches have limited layer 3 capabilites? Im sure Im missing something obvious here!
     
    Certifications: CCNA R+S, CCDA , CCNP r+s , CCDP
    WIP: CCIE
  2. r.h.lee

    r.h.lee Gigabyte Poster

    1,011
    52
    105
    kammodo,

    The purpose of the IP address that you can configure on a Cisco Catalyst 2960 switch is for management purposes for the management VLAN.

    No.

    In order to manage (think configure) the 2960 switch you can:
    1. Use a computer and console cable to physically manage the switch.
    2. Configure an IP address on the switch so that you can use either telnet or ssh to connect to the switch in order to manage it from another computer within the LAN.
    3. Configure an IP address and default gateway on the switch so you can manage it from a computer located across a WAN link from the managed switch.

    So in review, the IP address and default gateways are ONLY for management purposes only and NOT to give the Layer 2 switch "...limited layer 3 capabilities..." as you mentioned.

    Did I answer your questions and hopefully clarified the situation?
     
    Certifications: MCSE, MCP+I, MCP, CCNA, A+
    WIP: CCDA
  3. kammodo

    kammodo Nibble Poster

    56
    0
    33
    Sort of answers my question. If a switch has no layer 3 capability, then when you configure an IP address on it and the switch recieves a layer 3 IP addressed packet destined for the management VLAN then how does it know its for the switch? In order to check the destination packet and send a reply, in my understanding, would need limited Layer 3 processing capability.
     
    Certifications: CCNA R+S, CCDA , CCNP r+s , CCDP
    WIP: CCIE
  4. sunn

    sunn Gigabyte Poster

    1,562
    24
    79

    Think of the layer-2 switch like this, the functionatlity or purpose of the switch is Layer 2. Assuming the entire switch is one big vlan, it gets packets in one interface, and retransmits those packets through another (or multiple) interfaces.

    Now if the switch has management capabilities and you want to manage the switch remotely (you're in the UK and switch is in Australia) you can connect to it (SSH/Telnet). So it does have layer-3 capabilities for itself, just like a PC-workstation. But it doesn't offer layer-3 functionality for hosts connected to the device.

    So the default gateway if for itself when it needs to communicate (syslogs, return path for telnet session, etc...). This is for managing the device itself, it's not necessary.

    Does this help?
     
  5. r.h.lee

    r.h.lee Gigabyte Poster

    1,011
    52
    105
    kammodo,

    Imagine the following network topology...
    Code:
    
    [PC1]------[Switch]
    
    
    Let's say we have the following IP address assignments:
    1. PC1 = 192.168.1.1 255.255.255.0
    2. Switch = 192.168.1.2 255.255.255.0

    So when PC1 sends an IP packet to the switch, PC1 sends it to destination IP address of 192.168.1.2. That IP packet is encapsulated into an Ethernet frame with a destination MAC address of the switch. So when the switch receives the Ethernet frame, it notices that it is addressed to itself so it further decapsulates the Ethernet frame to reveal the IP packet inside. The switch notices that the destination IP address for the IP packet is 192.168.1.2 which is it's own IP address so it decides that this IP packet is for itself. That's how the switch determines that certain Layer 3 traffic is meant for itself. Does this answer your question?
     
    Certifications: MCSE, MCP+I, MCP, CCNA, A+
    WIP: CCDA
  6. kammodo

    kammodo Nibble Poster

    56
    0
    33
    Thanks for explaining that one a bit clearer guys. In another words switches do have limited Layer 3 capabilites but for itself. This makes a lot more sense.
     
    Certifications: CCNA R+S, CCDA , CCNP r+s , CCDP
    WIP: CCIE

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.