{"id":5631,"date":"2016-08-26T13:33:44","date_gmt":"2016-08-26T18:33:44","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=5631"},"modified":"2016-08-26T13:39:47","modified_gmt":"2016-08-26T18:39:47","slug":"can-hosts-in-same-subnet-ping-each-other-if-in-different-vlans","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2016\/08\/26\/can-hosts-in-same-subnet-ping-each-other-if-in-different-vlans\/","title":{"rendered":"Can hosts in same subnet ping each other if in different VLAN&#8217;s?"},"content":{"rendered":"<p>Short and sweet, no!<\/p>\n<p><img alt='' class='alignnone size-full wp-image-5633 ' src='http:\/\/appcrawler.com\/wordpress\/wp-content\/uploads\/2016\/08\/img_57c089ce5c2b3.png' \/><\/p>\n<p>In the example above, Laptop0 and Laptop2 are in VLAN1, while Laptop1 and Laptop3 are in VLAN2.  We apply the same network and subnet mask (192.168.1.1 and 255.255.255.0) to each VLAN.  <\/p>\n<p>We assign the Laptop&#8217;s address of 192.168.1.[2-5].  For example, see below&#8230;<\/p>\n<p><img alt='' class='alignnone size-full wp-image-5636 ' src='http:\/\/appcrawler.com\/wordpress\/wp-content\/uploads\/2016\/08\/img_57c08b65a091c.png' \/><\/p>\n<p>We see that on Laptop0, we can only ping 192.168.1.4, but not 192.168.1.3 and 192.168.1.5&#8230;<\/p>\n<pre>\r\nC:\\>ping 192.168.1.3\r\n\r\nPinging 192.168.1.3 with 32 bytes of data:\r\n\r\nRequest timed out.\r\nRequest timed out.\r\nRequest timed out.\r\nRequest timed out.\r\n\r\nPing statistics for 192.168.1.3:\r\n    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),\r\n\r\nC:\\>arp -a\r\nNo ARP Entries Found\r\nC:\\>ping 192.168.1.4\r\n\r\nPinging 192.168.1.4 with 32 bytes of data:\r\n\r\nReply from 192.168.1.4: bytes=32 time<1ms TTL=128\r\nReply from 192.168.1.4: bytes=32 time<1ms TTL=128\r\nReply from 192.168.1.4: bytes=32 time<1ms TTL=128\r\nReply from 192.168.1.4: bytes=32 time<1ms TTL=128\r\n\r\nPing statistics for 192.168.1.4:\r\n    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),\r\nApproximate round trip times in milli-seconds:\r\n    Minimum = 0ms, Maximum = 0ms, Average = 0ms\r\n\r\nC:\\>ping 192.168.1.5\r\n\r\nPinging 192.168.1.5 with 32 bytes of data:\r\n\r\n\r\nPing statistics for 192.168.1.5:\r\n    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),\r\n\r\nControl-C\r\n^C\r\nC:\\>\r\n<\/pre>\n<p>There is no good reason to do this, but as an exercise, it may help you to understand that the VLAN is king.  The same physical hardware and network will not allow you to cross VLAN&#8217;s.  The reason for this that the switch will not broadcast the ARP request to anything other than the ports in the VLAN to which the requester is connected.  As such, it will never see the other MAC addresses, even though there connected hosts are in the same subnet.<\/p>\n<p>You can find the entire pkt file <a href=http:\/\/appcrawler.com\/wordpress\/wp-content\/uploads\/2016\/08\/ping_across_vlans.pkt>here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short and sweet, no! In the example above, Laptop0 and Laptop2 are in VLAN1, while Laptop1 and Laptop3 are in VLAN2. We apply the same network and subnet mask (192.168.1.1 and 255.255.255.0) to each VLAN. We assign the Laptop&#8217;s address&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2016\/08\/26\/can-hosts-in-same-subnet-ping-each-other-if-in-different-vlans\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[56],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5631"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=5631"}],"version-history":[{"count":7,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5631\/revisions"}],"predecessor-version":[{"id":5641,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5631\/revisions\/5641"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=5631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=5631"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=5631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}