General Basic Networking

While this page is not directly about Linux, it does contain general networking concepts that will help you in troubleshooting networks on Linux.

1. network layers

1.1. Seven OSI layers

When talking about protocol layers, people usually mention the seven layers of the osi protocol (Application, Presentation, Session, Transport, Network, Data Link and Physical). We will discuss layers 2 and 3 in depth, and focus less on the other layers. The reason is that these layers are important for understanding networks. You will hear administrators use words like “this is a layer 2 device” or “this is a layer 3 broadcast”, and you should be able to understand what they are talking about.

1.2. Four DoD layers
The DoD (or tcp/ip) model has only four layers, roughly mapping its network access layer
to OSI layers 1 and 2 (Physical and Datalink), its internet (IP) layer to the OSI network
layer, its host-to-host (tcp, udp) layer to OSI layer 4 (transport) and its application layer
to OSI layers 5, 6 and 7.
Below an attempt to put OSI and DoD layers next to some protocols and devices.

1.Physical Layer: short introduction to the physical layer

The physical layer, or layer 1, is all about voltage, electrical signals and mechanical connections. Some networks might still use coax cables, but most will have migrated to utp (cat 5 or better) with rj45 connectors. Devices like repeaters and hubs are part of this layer. You cannot use software to ‘see’ a repeater or hub on the network. The only thing these devices are doing is amplifying electrical signals on cables. Passive hubs are multiport amplifiers that amplify an incoming electrical signal on all other connections. Active hubs do this by reading and retransmitting bits, without interpreting any meaning in those bits. Network technologies like csma/cd and token ring are defined on this layer. This is all we have to say about layer 1 in this page.

2. Data Link Layer: short introduction to the data link layer

The data link layer, or layer 2 is about frames. A frame has a crc (cyclic redundancy check). In the case of ethernet (802.3), each network card is identifiable by a unique 48-bit mac address (media access control address). On this layer we find devices like bridges and switches. A bridge is more intelligent than a hub because a bridge can make decisions based on the mac address of computers. A switch
also understands mac addresses. In this page we will discuss commands like arp and ifconfig to explore this layer.

3. Network Layer: short introduction to the network layer

Layer 3 is about ip packets. This layer gives every host a unique 32-bit ip address. But ip is not the only protocol on this layer, there is also icmp, igmp, ipv6 and more. A complete list can be found in the /etc/protocols file. On this layer we find devices like routers and layer 3 switches, devices that know (and have) an ip address. In tcp/ip this layer is commonly referred to as the internet layer.

4. Transport Layer:  short introduction to the transport layer

We will discuss the tcp and udp protocols in the context of layer 4. The DoD model calls this the host-to-host layer.

Layers 5, 6 and 7

The tcp/ip application layer includes layers 5, 6 and 7. Details on the difference between these layers are out of scope of this course.

Thanks for your reading, if you have any questions, please drop your comment below.

Sophat Saom

Senior System Engineer, VCP

View my other posts

Leave a Reply

Your email address will not be published. Required fields are marked *