- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
Monitoring Network Access
Understanding networking concepts is a more advanced concept for most system administrators, but it is essential to being successful. In this activity, the we will use the netcat (`nc`) utility to generate network traffic between two servers and view that traffic's appearance in a tool called `iptraf-ng`.
Lab Info
Table of Contents
-
Challenge
Install Client Utilities
We've got to install the two packages that the team will use to generate and monitor traffic. Let's use YUM to get it done:
[root@server1]# yum install iptraf-ng ncRepeat this on the other server:
[root@server2]# yum install iptraf-ng nc -
Challenge
Create the Traffic Log File
On the first server, let's run
iptraf-ngand go underConfigure...In the menu, don't forget this isn't a menu we control with a mouse -- it's all keyboard. Make sureLoggingis toggled toOn. Set the log file path to:home/cloud_user/traffic_log.txt. Then go into IP traffic monitor. In the next menu, select ens5. Once we press Enter the logging will start.Listen for Traffic
Let's open a second terminal into
server1and runsudo suright off. Once we're there, we're going to start netcat listening on post 2525 with this:[root@server1]# nc -l 2525Send Some Traffic
Now, let's start talking. Back in the
server2window we've got open, send netcat traffic toserver1with this (wherex.x.x.xis the internal IP ofserver1that we'll see on the hands-on lab overview page):[root@server2]# nc x.x.x.x 2525We'll just land at a blinking cursor below the prompt, but we can type a message there and press Enter. Once we do, it will show up back in the window we're listening in on
server1. A bunch of messages sent fromserver2would look like this:[root@server2]# nc x.x.x.x 2525 test test testing This is a testOn
server1, they would look like this when they arrive:[root@server1]# nc -l 2525 test test testing This is a testThat should be enough traffic for what we're doing. On
server2, press Ctrl + C to kill thenccommand we've got running and flip back over to the terminal we were runningiptraf-ngin. Press x to stop the monitoring and get out, then choose Exit from the main menu.Examine the Log
On
server1, if we runls /home/cloud_userwe should seetraffic_log.txtlisted in the output. Read that to see if it was capturing what we need:[root@server1]# less /home/cloud_user/traffic_log.txtWe should see some log entries showing traffic going from
server2toserver1on port 2525.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.