Switch and mac address table












2















I thought that a switch learnt the mac addresses by the computers sending out packets. However when I configured 2 switches, and 2 pc's, 1 pc connected to 1 switch, the other pc connected to the other switch, and then both switches connected to each other, there were mac addresses in the mac address table without there being any packets being sent. Why/How does this happen?










share|improve this question


















  • 4





    PCs are actually pretty chatty. They do a lot of things in the background.

    – Ron Trunk
    16 hours ago






  • 1





    Are you sure there were no packet sent? How? Modern OSes have a lot of background network activity. This can also be due to gratuitous ARP. See this answer for example

    – JFL
    16 hours ago













  • Definitely no packets sent when it was first viewed, packets were sent afterwards and the table was view again.

    – The_Bear
    16 hours ago






  • 4





    Then you have magic switches.

    – JFL
    15 hours ago






  • 6





    Clearly the PCs sent frames. That’s how the switch learned the MACs.

    – Ron Trunk
    15 hours ago
















2















I thought that a switch learnt the mac addresses by the computers sending out packets. However when I configured 2 switches, and 2 pc's, 1 pc connected to 1 switch, the other pc connected to the other switch, and then both switches connected to each other, there were mac addresses in the mac address table without there being any packets being sent. Why/How does this happen?










share|improve this question


















  • 4





    PCs are actually pretty chatty. They do a lot of things in the background.

    – Ron Trunk
    16 hours ago






  • 1





    Are you sure there were no packet sent? How? Modern OSes have a lot of background network activity. This can also be due to gratuitous ARP. See this answer for example

    – JFL
    16 hours ago













  • Definitely no packets sent when it was first viewed, packets were sent afterwards and the table was view again.

    – The_Bear
    16 hours ago






  • 4





    Then you have magic switches.

    – JFL
    15 hours ago






  • 6





    Clearly the PCs sent frames. That’s how the switch learned the MACs.

    – Ron Trunk
    15 hours ago














2












2








2








I thought that a switch learnt the mac addresses by the computers sending out packets. However when I configured 2 switches, and 2 pc's, 1 pc connected to 1 switch, the other pc connected to the other switch, and then both switches connected to each other, there were mac addresses in the mac address table without there being any packets being sent. Why/How does this happen?










share|improve this question














I thought that a switch learnt the mac addresses by the computers sending out packets. However when I configured 2 switches, and 2 pc's, 1 pc connected to 1 switch, the other pc connected to the other switch, and then both switches connected to each other, there were mac addresses in the mac address table without there being any packets being sent. Why/How does this happen?







switch mac-address






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 16 hours ago









The_BearThe_Bear

433




433








  • 4





    PCs are actually pretty chatty. They do a lot of things in the background.

    – Ron Trunk
    16 hours ago






  • 1





    Are you sure there were no packet sent? How? Modern OSes have a lot of background network activity. This can also be due to gratuitous ARP. See this answer for example

    – JFL
    16 hours ago













  • Definitely no packets sent when it was first viewed, packets were sent afterwards and the table was view again.

    – The_Bear
    16 hours ago






  • 4





    Then you have magic switches.

    – JFL
    15 hours ago






  • 6





    Clearly the PCs sent frames. That’s how the switch learned the MACs.

    – Ron Trunk
    15 hours ago














  • 4





    PCs are actually pretty chatty. They do a lot of things in the background.

    – Ron Trunk
    16 hours ago






  • 1





    Are you sure there were no packet sent? How? Modern OSes have a lot of background network activity. This can also be due to gratuitous ARP. See this answer for example

    – JFL
    16 hours ago













  • Definitely no packets sent when it was first viewed, packets were sent afterwards and the table was view again.

    – The_Bear
    16 hours ago






  • 4





    Then you have magic switches.

    – JFL
    15 hours ago






  • 6





    Clearly the PCs sent frames. That’s how the switch learned the MACs.

    – Ron Trunk
    15 hours ago








4




4





PCs are actually pretty chatty. They do a lot of things in the background.

– Ron Trunk
16 hours ago





PCs are actually pretty chatty. They do a lot of things in the background.

– Ron Trunk
16 hours ago




1




1





Are you sure there were no packet sent? How? Modern OSes have a lot of background network activity. This can also be due to gratuitous ARP. See this answer for example

– JFL
16 hours ago







Are you sure there were no packet sent? How? Modern OSes have a lot of background network activity. This can also be due to gratuitous ARP. See this answer for example

– JFL
16 hours ago















Definitely no packets sent when it was first viewed, packets were sent afterwards and the table was view again.

– The_Bear
16 hours ago





