Post

Network model

The TCP/IP five network model

 LayerProtocalContentAddress
5ApplicationHTTP, SMTP, etc…Messagen/a
4TransportTCP/UDPSegmentPort #’s
3NetworkIPPacket/DatagramIP Address
2Data LinkEthernet, Wi-FiFramesMAC address
1Physicaln/aBitsn/a

Physical layer

Define: Represents the physical devices that interconnect computers

062901

The physical layer consists of devices and means of transmitting bits across computer networks.

A bit is the smallest representation of data that a computer can understand. It’s zero or one.

These ones and zeros sense across networks at the lowest level are what make up the frames and packets of data that we’ll learn about when we cover the other layers.

Modulation

Ones and zeros are sent across those network cables through a process called modulation.

Modulation is a way of varying the voltage of this charge moving across the cable. When used for computer networks, this kind of modulation is more specifically known as line coding.

070501

It allows devices on either end of a link to understand that an electrical charge in a certain state is a zero and another state is one.

Through this seemingly simple technique, modern networks are capable of moving 10 billion ones and zeros across a single network cable every second.

Twisted pair cabling and duplexing
  • Twisted pair cabling is the most common type for connecting computing devices.
  • It consists of pairs of copper wires twisted together to protect against interference.
  • These cables allow for duplex communication, meaning information can flow in both directions.
  • Full duplex allows devices to communicate simultaneously in both directions.

070502

  • Half-duplex means communication is possible in both directions, but only one device can communicate at a time.
Why twisted?

Originally, telephone and early data cables included two copper wires, one for transmissiontting data and one for receiving data. The two wires laid parallel to one another.

This configuration was affected by electromagneticgnetic interference(EMI), radio frequency interference(RFI), and crosstalk between the two copper wires.

One of the initial engineering steps to resolve these issues involved twisting the wire pair together, which reduce some of the extra noise on the lines.

Define: Responsible for defining a common way of interpreting these signals so network devices can communicate.

The Ethernet standards also define a protocol responsible for getting data to nodes on the same network or link.

The protocol most widely used to send data across individual links is known as ethernet. Ethernet and the data link layer provide a means for software at higher levels of the stack to send and receive data.

One of the primary purposes of this layer is to essentially abstract away the need for any other layers to care about the physical layer and what hardware is in use.

For example, your web browser dosen’t need to know if it’s running on a device connected via twisted pair or wireless connection, it just need the underlying layers to send and receive data for it.

What Ethernet do?

Background: A collision domain is a network segment where only one device can speak at a time. This is because all data in a collision domain is sent to all the nodes connected to it.

If two computers were to send data across the wire at the same time, this would result in literal collisions of the electrical current representing our ones and zeros, leaving the end result unintelligible.

Ethernet as a protocol solve this problem by using a technique known as carrier sense multiple access with collision detection.

CSMA/CD

Used to determine when the communications channels are clear, and when a device is free to transmit data.

The way CSMA/CD works is actually pretty simple. If there’s no data currently being transmitted on the network segment, a node will feel free to send data. If it turns out that two or more computers end up trying to send data at the same time, the computers detect this collision and stop sending data.

Each device involved with the collision then waits a random interval of time before trying to send data again. This random interval, helps to prevent all the computers involved in the collision from colliding again the next time they try to transmit anything.

When a network segment is a collision domain, it means that all devices on that segment receive all communication across the entire segment. This means we need a way to identify which node the transmission was actually meant for.

This is where something known as a media access control address or MAC address comes into play.

MAC address

Meaning: A globally unique identifier attached to and individual network interface.

It’s a 48-bit number normally represented by six groupings of two hexadecimal numbers.

Another way to reference each group of numbers in a MAC address is an octet.

In octet, in computer networking is any number that can be represented by 8-bits. In this case, two hexdecimal digits can representsent the same numbers that 8-bits can.

A MAC address is split into two sections. The first three octets of a MAC address are known as the organizetionally unique ideatifier or OUI. These are assigned to individual hardware manufacturers by the IEEE, means that you can always identify the manufacturer of a network interface purely by its MAC address.

