Передача пакетов на сетевом и канальном уровнях | Курс "Компьютерные сети"
Introduction to Network and Data Link Layers
Overview of the Course
- The course focuses on telecommunications networks and systems, specifically how the network layer interacts with the data link layer during packet transmission.
- The data link layer is responsible for data transfer within a single network segment, while the network layer connects multiple segments into a larger network.
Addressing in Networking
- MAC addresses are used for addressing at the data link layer, whereas IP addresses are utilized at the network layer.
- Each transmitted packet contains both an IP address and a MAC address, which are essential for routing and delivery.
Packet Formation in a Single Network Segment
Initial Packet Creation
- A sender computer has its own IP and MAC addresses, as does the recipient computer within the same network segment.
- To form a packet, the sender includes its own IP and MAC addresses along with the recipient's IP address. The recipient's MAC address is initially unknown.
ARP Protocol Usage
- The Address Resolution Protocol (ARP) is employed to discover the recipient's MAC address based on its known IP address.
- An ARP request is sent to all devices on the local network asking for the MAC address corresponding to a specific IP address.
Handling Packets Across Different Networks
Complex Packet Transmission Scenario
- When sending packets to a recipient in another network, it’s necessary first to determine if they belong to different networks by checking their subnet addresses.
- If they do not share a subnet, packets must be forwarded through a router rather than directly delivered.
Router Interaction
- The sender identifies the router’s IP address using routing tables; then it needs to find out this router's MAC address via ARP.
- Once obtained, this MAC address replaces that of the original recipient in preparation for sending through the router.
Routing Process Between Networks
Packet Modification by Routers
- As packets traverse routers, their source and destination MAC addresses change while keeping their original IP addresses intact throughout transit.
Final Delivery Steps
- Upon reaching its final destination within another subnet, an ARP request is again made by routers or computers involved to ascertain local device MAC addresses before delivering packets correctly.
Summary of Layer Interactions
Key Takeaways on Layer Functionality
- Throughout transmission across various networks, only IP addresses remain constant; they identify senders and receivers regardless of how many routers intervene.
Role of Additional Protocol Elements