Definitely no packets sent when it was first viewed, packets were sent afterwards and the table was view again.

– The_Bear
16 hours ago




4




4





Then you have magic switches.

– JFL
15 hours ago





Then you have magic switches.

– JFL
15 hours ago




6




6





Clearly the PCs sent frames. That’s how the switch learned the MACs.

– Ron Trunk
15 hours ago





Clearly the PCs sent frames. That’s how the switch learned the MACs.

– Ron Trunk
15 hours ago










3 Answers
3






active

oldest

votes


















5














When you connect a PC to a network switch ("link up"), the PC performs at least one of these procedures:




  1. (most commonly) request an IP address lease from a DHCP server

  2. (when DHCP fails or is deactivated) automatically configure a link-local IP address (aka zero-config or APIPA)

  3. (when a static IP address is configured) send an ARP probe to detect an address collision


All of these methods send out broadcast frames from the PC which populate the MAC table in all the switches in the network (broadcast domain / VLAN).






share|improve this answer
























  • Also, gratuitous ARP, as mentioned in the comments to the question.

    – Jörg W Mittag
    8 hours ago











  • And an ARP for the default gateway and DNS servers if defined either locally or by DHCP plus UPNP discovery, etc.

    – grahamj42
    8 hours ago











  • Strictly speaking this depend on OS and network configuration. If you were to disable IPv4 none of the packets you mention would be sent. For another example look at IPv6, it doesn't use broadcast only multicast. There are switches which will treat them the same, but a switch does not have to forward multicast packets onto all ports.

    – kasperd
    6 hours ago



















4














PCs have many background tasks that send data all the time, even when you’re “not doing anything.” These frames will populate the MAC table.






