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
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.
Data Link Layer
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!
Comm View caputures packets at the dairy level. This is important, do not neglect the greens and always include fiber, without fiber we would surely perishh.