Have you ever thought about how your data gets from your device to a server far away? This post breaks down the steps of how data moves through networks, covering things like IP addresses, MAC addresses, ARP, and routing. We’ll also explain what happens with switches, routers, and how the OSI model fits into it all. Whether you’re just curious or already in IT, this guide will help you understand the basics of how networks really work.
Basics of Computer Networking
Are you curious about the basics of computer networking and how it has transformed the way we communicate and share information? From sending emails to streaming videos, networking technology has become an integral part of our lives. From switches to routers to wireless access points, this blog post will cover it all. Join us as we explore the world of networking and its importance in our modern lives.
The Benefits of a Career in Technical Support
Technical support job may not be the first choice that comes to mind when anyone considers getting into the tech industry, but it is a great career option. Here we are making a case for technical support jobs and why it is the perfect entry to the tech industry. If you are interested in starting your career in tech, you’re at the right place.
Default Network Ports for Common Services
Today all computers are interconnected and have to communicate with each other over a network. before passing this information these systems first establish a connection each end of which is a socket, A port is a logical address that is assigned to a specific service on the computer, and along with the IP address, it creates this socket, In this article, we understand more about ports and the common default or well-known ports used by services.
Uses of Tshark/Wireshark for beginners
Most of the time when we connect to the internet, we don’t think about the network protocols which work behind that make it all possible. Right now, while you are reading this article, many packets are being exchanged by your computer and traveling across the internet.
To understand these protocols, you need a tool that can capture and help you analyze these packets. Wireshark is a popular open source graphical user interface (GUI) tool for analyzing packets. However, it also provides a powerful command-line utility called TShark for people who prefer to work on the Linux command line.
Check your installation
First, ensure the required packages are installed:
# rpm -qa | grep -i wireshark
If the Wireshark package is installed, check whether the TShark utility is installed and, if so, which version:
# tshark -v
If you are logged in as a regular, non-root user, you need sudo rights to use the TShark utility. Root users can skip sudo and directly run the tshark command.
Useful tshark commands
- All tshark commands displayed on your machine
# sudo tshark -h
- 2. Capture network traffic with tshark by providing interface
# sudo tshark -i <interface>
- Capture network packets and copy in file traffic-capture.pcap
- By using -w options, user can easily copy all output of tshark tool into single file of format pcap.
tshark -i <interface> -w <file-name>.pcap
- Read captured packets with tshark by providing input pcap file
- By using option -r with tshark, user can read saved pcap file easily.
tshark -r <file-name>.pcap
- Capture packets and copy traffic into .pcap file for the particular duration
- If user wants to capture network traffic from the live network for a specific period of time, just use -a option. Below command helps you to capture traffic for a particular duration.
tshark -i <interface> -a duration:<time>
- Capture the specific number of packets
- tshark tool provide flexibility to user to display specific number of captured packets.
tshark -c <number> -i <interface>
- Capture only packets from the specific source or destination IP
- This is most used command by security researchers and network engineers. If you want to filter traffic based on specific IP, use -f option.
tshark -i <interface> -f "host <IP>"
- Capture only specific protocol network packets
- Below example shows how you can filter specific protocol while displaying results of tool tshark.
tshark -i <interface> -f "<protocol>"
- Note: <protocol> may be tcp, udp, dns etc.
Conclusion
This short tutorial equipped you to initiate the use of tshark in analyzing network traffic. You can use different options in the same command to filter results more specific to your requirement.
..
..
Author
Pravin Tewari
Senior Manager, Application and Cloud Support
Pravin is a visionary professional with over 11 years of experience in Technical Support, Cloud Infrastructure Management, and Customer Experience. He has hands-on experience in working across the lifecycle of project delivery and deployment, solution consulting, and support. He has deep experience in managing cloud deployments and implementing DevOps tools for automation to provide better uptime. Pravin has successfully led large product & cloud support teams, and coached & mentored a high-performing team that delivers high-quality service to customers.