Cisco Local Area Network Layer 2 – Ethernet

In this Cisco CCNA tutorial, you’ll learn about Layer 2 of the OSI reference model, which is the Data Link layer. Scroll down for the video and also the text tutorial.

Cisco Local Area Network Layer 2 – Ethernet Video Tutorial

YouTube video

Aung Phone

I want to thank you for helping me achieve this CCNA certificate. Thanks to you and your easy to digest lessons, I passed with 918!

Aung Phone

Layer 2 – The Data Link Layer

 

Layer 2 frames are encoded and decoded into bits ready to put on to the Physical Layer, the physical wire. Error detection and correction for the Physical Layer can be provided here, depending on the protocol that we're using.

 

Ethernet is the Layer 2 medium that is used on Local Area Networks. Ethernet is pretty much ubiquitous on the LAN, and that's the Layer 2 media that we're going to focus on.

 

Layer 2 – The Data Link Layer

 

Let's have a look at some of the different Layer 2 protocols. I've got a link going to a page on Wikipedia where there's a list of network protocols above. Open that up and at the top, it lists there some of the common Layer 1 protocols, like ISDN, DSL. There's a lot of legacy protocols that are still listed here as well, like ISDN which isn't used so much these days.

 

Then, you can see the list of Layer 2 protocols as well. Ethernet is in here, most commonly used on the LAN. There's a legacy WAN protocol in here,  Frame Relay. Other kinds of protocols we've got in here are FDDI and the Point-to-Point Protocol (PPP).

 

OSI Reference Model - Encapsulation

 

The next thing I wanted to do was just clear up any misunderstanding you may have about the terminology. When a packet is composed, obviously it's composed by the sender, and it's going to put it on the wire and send it to the receiver.

 

As we go down through the OSI model, the sender will start at the top layer, the Application Layer, and it will compose that part of the PDU. Then, Layer 7 will get encapsulated in the Layer 6 header. At that point, is called the data.

 

OSI Reference Model - Encapsulation

 

We then encapsulate it in the Layer 5 header and then in the Layer 4 header. We put the Layer 4 header on there, and at that point, it's called a segment.

 

OSI Reference Model - Encapsulation 1

 

Then the Layer 3 header goes on. At that point, it's called a packet.

 

OSI Reference Model - Encapsulation 2

 

Finally, Layer 2, the Data Link Layer, will go on. At that point, it's called a frame.

 

OSI Reference Model - Encapsulation 3

 

However, when the sender is sending traffic to the receiver, it's not like it sends segments, packets, and frames separately. They're all part of the same PDU. It's just terminology that we're talking about here.

 

We send that one PDU and when we're looking at it from the point of view of Layer 4, we call it the segment. From the point of view of Layer 3, it's a packet, and from the point of view of Layer 2, it's a frame.

 

The Ethernet Header

 

Moving on, let's look at the Layer 2 Ethernet header. It is Ethernet that we're using as our Layer 2 protocol. At the start of the header, we've got the preamble. That's used to help the sender and receiver to synchronize.

 

We then have the Layer 2 destination and source address, that's the MAC address when we're using Ethernet. We then have the ethertype, which is used to specify what is encapsulated inside the Ethernet header. That will typically be IPv4.

 

We then have the data and the FCS. The FCS is the Frame Check Sequence. That's a cyclical redundancy check, which is used to check for the integrity of the frame to check that it has not been corrupted during transit.

 

The Ethernet Header

 

The Media Access Control (MAC) Address

 

Now, let's look at the Layer 2 Ethernet address, which is the MAC address. MAC stands for Media Access Control. The MAC address is a 48-bit hexadecimal address. If we look back at the Ethernet header, we have 6 bytes, each byte is 8 bits. So, 6 times 8, that's where we get the 48 bits from.

 

The MAC address is split into two different halves that make up the MAC address. The first half, the first 24 bits, is the OUI. Which stands for Organizationally Unique Identifier. The identifier is the manufacturer of the Ethernet port.

 

So if you've got a Cisco router or switch, and it's got an Ethernet port on there, it will have a MAC address and the first half of the MAC address is Cisco's identifier. If you had a network card, and that network card came from IBM, for example, the first half of the MAC address is going to be IBM's identifier.

 

The second half of the address, the last 24 bits, is assigned by the manufacturer. The burned-in MAC address on every NIC port in the world is globally unique. The actual number of potential addresses is 2 to the power of 48. This is absolutely a big number.

 

There's a lot of possible MAC address, so that makes it possible for every Ethernet port in the world to have a unique MAC address.

 

The Media Access Control (MAC) Address

 

An important point that I want to make here is that there is no logical addressing with your MAC addresses. It's just one big flat address space. We could have a PC with a network card from IBM, so it's going to have an IBM MAC address on there. That could be in New York.

 

We could have another one also from IBM in Beijing, and another PC from IBM in London. They're not grouped together. There's no kind of a logical order with your MAC addresses, just one big flat address space.

 

With IP addresses, there is a logical order there. That's how we, as administrators, are going to control our networking.

 

I also want you to know how to get information about the MAC address. To get the MAC address on a Windows machine, open up a command prompt, and then enter the command:

ipconfig /all

 

In Linux, the command will be:

ifconfig

 

Finally, let's have a look at a Cisco router or switch. I'm going to open up a Putty session, and I'm going to SSH onto my router. I need to enter enable to get to the enable prompt, and then the command is:

show interface

 

This is going to give me a heap of output about all my different interfaces. I could also have just entered one interface if I wanted to, to more target the output. I can see on FastEthernet0/0 that the address is 0018.7374.8d56.

 

In brackets here, it tells me the BIA. That's the burned-in address, and it's exactly the same value here. The reason there's a difference, it is possible in software to change the MAC address on an interface, but normally we won't do that. Normally, we'll just leave it at the burned-in address from the manufacturer.

 

Additional Resources

 

Introduction to the OSI Model: https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/introduction-to-the-osi-model

Layer 2 Switching: https://study-ccna.com/layer-2-switching/

 

Want to practice Cisco CCNA technologies on your laptop? Download my complete 350-page Cisco CCNA Lab Guide for free.

 

Click Here to get my Cisco CCNA Gold Bootcamp, the highest rated CCNA course online with a 4.8 star rating from over 20,000 public reviews.

Libby Teofilo

Text by Libby Teofilo, Technical Writer at www.flackbox.com

With a mission to spread network awareness through writing, Libby consistently immerses herself into the unrelenting process of knowledge acquisition and dissemination. If not engrossed in technology, you might see her with a book in one hand and a coffee in the other.