The last three octets of a MAC address can be assigned in any way that the manufacturer would like, with the condition that they only assign each possible address once to keep all MAC addresses globally unique.

070503

Ethernet uses MAC addressses to ensure that the data it sends has both an address for the machine that sent the transmission, as well was, the one that the transmission was intended for. In this way, even on a network segment acting as a single collision domain, each node on that network knows when traffic is intended for it.

Network layer

Define: Allows different networks to communicate with each other through devices known as routers.

A collection of networks connected together through routers, the most famous of these being the internet.

IP is the heart of the internet and most smaller networks worldwide.

Transport layer

Sorts out which client and server programs are supposed to get that data.

Application

There are lots of different protocols at this level; they’re application-specific.

Package being delivered

You can think of layers like different aspects of a package being delivered.

062902

  • The physical layer is the delivery truck and the roads.

  • The data link layer is how the delivery trucks get from one intersection to the next over and over.

  • The network layer identifies which roads need to be taken to get from address A to Address B.

  • The transport layer ensures the delivery driver knows how to knock on your door to tell you your package has arrived.

  • The application layer is the contents of the package itself.

Transport

Cables: Connect different devices to each other, allowing data to be transmitted over them.

Most network cables used today can be split into two categories:

  • copper

Copper cables are the most common form of networking cable.

They’re made up of multiple pairs of copper wires inside plastic insulators.

The sending device communicates binary data across these copper wires by changing the voltage between two ranges.

The system at the receiving end is able to interpret these voltage changes as binary ones and zeros, which can then be translated into different forms of data.

The most common forms of copper twisted-pair cables used in networking are Cat5, Cat5e, and Cat6 cables.

062903

Cat5e cables have mostly replaced those older Cat5 cables because their internals reduce Crosstalk. **Crosstalk **is when an electrical pulse on one wire is accidentally detected on another wire. So the receiving end can’t understand the data causing a network error.

  • fiber

062904

Fibre cables contain individual optical fibres, which are tiny tubes made out of glass about the width of human hair.

062901j

Unlike copper, which uses electrical voltages, fiber cables use pulses of light to represent the ones and zeros of the underlying data.

Fiber cables can generally transport data quicker than copper cables can, but they’re much more expensive and fragile.

FIber can also transport data over much longer distances than copper can without suffering potential data loss.

Hub

A hub is a physical layer device allowing for connections from many computers simultaneously.

062902j

All the devices connected to a hub will end up talking to all other devices at the same time.

It’s up to each system connected to the hub to determine if the incoming data was meant for them or to ignore it if it isn’t. This causes a lot of noise on the network and creates what’s called a collision domain.

062905

A collision domain is a network segment where only one device can communicate at a time.

Network switch

Since the hub is really slowing down network communications and is the primary reason hubs are rare. A much more common way of connecting many computers is with a more sophisticated device known as a network switch.

A switch is very similar to a hub since you can connect many devices to it so they can communicate.

The difference is that while a hub is a layer one or physical layer device, a switch is a layer two or data link device.

062903j

This means that a switch can inspect the contents of the ethernet protocol data being sent around the network, determine which system the data is intended for and then only send that data to that one system.

This reduces or even completely eliminates the size of collision domains on a network.

Routers

Hubs and switches are the primary devices used to connect computers on a single network, usually referred to as a LAN or a Local Area Network. But we often want to send or receive data to computers on other networks. This is where routers come into play.

A router is a device that knows how to forward data between independent networks.

  • A hub is a layer one device, and a switch is a layer two device.
  • A router operates at layer three, a network layer.

Just like a switch can inspect Ethernet data to determine where to send things, a router can inspect IP data to determine where to send things. Routers store internal tables containing information about how to route traffic between lots of different networks all over the world.

062906

A core router usually has many different connections to many other routers. Routers share data with each other via a protocol known as BGP or Border Gateway Protocol. That lets them learn about the most optimal paths to forward traffic.

The internet is incredibly large and complicated, and routers are global guides for getting traffic to the right places.

Severs and Clients

062904j

A server is something that provides data to something requesting that data.

The thing receiving the data is referred to as a client.

This post is licensed under CC BY 4.0 by the author.