fbpx

Chapter 3.3 – Packet Flow

Packet Flow

All Internet communications are carried out through the exchange or flow of packets or data, which are the minimum unit of data transmitted over the network. So that each packet can reach its destination, regardless of where the communicating machines are located, it must have attached information regarding the IP address of each communicating machine, as well as the port through which they communicate. A device's IP address uniquely identifies it within a network. Communication ports are also a very important part that the Firewall must also verify and control, because most communications are carried out under protocols which send packets through ports such as:

TCP It is the communication protocol that guarantees that data will be delivered to its destination without errors and in the same order in which it was transmitted.

TCP uses the concept of port number to identify sending and receiving applications. Each side of the TCP connection has an associated port number (16-bit unsigned, so there are 65536 possible ports) assigned by the sending or receiving application. Ports are classified into three categories: well-known, registered and dynamic/private. Well-known ports are assigned by the Internet Assigned Numbers Authority (IANA), range from 0 to 1023 and are normally used by the system or by privileged processes. Applications that use this type of ports are executed as servers and listen for connections. Some examples are: FTP (21), SSH (22), Telnet (23), SMTP (25) and HTTP (80). Registered ports are typically used by user applications temporarily when connecting to servers, but they can also represent services that have been registered by a third party (registered port range: 1024 to 49151). Dynamic/private ports can also be used by user applications, but this case is less common. Dynamic/private ports have no meaning outside of the TCP connection in which they were used (range of dynamic/private ports: 49152 to 65535, remember that the total range of 2 raised to the power of 16, covers 65536 numbers, from 0 to 65535)

User Datagram Protocol (UDP) is a transport level protocol based on the exchange of datagrams (Layer 4 Encapsulation OSI Model), this protocol does not guarantee that data will be delivered to its destination without errors and in the same order in which it was transmitted.
UDP uses ports to allow communication between applications. The port field is 16 bits long, so the range of valid values ​​is 0 to 65.535. Port 0 is reserved, but is an allowed value as a source port if the sending process does not expect to receive messages in response.

  • The ports 1 to 1023 called well known ports and in Unix-type operating systems, linking to one of these ports requires access as a super user.
  • The ports 1024 to 49.151 consist of registered ports.
  • The ports 49.152 to 65.535 consist of ephemeral ports and are used as temporary ports, especially by clients when communicating with servers.
  • https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

To facilitate our understanding

  • MikroTik has created diagrams to help us with advanced configuration in packet flow.
  • It's good to be familiar with them so you know what's happening with the packages and what order they will go in.
  • For this course, graphs will be analyzed superficially and in a simple way.
  • https://wiki.mikrotik.com/wiki/Packet_Flow

Packet flow diagram in Bridge or Layer 2 (MAC)

In this diagram the Routing part is simplified as a box (Layer 3)

Packet flow diagram in Bridge or Layer 2 in MikroTik RouterOS

Packet flow diagram in Routing or Layer 3 (IP)

In this diagram the Bridge part is simplified as a box (Bridging)

There are no tags for this post.
Did this content help you?
Facebook
Twitter
LinkedIn
WhatsApp
Telegram

Other documents in this category

Leave your comment

Your email address will not be published. Required fields are marked with *

Tutorials available at MikroLABs

No Courses Found!

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011