share|improve this answer































    0














    You might think no packets have been sent, but Computers do a lot of talking in the background, given all the services functioning in the background.






    share|improve this answer










    New contributor




    Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.



















      protected by Ron Maupin 7 hours ago



      Thank you for your interest in this question.
      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



      Would you like to answer one of these unanswered questions instead?














      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      5














      When you connect a PC to a network switch ("link up"), the PC performs at least one of these procedures:




      1. (most commonly) request an IP address lease from a DHCP server

      2. (when DHCP fails or is deactivated) automatically configure a link-local IP address (aka zero-config or APIPA)

      3. (when a static IP address is configured) send an ARP probe to detect an address collision


      All of these methods send out broadcast frames from the PC which populate the MAC table in all the switches in the network (broadcast domain / VLAN).






      share|improve this answer
























      • Also, gratuitous ARP, as mentioned in the comments to the question.

        – Jörg W Mittag
        8 hours ago











      • And an ARP for the default gateway and DNS servers if defined either locally or by DHCP plus UPNP discovery, etc.

        – grahamj42
        8 hours ago











      • Strictly speaking this depend on OS and network configuration. If you were to disable IPv4 none of the packets you mention would be sent. For another example look at IPv6, it doesn't use broadcast only multicast. There are switches which will treat them the same, but a switch does not have to forward multicast packets onto all ports.

        – kasperd
        6 hours ago
















      5














      When you connect a PC to a network switch ("link up"), the PC performs at least one of these procedures:




      1. (most commonly) request an IP address lease from a DHCP server

      2. (when DHCP fails or is deactivated) automatically configure a link-local IP address (aka zero-config or APIPA)

      3. (when a static IP address is configured) send an ARP probe to detect an address collision


      All of these methods send out broadcast frames from the PC which populate the MAC table in all the switches in the network (broadcast domain / VLAN).






      share|improve this answer
























      • Also, gratuitous ARP, as mentioned in the comments to the question.

        – Jörg W Mittag
        8 hours ago











      • And an ARP for the default gateway and DNS servers if defined either locally or by DHCP plus UPNP discovery, etc.

        – grahamj42
        8 hours ago











      • Strictly speaking this depend on OS and network configuration. If you were to disable IPv4 none of the packets you mention would be sent. For another example look at IPv6, it doesn't use broadcast only multicast. There are switches which will treat them the same, but a switch does not have to forward multicast packets onto all ports.

        – kasperd
        6 hours ago














      5












      5








      5







      When you connect a PC to a network switch ("link up"), the PC performs at least one of these procedures:




      1. (most commonly) request an IP address lease from a DHCP server

      2. (when DHCP fails or is deactivated) automatically configure a link-local IP address (aka zero-config or APIPA)

      3. (when a static IP address is configured) send an ARP probe to detect an address collision


      All of these methods send out broadcast frames from the PC which populate the MAC table in all the switches in the network (broadcast domain / VLAN).






      share|improve this answer













      When you connect a PC to a network switch ("link up"), the PC performs at least one of these procedures:




      1. (most commonly) request an IP address lease from a DHCP server

      2. (when DHCP fails or is deactivated) automatically configure a link-local IP address (aka zero-config or APIPA)

      3. (when a static IP address is configured) send an ARP probe to detect an address collision


      All of these methods send out broadcast frames from the PC which populate the MAC table in all the switches in the network (broadcast domain / VLAN).







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered 15 hours ago









      Zac67Zac67

      29.4k21859




      29.4k21859













      • Also, gratuitous ARP, as mentioned in the comments to the question.

        – Jörg W Mittag
        8 hours ago











      • And an ARP for the default gateway and DNS servers if defined either locally or by DHCP plus UPNP discovery, etc.

        – grahamj42
        8 hours ago











      • Strictly speaking this depend on OS and network configuration. If you were to disable IPv4 none of the packets you mention would be sent. For another example look at IPv6, it doesn't use broadcast only multicast. There are switches which will treat them the same, but a switch does not have to forward multicast packets onto all ports.

        – kasperd
        6 hours ago



















      • Also, gratuitous ARP, as mentioned in the comments to the question.

        – Jörg W Mittag
        8 hours ago











      • And an ARP for the default gateway and DNS servers if defined either locally or by DHCP plus UPNP discovery, etc.

        – grahamj42
        8 hours ago











      • Strictly speaking this depend on OS and network configuration. If you were to disable IPv4 none of the packets you mention would be sent. For another example look at IPv6, it doesn't use broadcast only multicast. There are switches which will treat them the same, but a switch does not have to forward multicast packets onto all ports.

        – kasperd
        6 hours ago

















      Also, gratuitous ARP, as mentioned in the comments to the question.

      – Jörg W Mittag
      8 hours ago





      Also, gratuitous ARP, as mentioned in the comments to the question.

      – Jörg W Mittag
      8 hours ago













      And an ARP for the default gateway and DNS servers if defined either locally or by DHCP plus UPNP discovery, etc.

      – grahamj42
      8 hours ago





      And an ARP for the default gateway and DNS servers if defined either locally or by DHCP plus UPNP discovery, etc.

      – grahamj42
      8 hours ago













      Strictly speaking this depend on OS and network configuration. If you were to disable IPv4 none of the packets you mention would be sent. For another example look at IPv6, it doesn't use broadcast only multicast. There are switches which will treat them the same, but a switch does not have to forward multicast packets onto all ports.

      – kasperd
      6 hours ago





      Strictly speaking this depend on OS and network configuration. If you were to disable IPv4 none of the packets you mention would be sent. For another example look at IPv6, it doesn't use broadcast only multicast. There are switches which will treat them the same, but a switch does not have to forward multicast packets onto all ports.

      – kasperd
      6 hours ago











      4














      PCs have many background tasks that send data all the time, even when you’re “not doing anything.” These frames will populate the MAC table.






      share|improve this answer




























        4














        PCs have many background tasks that send data all the time, even when you’re “not doing anything.” These frames will populate the MAC table.






        share|improve this answer


























          4












          4








          4







          PCs have many background tasks that send data all the time, even when you’re “not doing anything.” These frames will populate the MAC table.






          share|improve this answer













          PCs have many background tasks that send data all the time, even when you’re “not doing anything.” These frames will populate the MAC table.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 15 hours ago









          Ron TrunkRon Trunk

          36.6k33374




          36.6k33374























              0














              You might think no packets have been sent, but Computers do a lot of talking in the background, given all the services functioning in the background.






              share|improve this answer










              New contributor




              Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                You might think no packets have been sent, but Computers do a lot of talking in the background, given all the services functioning in the background.






                share|improve this answer










                New contributor




                Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  You might think no packets have been sent, but Computers do a lot of talking in the background, given all the services functioning in the background.






                  share|improve this answer










                  New contributor




                  Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  You might think no packets have been sent, but Computers do a lot of talking in the background, given all the services functioning in the background.







                  share|improve this answer










                  New contributor




                  Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer








                  edited 10 hours ago









                  Cown

                  6,26231030




                  6,26231030






                  New contributor




                  Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 11 hours ago









                  PantheraPanthera

                  1




                  1




                  New contributor




                  Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Panthera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.

















                      protected by Ron Maupin 7 hours ago



                      Thank you for your interest in this question.
                      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                      Would you like to answer one of these unanswered questions instead?



                      Popular posts from this blog

                      "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                      Alcedinidae

                      RAC Tourist Trophy