Learn Networking
485 subscribers
24 photos
6 links
Learn Networking from Scratch.
Download Telegram
Ethernet:

Ethernet is the protocol that we are running on our LAN. So what layer(s) of the OSI model do you think Ethernet will describe? If you are thinking “Data link” layer you got it right but it also describes the physical layer.

Now here things will get a bit funky, Ethernet describes the Data link layer but it has been split up in two pieces, so it looks like this:
So there are sublayers called “LLC” which stands for Logical Link Control and “MAC” which stands for “Media Access Control”. You have probably seen or heard about MAC addresses before.

The logical link control layer does a couple of things like error correction. We don‟t care about this as much nowadays because we use TCP which does error correction on the transport layer.

Keep in mind that Ethernet was invented a long time ago and we used to have a lot of other network protocols besides IP like IPX, AppleTalk, Novell etc.
The MAC sublayer is more interesting to us; let me describe its functions and why we need it.

First of all every device on our LAN has a unique identifier on the data link layer, this is our “MAC address”. Just as an IP address is a unique identifier on the network layer (layer 3) we have the MAC address as a unique identifier on the data link layer (layer 2).

One of the other things that our MAC sublayer does is taking care of channel access. This makes it possible so computers connected to the same physical medium can access and share it. What do I mean by “same physical medium”? We have to take a little history lesson here.
Do you remember those network cables? If you don't…good for you!

All computers in the network were connected to a single long black coax cable (our physical medium) and were sharing the network.

A network like this was half-duplex which means that only 1 computer was able to send traffic and the others had to wait. Nowadays we have full-duplex which means all devices can send and receive at the same time!

This is our bus topology right here! What do you think would happen if two computers would start sending data at the exact same moment?

That's right…you get a collision! Electrical signals bouncing into each other and no data transmission at all…
Back to our MAC sublayer, if you are running a half-duplex network we need to make sure that whenever there's a collision on the network we have a solution.

There is one and this protocol is called CSMA/CD.
CS = Carrier Sense
MA = Multi Access
CD = Collision Detection
Carrier sense means we can “listen” on the cable to hear if anything is going on, in other words if another computer is sending data at this moment.

Multi access means everyone can access our physical medium but it has to be clear…no other computer should be sending at that moment.

In case 2 computers send at the same time we have a collision, since we can detect this (its carrier sense right) CSMA/CD will solve this as following:

- 1. The two computers that had the collision will start jamming the physical medium;
this will ensure nobody else can transmit at that moment.
- 2. The two computers each start a random clock.
- 3. When the time of the random clock elapses they retransmit.

Since the clock is random, both computers will have a different timer and one of them will send its data before the other.

By jamming the physical medium we will be certain that no other computer will get a chance to send data before them.
A MAC address is 48-bits and consists of a couple of fields:
- 1. BC which stands for broadcast; If your Ethernet frame is a broadcast than you have to set this bit to 1.
- 2. Local: this bit has to be set when you change your MAC address. Normally a MAC address is unique on the planet; if you change it it's only locally unique within your network.
- 3. OUI which stands for Organization Unique Identifier; every network vendor has received 22 bits that identifies them.
- 4. The last 24 bits are Vendor Assigned; the network vendor will use these bits to give each network device a unique MAC address.
We write down MAC addresses in hexadecimal so it will look like something like this:

00:00:0C:52:31:04
You have probably familiar seen UTP (Unshielded Twisted Pair) cabling but did you know we
have two different types of cables?
- Straight-through
- Crossover
The plug on the left side is straight-through and the one on the right side is crossover.
The difference is how the wires are connected in the RJ-45 plug.

A straight-through cable has the same wire layout on both sides.

Crossover cables have the crossover wire layout on one side and the straight-through on the other side.

Why do we care about this? Nowadays it doesn't matter much which cable you use since most computers, laptops and networking hardware is auto-sensing (it's called Auto-MDIX)
which means it will automatically detect how the wires are connected in the RJ-45 plug and it'll work.

If you are using Cisco routers or switches you need to make sure you use the correct cables though.
When and where do we need which cable?
- Hubs and switches are seen as “network devices”.
- Computers, servers and routers are seen as “host devices”.

Why do we call a router a host device and not a network device? Well try to think of it this way…if you don't configure a Cisco router it's not going to route anything for you and it's nothing more but a “computer”.
We need to enable a routing protocol ourselves…besides it will help you remember which cable you need to use.

More about routing later!
- Network device <-> Host device: straight-through cable.
- Host device <-> Host device: crossover cable.
- Network device <- -> Network device: crossover cable.

So between a computer and a switch you will use a straight-through cable.
Connect 2 switches to each other and you'll need a crossover cable, the same applies if you connect to
routers to each other. Router to computer (both host devices) you need a crossover cable
as well.
Do you know what the official name is for the blue Cisco console cable? You need this cable to configure your switch or router from your computer.
It‟s called a rollover cable.
Cisco IOS:
Just like a computer a switch or router requires an operating system to support the hardware.
Cisco IOS is the operating system that you will find on the switches and routers and some other devices like wireless access points.

When you work with Cisco routers and switches you will do most of the configuration using the CLI (Command Line Interface).

For some of you this might prove challenging in the beginning and it will take some time to become familiar with the CLI, however once you get used to it I promise that it‟s the fastest and most convenient method to configure routers or switches.

The CLI can be accesses by using the blue Cisco console cable (it‟s called a rollover cable) or remotely using telnet or SSH.
Cisco also offers a GUI (Graphical User Interface):
- CNA (Cisco Network Assistant) for switches.
- SDM (Security and Device Manager) or CCP (Cisco Configuration Professional) for routers.

SDM was the first version of the GUI but now it has been replaced by CCP.

The advantage of a GUI is that it has wizards that let you configure complex things with a few clicks.

The downside however is that:
A) you might have no idea what you are doing.
B) when you need to troubleshoot you'll need the CLI 9 out of 10 times. I'm not a big fan of the GUI but it's best to see for yourself.
We will start with the basic configuration of a cisco device.

First I will use a switch to demonstrate the CLI but the same commands work on a router.

Secondly I will demonstrate CCP on a router.