Computer Networking: Difference between revisions
Line 31: | Line 31: | ||
TCP/IP has four layers: | TCP/IP has four layers: | ||
<ol reversed> | <ol reversed> | ||
<li>Application layer</li> | |||
<li>Transport layer</li> | |||
<li>Internet layer</li> | |||
<li>Link layer</li> | <li>Link layer</li> | ||
</ol> | </ol> | ||
Revision as of 02:29, 22 January 2023
Computer networking theory
Reference Models
OSI Model
The OSI model presents the network stack using multiple layers. As a set of abstractions, each layer has their own standards which let it interoperate with layers above and below.
The layers are:
- Application layer
- Presentation layer
- Session layer
- Transport layer
- Physical layer
- Network layer
- Data link layer
- Physical layer
The physical layer is comprised of the literal copper, fiber, and wireless frequencies used to transport bits, 0s and 1s.
The data link layer focuses on transmitting data frames between directly connected nodes. Medium access control (MAC) and logical link control (LLC) work at this layer.
The network layer allows packets to flow between nodes which are not directly connected. Routing with IPs between networks happens at this layer.
The transport layer focuses on levels of reliability. TCP and UDP are used at this layer.
The session layer focuses on connections.
The presentation layer focuses on standardizing protocols and data representations (e.g. XML).
Finally, the application layer is what highest-level, whatever service is being provided to the user.
TCP/IP
TCP/IP has four layers:
- Application layer
- Transport layer
- Internet layer
- Link layer
Link Layer
Hardware
- Hub - A hub connects multiple devices and will pass around data frames to every single connection. It has no logic and is equivalent to wiring all the cables together.
- Repeater - A repeater is used to boost signals. It will read the pattern (e.g. voltage representing bits) and repeat it on another wire.
- Bridge or Switch - A switch connects multiple devices and does routing at this layer using mac addresses.
- Router - Routers work at the network layer to route packets across different networks (e.g. across VLANS or LAN to WAN).
Network Layer
Routing
Distance Vector
In Distance Vector routing, or Bell-ford Algorithm, each node incrementally builds up it's own routing table to identify the next hop to reach each destination.