1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ip addresses on Switch ports

Discussion in 'Routing & Switching' started by p1xels, Jul 10, 2013.

  1. p1xels

    p1xels Bit Poster

    Can all the switch ports have IP addresses? Why all the switch ports can have MAC addresses but not IP addresses?
  2. kevicho

    kevicho Gigabyte Poster

    Switches do their communicating on layer 2, so don't need IP addresses.

    This means that they know where to send the packet using mac-addresses (which is layer 2 addressing) rather than IP addresses (which is layer 3 addressing).

    Layer 3 uses IP addresses, this is more the realm of routers, but you can get layer 3 switches which can do VLAN routing.

    Hope this explains the lack of need for ports to have ip addresses
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  3. Cunningfox

    Cunningfox Byte Poster

    Technically yes, they can have IP addresses, but really that makes them routed ports and not switched.

    Switching = Layer 2
    Routing = Layer 3
    MAC Address = Layer 2
    IP Address = Layer 3

    Remember your OSI model. Simplistically at Layer 3 a packet is given a destination IP address and passed down the stack, at layer 2 it's given destination MAC address. The frame is then sent out onto the wire at Layer 1 as binary. If it reaches a Layer 2 device (i.e a switch) it gets passed up the stack and it's destination MAC address is read and the forwarding decision made. It will keep doing this until it reaches it's destination or a Layer 3 device such as a Router or PC. When that happens then is it's passed up the stack to Layer 3 where the destination IP address is read and the forwarding decision is made. Then back down again if it's not for itself and so on.

    The OSI model is the basis of networking, learn it. OSI model - Wikipedia, the free encyclopedia
    Certifications: CCNP, CCNA, MCP
    WIP: ??

Share This Page