Network Engineering
brian | Published: Feb. 16, 2024, 3:26 p.m. | Updated: May 25, 2025, 8:58 p.m.
ICMP(Internet Control Message Protocol)
The ICMP is used by hosts and routers to communicate network-level information
1. Error reporting: unreachable host, network, port, protocol
2. Echo request/reply (used by ping)
The ICMP is used by routers, hosts and other network devices, and its mainly used for traffic analysis
SIDE NOTE: Lives in Layer 3 on the OSI model
When are ICMP Messages Sent?
ICMP messages are sent in a variety of error reporting contexts
1. Maybe a device sends something to another device(recipient) thats too large, and so the recipient will discard that message, and then send an ICMP message to the source
2. Scenerio 2: Computer A sends a message to computer B, BUT the gateway finds a shorter route for the message to travel on, and so the gateway sends an ICMP message, and the packet is redirected to the shorter path.
Ping
Ping is one of the most widely used utilities in networking, and used for
1. Testing network connectivity
2. Test network interface card
3. Test DNS name resolution issues
Here I pinged google.com by going to the terminal and typing "ping google.com". As you can see it sent 4 data packets to the ip address of google, next our computer waits for the response from google, and then google servers sends back the data packets to us as a reply, and this is called echo reply request, and it gives us information about the server that we just pinged.
Now what happens if you ping a website that has firewall? If your website has a firewall, it will block all ping requests, so as an example my website has a firewall and this would be the result of attempting to ping it
Loopback Test
The command "ping 127.0.0.1" or "ping localhost" checks if your network interface card is working properly. The loopback test will send out signals to your computer for testing, and If the test is successful, then that means your network card is working and if it failed, then that means there is a problem with your network card
Traceroute
Traceroute is a command line utility that is used to show the route data packets take
The internet is a global network of routers, that allow computers and servers to be able to communicate to eachother from all over the world. These routers communicate with eachother so that they can direct or route the data packets to their final destination
Traceroute utility is helpful beacuse it finds out the exact path that the data packet takes from sender to destination
The traceroute will tell us a lot of information like the ping, but it will also ping each router on its way to the destination
1. our computer sends 3 data packets to each router on its way to the destination
2.Every time the packets reach the routers, they will send all 3 back to our computer, and it contains information about that router such as the routers ip address, and the time the packets took to arrive, and come back in milliseconds.
if you see an asterik * , that means there might be a problem with the router, or that the router is working fine but was NOT configured to return traceroute replies, it still however passed on the data to the next router
TTL
Another value in the traceroute called TTL, which is a given value to the data packets on how long they can live before they are discarded. As you can see below, the TTL is the maximum number of hops, in our case its 30 which is default value. If the data packets do NOT reach their destination after those 30 hops, then they WILL BE DROPPED
Set A Custom TTL
tracert -h 10 google.com
this sets it so that if the data reaches the 10th hop, the data packet is dropped.