Some textbooks say that the packet is fully created when it reaches the physical layer, although the actual final construction is layer 2 (Data link layer).
Then again, some textbooks will say that the packet is fully created in layer 2 and is transmitted out the physical layer as a frame.
Network Layer
osi
network layer
Networklayer
Packets
Packets
Network
The process of using a router to inspect and filter packets for acceptable and unacceptable activity at the network level of the OSI model is known as packet filtering. This technique involves analyzing the headers of packets to determine whether they should be allowed through or blocked based on predefined security rules. Packet filtering is commonly implemented in firewalls and helps to enhance network security by controlling traffic flow.
Data Link Layer
A hub (or L2 switch) performs data bridging/switching/forwarding at the OSI Layer 2 level for data destined to another address on the same subnet. For data to be forwarded to another subnet, that data must be routed at the OSI Layer 3 level which is performed by a Router (or L3 Switch). Routers collect various information about other networks it can forward traffic to and from, what routing protocols are used and which path(s) to forward that data to.
It operates on the data link layer of the OSI model (level 2). The switch creates a separate collision domain for each port. Although some switches operate on level 3 of the model and are called multi-layer switches.
Transport!