CCNA, Wireshark and GNS3: IPv4 Ethernet Broadcast

I started to study for CCNA with the “CCNA 200-120 Video Boot Camp With Chris Bryant” the course is amazing but there is a lack of pratice, so I decided to use GNS3 in order to build my (virtual) lab and understand more about network.

GNS3 is an alternative or complementary software tool to using real computer labs for computer network engineers, administrators and people studying for certifications such as Cisco CCNA, CCNP and CCIE as well as Juniper JNCIA, JNCIS and JNCIE. It can also be used to experiment features or to check configurations that need to be deployed later on real devices. I will be not talking about how to configure GNS3 but I can suggest you a good book on this topic.

To learn more from the network we’ll also used Wireshark.

Let’s start

An example of IPv4 protocol that is using broadcast would be an ARP request: when my computer is connected to my LAN, it needs to find the Layer 2 address of its default gateway (in my case 192.168.0.1), so my computer is going to broadcast an ARP request and the switch is going to forward that frame to all those devices so that everybody on that LAN (IP phone, Android box, etc).

But, in the case of an ARP request, when all these devices see that it’s an ARP request looking for the Mac address associated with 192.168.0.1, only the router is going to reply back, because only this router has that IP address. And the router will reply back to my PC saying, hey, this is my MAC address associated with the IP address of 192.168.0.1. The reply is not broadcast but unicast. So the initial request is broadcast and the reply that comes back is unicast.

Our scenario will be very simple, just two routers in direct connection, I’ll send a ping from the first router (now R1) to the second one (now R2), a ping it will initiate ARP to resolve the Layer 3 address to a Layer 2 MAC address.

This will be our network’s topology:

Basic 2 Routers Topology

Now we need to configure our routers, let’s start with R1:

R1#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface f0/0
R1(config-if)#no shutdown
R1(config-if)#ip address 10.0.0.1 255.255.255.0
R1(config-if)#end
R1#
*Mar 1 00:04:20.159: %SYS-5-CONFIG_I: Configured from console by console
R1#

let’s do the same with R2:

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface f0/0
R2(config-if)#no shutdown
R2(config-if)#ip address 10.0.0.2 255.255.255.0
R2(config-if)#end
R2#
*Mar 1 00:08:16.419: %SYS-5-CONFIG_I: Configured from console by console
R2#

So, if I’ll ping from R1 to R2, R1 will issue an ARP request to discover the MAC address of R2. Let’s right click on  the link between routers, “Start capturing” and select one of the interfaces.

R1#ping 10.0.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 16/33/52 ms
R1#

Only 4 pings were successful that’s because the first ping was used for the ARP request, if we check Wireshark:

Basic2RoutersTopologyWireshark

now on R1:

R1#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.0.0.2 15 c201.0c8a.0000 ARPA FastEthernet0/0
Internet 10.0.0.1 - c200.0c8a.0000 ARPA FastEthernet0/0
R1#

we can verify that right now we know the MAC address of 10.0.0.2.

I hope you enjoyed in this post and I’ll continue to work and to post.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Just a sec