
In this article we will see how to manipulate the routing tables in Linux using route command.

It is primarily used to setup static routes to specific host or networks via an interface.

Route command is used to show/manipulate the IP routing table. Thus switch learns PC MAC address even before the data traffic flow or PING process.In the 1st part of the IP Routing series, we learned the fundamentals of Linux IP Routing. The destination IP address must be a PC2 IP address but here it has PC1 IP address, so it will drop the packet. At layer 3, it will check the destination IP address. Since it’s broadcast MAC address, it will accept and send to Layer 3. PC2 also receives the packet, and it will check the destination MAC address first. MAC Address Table Switch#show mac-address-table Now, if you run the command in Switch, you will see PC1 MAC-address entry in MAC address table. The switch receives the packet, and it will learn the MAC address of the PC1, and it will update in the MAC address table. Since it’s a broadcast frame, it will be flooded to the network. It immediately generates an ARP packet with broadcast destination mac address and destination IP address with its own IP address 192.168.0.1.Īlso note that, in this packet, you can see the PC1 source MAC address and source IP address. MAC Address table Switch#show mac-address-table So there is no chance of learning PC MAC address by a switch.Īt this point, when we run the command in switch, then you will see no entry in the MAC address table. So it will drop the frames and never send back a reply switch.

