cancel
Showing results for 
Search instead for 
Did you mean: 
Chetan_Tiwary_
Community Manager
Community Manager
  • 994 Views

Red Hat Linux Interview Series 4

Jump to solution

Q.) Explain the below output as per the mentioned items : a. How are we getting IP of the servera in the output ?  b. Why 64 bytes is the packet size sent, is it fixed ? c. What is “ttl” ?   d. Explain the item 4 :

Chetan_Tiwary__0-1726506340247.png

 

Q.) Not able to run any commands, what is the issue here ? How to resolve it ?

 

[root@rhel9]:~#df -h
bash: fork: retry: Resource temporarily unavailable

[root@rhel9]:~#ls -lrth 
bash: fork: retry: Resource temporarily unavailable

 

 

Q.) Identify the bottleneck here , what may be causing this ?

Screenshot from 2024-09-16 22-51-19.png

 

 

I'll be posting a series of Linux-related questions covering various skill levels. Feel free to share your insights and expertise. Your contributions will benefit learners at all stages, from those in current roles to those preparing for Linux interviews.

1 Solution

Accepted Solutions
Trevor
Starfighter Starfighter
Starfighter
  • 972 Views

I love networking!!!!   Because of my passion for the topic, I'm going to
take a whack at that first question.

1)  How are we getting IP of the servera in the output ?

Answer: The IP of "servera" is being resolved based on the hostname (servera) 
                  used in
 the command.

There are only two (2) mechanisms to resolve a hostname to its IP address:
1:  DNS server
2:  /etc/hosts (local file on a Linux system)

It is clear that the IP address is being resolved based on the /etc/hosts file because
of a couple of observations:
1 - the domain name is NOT included in the name of the host (only "servera", which is
the hostname)
2 - the IP address of the local host is a PRIVATE IP!   This is really big!!!!  A DNS server,
on the Internet, CANNOT resolve the IP address of a host that uses a private IP!!!

Remember those block of IPv4 addresses that are designated as private????

2)  Why 64 bytes is the packet size sent, is it fixed ?

Answer:  The ping command sends 64 bytes because of the Internet Control
Message 
Protocol (ICMP) header. A correctly formed ping packet is 56 bytes, but
when the ICMP header is added, the total size is 64 bytes. If the Internet Protocol (IP)
version 4 header is also included, the total size is 84 bytes.  Do you see the numbers
56 and 84 anywhere in the output?  Take a close look

Note:  Ethernet has a minimum frame size of 64 bytes. If you try to send less than that,
your system will pad the frame to 64 bytes anyway, if it's being sent on Ethernet.  It's a
very, very, very good likelihood that a Linux system is using an Ethernet interface!

The ping command can be used to send data packets with a maximum size of 65,527 bytes.  I guess this answers the 2nd part of the question, "is it fixed"!!!

$  ping -s [packet_size] [hostname]
Specifies the size (in bytes) of data included in each ping request.

 

3) What is “ttl” ?    This question is the most challenging one

Answer:  The TTL value represents the number of network hops a packet can take
before a 
router discards it.  If a router receives a packet with a TTL value of zero (0),
the router is going to flush (discard) that packet.  

The TTL value is a number from 1 to 255.



4)  rtt  min/avg/max/mdev

Answer:  Round-trip time (RTT) in networking is the time it takes to get a response after you initiate a network request.

Here's an alternate definition:  RTT is the time taken by data to reach the same point of origin.

I'm pretty sure that the min/avg/max are self-explanatory:  minimum, average, and
maximum values that were recorded for the RTT.  What's this mdev measurement?

mdev is the standard deviation, essentially an average of how far each ping RTT is
from the mean 
RTT. The higher mdev is, the more variable the RTT is (over time).
That's all I'm going to say about that, because "standard deviation" and "mean" is going
to get me off on some Statistics concepts, that I'd rather not at this time

 

So much wonderful information the ping commands provides us, and yet routintely, we
probably only consider 5-10% of these goodies.  Oh well, the great news is that the
information is there should we ever need it!

Trevor "Red Hat Evangelist" Chandler

View solution in original post

1 Reply
Trevor
Starfighter Starfighter
Starfighter
  • 973 Views

I love networking!!!!   Because of my passion for the topic, I'm going to
take a whack at that first question.

1)  How are we getting IP of the servera in the output ?

Answer: The IP of "servera" is being resolved based on the hostname (servera) 
                  used in
 the command.

There are only two (2) mechanisms to resolve a hostname to its IP address:
1:  DNS server
2:  /etc/hosts (local file on a Linux system)

It is clear that the IP address is being resolved based on the /etc/hosts file because
of a couple of observations:
1 - the domain name is NOT included in the name of the host (only "servera", which is
the hostname)
2 - the IP address of the local host is a PRIVATE IP!   This is really big!!!!  A DNS server,
on the Internet, CANNOT resolve the IP address of a host that uses a private IP!!!

Remember those block of IPv4 addresses that are designated as private????

2)  Why 64 bytes is the packet size sent, is it fixed ?

Answer:  The ping command sends 64 bytes because of the Internet Control
Message 
Protocol (ICMP) header. A correctly formed ping packet is 56 bytes, but
when the ICMP header is added, the total size is 64 bytes. If the Internet Protocol (IP)
version 4 header is also included, the total size is 84 bytes.  Do you see the numbers
56 and 84 anywhere in the output?  Take a close look

Note:  Ethernet has a minimum frame size of 64 bytes. If you try to send less than that,
your system will pad the frame to 64 bytes anyway, if it's being sent on Ethernet.  It's a
very, very, very good likelihood that a Linux system is using an Ethernet interface!

The ping command can be used to send data packets with a maximum size of 65,527 bytes.  I guess this answers the 2nd part of the question, "is it fixed"!!!

$  ping -s [packet_size] [hostname]
Specifies the size (in bytes) of data included in each ping request.

 

3) What is “ttl” ?    This question is the most challenging one

Answer:  The TTL value represents the number of network hops a packet can take
before a 
router discards it.  If a router receives a packet with a TTL value of zero (0),
the router is going to flush (discard) that packet.  

The TTL value is a number from 1 to 255.



4)  rtt  min/avg/max/mdev

Answer:  Round-trip time (RTT) in networking is the time it takes to get a response after you initiate a network request.

Here's an alternate definition:  RTT is the time taken by data to reach the same point of origin.

I'm pretty sure that the min/avg/max are self-explanatory:  minimum, average, and
maximum values that were recorded for the RTT.  What's this mdev measurement?

mdev is the standard deviation, essentially an average of how far each ping RTT is
from the mean 
RTT. The higher mdev is, the more variable the RTT is (over time).
That's all I'm going to say about that, because "standard deviation" and "mean" is going
to get me off on some Statistics concepts, that I'd rather not at this time

 

So much wonderful information the ping commands provides us, and yet routintely, we
probably only consider 5-10% of these goodies.  Oh well, the great news is that the
information is there should we ever need it!

Trevor "Red Hat Evangelist" Chandler
Join the discussion
You must log in to join this conversation.