14.8.1 Packet tracer - Comunicaciones de TCP y UDP (Resolución)
Laboratory Resolution: TCP and UDP Communications
Part 1: Generating Network Traffic in Simulation Mode
- The laboratory focuses on TCP and UDP communications, specifically lab 14.8.1, starting with instructions to generate network traffic.
- Users are instructed to click on "multi server" and access the command prompt to begin generating ARP traffic for address resolution.
- A command is provided that sends a single ping request to the broadcast address (255), which should ideally reduce network traffic but does not function as expected in Packet Tracer.
- The command
ping -n 1successfully sends one ping request when tested against a gateway, demonstrating its intended functionality outside of Packet Tracer.
Part 2: Generating HTTP Traffic
- Users switch to generating HTTP traffic by clicking on the HTTP client and opening a web browser from the desktop.
- An IP address for the multi-server is entered into the URL field, followed by clicking "Go," which displays PDU packets in the topology window.
Part 3: Generating FTP Traffic
- After minimizing the HTTP client configuration window, users proceed to generate FTP traffic by accessing the FTP client and opening a command prompt.
- The command
ftp <server_ip>is executed, leading to PDU packets appearing in the simulation window.
Part 4: Generating DNS Traffic
- Similar steps are taken for DNS traffic generation using the DNS client; users enter
nslookup <address>in the command prompt to see corresponding PDUs.
Part 5: Sending Email Traffic
- Users open an email client from their desktop, compose an email with specified details (recipient, subject), and send it while ensuring they minimize but do not close this window.
Part 6: Verifying Generated Traffic
- Verification of generated traffic shows multiple entries of PDUs for each client type present in the simulation panel.
Part 7: Examining Multiplexing
- Users utilize "Capture Forward" functionality within Packet Tracer to observe different protocols traversing through the network.
Understanding Protocols in Data Transmission
Overview of PDU Colors and Protocols
- The discussion begins with the ability to transmit multiple data types over a single medium, emphasizing that this occurs sequentially rather than simultaneously. Various colors represent different protocols in the simulation panel.
- The speaker introduces the examination of TCP and UDP functionalities, starting with HTTP traffic as clients connect to a server.
Filtering Traffic for Analysis
- Instructions are provided on how to filter current traffic to display only HTTP and TCP PDUs by resetting the simulation and editing filters accordingly.
- The process involves opening an HTTP client browser, entering a specific server IP address, and connecting via HTTP.
Observing PDU Behavior
- Users are instructed to click on "Captureware" until an HTTP PDU appears, noting that its color matches the corresponding envelope in the topology window.
- The delay in displaying the HTTP PDU is explained as being due to the need for establishing a TCP connection before any HTTP traffic can commence.
Analyzing PDU Details
- Clicking on the PDU reveals detailed information; users are guided to check outgoing request details by navigating through tabs.
- It is highlighted that TCP communications are reliable compared to UDP. Users should record specific values from the TCP section such as source port and sequence number.
Recording Values for Further Analysis
- Participants are encouraged to document key values like source port (1026), destination port (80), sequence number (1), and acknowledgment number using an Excel sheet.
- Additional instructions include examining indicator flags next to window fields, which signify established TCP indicators during data transmission stages.
Understanding TCP Flags
- The significance of each flag is discussed; presence of '1' indicates active flags. A total of six primary flags should be noted while additional auxiliary flags may also appear.
- Specific attention is drawn towards identifying which TCP indicators are set within this particular PDU context.
Final Steps in Simulation Process
- Users must fill out their tables based on observed indicators, specifically noting ACK and PSH flags as they relate to this transmission instance.
Analyzing TCP and FTP Communication
Understanding TCP PDU Details
- The discussion begins with a focus on the differences in source and destination ports, as well as sequence numbers between two PDUs. The current values are noted: source port 80, destination port 1026, sequence number 1, and acknowledgment number 103.
- It is highlighted that both the source and destination ports have swapped positions compared to previous data. The acknowledgment number has changed to 103 while flags remain consistent (ACK and PSH).
HTTP Communication Initiation
- Instructions are given to click on the HTTP PDU prepared by the client for sending to a multi-server, marking the start of HTTP communication.
- Users are directed to examine outgoing PDUs in TCP details. Current values include: source port 1026, destination port 80, sequence number 103, and acknowledgment number varying at 234.
Resetting Simulation for FTP Analysis
- A reset of the simulation is instructed before examining FTP traffic. This step ensures clarity in analyzing subsequent communications.
- Users are prompted to open a command prompt on an FTP client desktop and initiate an FTP connection using a specified IP address (192.168.1254). Filters for displaying only FTP and TCP protocols must be set.
Capturing Traffic Data
- After setting filters for TCP and FTP protocols, users return to the command prompt interface to execute commands necessary for capturing data packets.
- Clicking "Capture Forward" allows access to outgoing PDU details where it’s confirmed that these communications utilize reliable TCP connections.
Recording Key Values from FTP Communication
- Important values such as source port (1026), destination port (21), sequence number (0), acknowledgment number (0), and flags are recorded during this analysis phase.
- Observations indicate that while the source port may vary, the destination remains constant at port 21 for FTP communication; flags show specific binary patterns indicating control signals used in transmission.
Finalizing PDU Details
- Users close out of current views after confirming captured data before proceeding with further analysis until returning back with verification marks on their client interface.
- Upon reviewing incoming PDU details again, significant changes in ports are noted: now showing source as 21 and destination as 1026; sequence remains at zero but acknowledgment increases by one.
FTP and DNS Traffic Analysis
Understanding FTP Packet Details
- The source port is set to 1026, while the destination port is 21. The sequence number is now 1, and the acknowledgment number remains at 1 from the previous packet.
- The flags indicate four zeros followed by a one in position five, confirming that this packet is an acknowledgment (ACK).
- After capturing forward, a new PDU returns with a different color indicating a response from the server.
- The server message "Welcome to FTP server" confirms successful communication; simulation reset is advised after reviewing this message.
Analyzing DNS Traffic
- To create DNS traffic, filters are adjusted to show only DNS and UDP protocols. This ensures clarity in monitoring relevant packets.
- Upon examining the outgoing PDU details, it’s noted that Layer 4 protocol used here is UDP, which differs from TCP as it does not guarantee reliable communication.
- Key values for source and destination ports are recorded: Source Port = 1026 and Destination Port = 53. Unlike TCP, UDP lacks sequence numbers or acknowledgments due to its connectionless nature.
Email Communication Examination
- In step four of the analysis, email traffic is examined by sending an email to user@multicelular.pt. Filters are updated to include POP3, SMTP, and TCP protocols for accurate tracking.
- After composing an email with sample content ("server version 7"), it's sent out while ensuring proper protocol filtering.
TCP Communication and PDU Analysis
Understanding TCP Flags and Ports
- The reliability of communications is confirmed as TCP registers values, including the flag field. The source port is set to 1026, which may vary.
- The destination port must be 25. Sequence number is initialized at 0, with acknowledgment number also at 0; the flag value is copied for further analysis.
- After capturing the PDU, it shows a transition in flags from zero to one, indicating a change in state. The process involves clicking "capture forward" until an email client receives a confirmation.
Analyzing Incoming PDU Details
- Upon reviewing the incoming PDU details, the source port remains at 25 while destination changes to 1026. Sequence number resets to 0 and acknowledgment number increments to 1; flags are analyzed for changes.
- Observations reveal that ports have inverted roles compared to previous PDUs. The sequence number has increased to one while acknowledgment remains consistent; flags indicate an ACK and SYN status.
Outgoing PDU Examination
- In examining outgoing PDUs, there’s a notable inversion of source and destination ports (now 1026 and 25 respectively). Both sequence and acknowledgment numbers are maintained at one; flags show a change with only position five being active.
- A second colored PDU indicates preparation for sending an email from the client to multiple servers. This marks the initiation of email communication.
Finalizing Flag Changes in PDUs
- Further analysis reveals that both source and destination ports remain unchanged from previous observations. Sequence numbers stay at one while acknowledgment numbers also hold steady; however, flags now reflect new values indicating ACK + PSH status.