CCNA
CCNA
1
WELCOME TO INTRODUCTION TO NETWORK
As shown in the figure, Ethernet standards define both the Layer 2 protocols and the Layer 1
technologies.
Ethernet and the OSI Model
2
WELCOME TO INTRODUCTION TO NETWORK
LLC Sublayer - This IEEE 802.2 sublayer communicates between the networking software at
the upper layers and the device hardware at the lower layers. It places information in the frame
that identifies which network layer protocol is being used for the frame. This information
allows multiple Layer 3 protocols, such as IPv4 and IPv6, to use the same network interface
and media.
MAC Sublayer - This sublayer (IEEE 802.3, 802.11, or 802.15 for example) is implemented
in hardware and is responsible for data encapsulation and media access control. It provides
data link layer addressing and is integrated with various physical layer technologies.
3
WELCOME TO INTRODUCTION TO NETWORK
Recall that legacy Ethernet using a bus topology or hubs, is a shared, half-duplex medium.
Ethernet over a half-duplex medium uses a contention-based access method, carrier sense
multiple access/collision detection (CSMA/CD) This ensures that only one device is
transmitting at a time. CSMA/CD allows multiple devices to share the same half-duplex
medium, detecting a collision when more than one device attempts to transmit
simultaneously. It also provides a back-off algorithm for retransmission.
Ethernet LANs of today use switches that operate in full-duplex. Full-duplex communications
with Ethernet switches do not require access control through CSMA/CD.
7.2.4. Ethernet Frame Fields
The minimum Ethernet frame size is 64 bytes and the expected maximum is 1518 bytes. This
includes all bytes from the destination MAC address field through the frame check sequence
(FCS) field. The preamble field is not included when describing the size of the frame.
Note: The frame size may be larger if additional requirements are included, such as VLAN
tagging. VLAN tagging is beyond the scope of this course.
Any frame less than 64 bytes in length is considered a “collision fragment” or “runt frame”
and is automatically discarded by receiving stations. Frames with more than 1500 bytes of
data are considered “jumbo” or “baby giant frames”.
If the size of a transmitted frame is less than the minimum, or greater than the maximum, the
receiving device drops the frame. Dropped frames are likely to be the result of collisions or
other unwanted signals. They are considered invalid. Jumbo frames are usually supported by
most Fast Ethernet and Gigabit Ethernet switches and NICs.
The figure shows each field in the Ethernet frame. Refer to the table for more information
about the function of each field.
The diagram shows the fields of an Ethernet frame. From left to right the fields and their
length are: Preamble and SFD, 8 bytes; destination MAC address, 6 bytes; source MAC
4
WELCOME TO INTRODUCTION TO NETWORK
address, 6 bytes; type / length, 2 bytes; data, 46 - 1500 bytes; and F C S, 4 bytes. Excluding
the first field, the total number of bytes in the remaining fields is between 64 – 1518 bytes.
Ethernet Frame Fields
6
WELCOME TO INTRODUCTION TO NETWORK
Given that 8 bits (one byte) is a common binary grouping, binary 00000000 to 11111111 can
be represented in hexadecimal as the range 00 to FF, as shown in the next figure.
Selected Decimal, Binary, and Hexadecimal Equivalents
7
WELCOME TO INTRODUCTION TO NETWORK
When using hexadecimal, leading zeroes are always displayed to complete the 8-bit
representation. For example, in the table, the binary value 0000 1010 is shown in hexadecimal
as 0A.
Hexadecimal numbers are often represented by the value preceded by 0x (e.g., 0x73) to
distinguish between decimal and hexadecimal values in documentation.
Hexadecimal may also be represented by a subscript 16, or the hex number followed by an H
(e.g., 73H).
You may have to convert between decimal and hexadecimal values. If such conversions are
required, convert the decimal or hexadecimal value to binary, and then to convert the binary
value to either decimal or hexadecimal as appropriate.
7.3.2. Ethernet MAC Address
In an Ethernet LAN, every network device is connected to the same, shared media. The MAC
address is used to identify the physical source and destination devices (NICs) on the local
network segment. MAC addressing provides a method for device identification at the data
link layer of the OSI model.
An Ethernet MAC address is a 48-bit address expressed using 12 hexadecimal digits, as
shown in the figure. Because a byte equals 8 bits, we can also say that a MAC address is 6
bytes in length.
All MAC addresses must be unique to the Ethernet device or Ethernet interface. To ensure
this, all vendors that sell Ethernet devices must register with the IEEE to obtain a unique 6
hexadecimal (i.e., 24-bit or 3-byte) code called the organizationally unique identifier (OUI).
8
WELCOME TO INTRODUCTION TO NETWORK
When a vendor assigns a MAC address to a device or Ethernet interface, the vendor must do
as follows:
Use its assigned OUI as the first 6 hexadecimal digits.
Assign a unique value in the last 6 hexadecimal digits.
Therefore, an Ethernet MAC address consists of a 6 hexadecimal vendor OUI code followed
by a 6 hexadecimal vendor-assigned value, as shown in the figure.
For example, assume that Cisco needs to assign a unique MAC address to a new device. The
IEEE has assigned Cisco a OUI of 00-60-2F. Cisco would then configure the device with a
unique vendor code such as 3A-07-BC. Therefore, the Ethernet MAC address of that device
would be 00-60-2F-3A-07-BC.
It is the responsibility of the vendor to ensure that none of its devices be assigned the same
MAC address. However, it is possible for duplicate MAC addresses to exist because of
mistakes made during manufacturing, mistakes made in some virtual machine implementation
methods, or modifications made using one of several software tools. In any case, it will be
necessary to modify the MAC address with a new NIC or make modifications via software.
Note: Ethernet NICs will also accept frames if the destination MAC address is a broadcast or
a multicast group of which the host is a member.
Any device that is the source or destination of an Ethernet frame, will have an Ethernet NIC
and therefore, a MAC address. This includes workstations, servers, printers, mobile devices,
and routers.
7.3.4. Unicast MAC Address
In Ethernet, different MAC addresses are used for Layer 2 unicast, broadcast, and multicast
communications. A unicast MAC address is the unique address that is used when a frame is
sent from a single transmitting device to a single destination device.
Click here to view how a unicast frame is processed. In this example the destination MAC
address and the destination IP address are both unicast.
In the example shown in the animation, a host with IPv4 address 192.168.1.5 (source)
requests a web page from the server at IPv4 unicast address 192.168.1.200. For a unicast
packet to be sent and received, a destination IP address must be in the IP packet header. A
corresponding destination MAC address must also be present in the Ethernet frame header.
The IP address and MAC address combine to deliver data to one specific destination host.
The process that a source host uses to determine the destination MAC address associated with
an IPv4 address is known as Address Resolution Protocol (ARP). The process that a source
host uses to determine the destination MAC address associated with an IPv6 address is known
as Neighbor Discovery (ND).
Note: The source MAC address must always be a unicast.
If the encapsulated data is an IPv4 broadcast packet, this means the packet contains a
destination IPv4 address that has all ones (1s) in the host portion. This numbering in the
address means that all hosts on that local network (broadcast domain) will receive and process
the packet.
Click here to view how a broadcast frame is processed. In this example the destination MAC
address and destination IP address are both broadcasts.
As shown in the animation, the source host sends an IPv4 broadcast packet to all devices on
its network. The IPv4 destination address is a broadcast address, 192.168.1.255. When the
IPv4 broadcast packet is encapsulated in the Ethernet frame, the destination MAC address is
the broadcast MAC address of FF-FF-FF-FF-FF-FF in hexadecimal (48 ones in binary).
10
WELCOME TO INTRODUCTION TO NETWORK
DHCP for IPv4 is an example of a protocol that uses Ethernet and IPv4 broadcast addresses.
However, not all Ethernet broadcasts carry an IPv4 broadcast packet. For example, ARP
Requests do not use IPv4, but the ARP message is sent as an Ethernet broadcast.
7.3.6. Multicast MAC Address
An Ethernet multicast frame is received and processed by a group of devices on the Ethernet
LAN that belong to the same multicast group. The features of an Ethernet multicast are as
follows:
There is a destination MAC address of 01-00-5E when the encapsulated data is an IPv4
multicast packet and a destination MAC address of 33-33 when the encapsulated data is an
IPv6 multicast packet.
There are other reserved multicast destination MAC addresses for when the encapsulated data
is not IP, such as Spanning Tree Protocol (STP) and Link Layer Discovery Protocol (LLDP).
It is flooded out all Ethernet switch ports except the incoming port, unless the switch is
configured for multicast snooping.
It is not forwarded by a router, unless the router is configured to route multicast packets.
If the encapsulated data is an IP multicast packet, the devices that belong to a multicast group
are assigned a multicast group IP address. The range of IPv4 multicast addresses is 224.0.0.0
to 239.255.255.255. The range of IPv6 multicast addresses begins with ff00::/8. Because
multicast addresses represent a group of addresses (sometimes called a host group), they can
only be used as the destination of a packet. The source will always be a unicast address.
As with the unicast and broadcast addresses, the multicast IP address requires a corresponding
multicast MAC address to deliver frames on a local network. The multicast MAC address is
associated with, and uses addressing information from, the IPv4 or IPv6 multicast address.
Click here to view how a multicast frame is processed. In this example, the destination MAC
address and destination IP address are both multicasts.
Routing protocols and other network protocols use multicast addressing. Applications such as
video and imaging software may also use multicast addressing, although multicast
applications are not as common.
7.3.7. Lab - View Network Device MAC Addresses
In this lab, you will complete the following objectives:
Part 1: Set Up the Topology and Initialize Devices
Part 2: Configure Devices and Verify Connectivity
Part 3: Display, Describe, and Analyze Ethernet MAC Addresses
11
WELCOME TO INTRODUCTION TO NETWORK
just forwarded every frame it received out all ports, your network would be so congested that
it would probably come to a complete halt.
A Layer 2 Ethernet switch uses Layer 2 MAC addresses to make forwarding decisions. It is
completely unaware of the data (protocol) being carried in the data portion of the frame, such
as an IPv4 packet, an ARP message, or an IPv6 ND packet. The switch makes its forwarding
decisions based solely on the Layer 2 Ethernet MAC addresses.
An Ethernet switch examines its MAC address table to make a forwarding decision for each
frame, unlike legacy Ethernet hubs that repeat bits out all ports except the incoming port. In
the figure, the four-port switch was just powered on. The table shows the MAC Address Table
which has not yet learned the MAC addresses for the four attached PCs.
Note: MAC addresses are shortened throughout this topic for demonstration purposes.
12
WELCOME TO INTRODUCTION TO NETWORK
In the figure for example, PC-A is sending an Ethernet frame to PC-D. The table shows the
switch adds the MAC address for PC-A to the MAC Address Table.
Note: If the source MAC address does exist in the table but on a different port, the switch
treats this as a new entry. The entry is replaced using the same MAC address but with the
more current port number.
13
WELCOME TO INTRODUCTION TO NETWORK
The switch adds the port number and MAC address for PC-D to its MAC address table.
Switch to PC-A
14
WELCOME TO INTRODUCTION TO NETWORK
Next, because the switch has destination MAC address for PC-A in the MAC Address Table,
it will send the frame only out port 1, as shown in the figure.
1. The switch receives another frame from PC-A and refreshes the timer for MAC address entry
port 1.
2. The switch has a reccent entry for the destination MAC address and filters the frame,
forwarding it only out port 4.
15
WELCOME TO INTRODUCTION TO NETWORK
Case1:
16
WELCOME TO INTRODUCTION TO NETWORK
Case 2:
Case 3:
17
WELCOME TO INTRODUCTION TO NETWORK
Case 4:
18
WELCOME TO INTRODUCTION TO NETWORK
19
WELCOME TO INTRODUCTION TO NETWORK
Fragment-free switching - In fragment-free switching, the switch stores the first 64 bytes of
the frame before forwarding. Fragment-free switching can be viewed as a compromise
between store-and-forward switching and fast-forward switching. The reason fragment-free
switching stores only the first 64 bytes of the frame is that most network errors and collisions
occur during the first 64 bytes. Fragment-free switching tries to enhance fast-forward
switching by performing a small error check on the first 64 bytes of the frame to ensure that a
collision has not occurred before forwarding the frame. Fragment-free switching is a
compromise between the high latency and high integrity of store-and-forward switching, and
the low latency and reduced integrity of fast-forward switching.
Some switches are configured to perform cut-through switching on a per-port basis until a
user-defined error threshold is reached, and then they automatically change to store-and-
forward. When the error rate falls below the threshold, the port automatically changes back to
cut-through switching.
7.5.3. Memory Buffering on Switches
An Ethernet switch may use a buffering technique to store frames before forwarding them.
Buffering may also be used when the destination port is busy because of congestion. The
switch stores the frame until it can be transmitted.
As shown in the table, there are two methods of memory buffering:
Method Description
Frames are stored in queues that are linked to specific incoming
and outgoing ports.
A frame is transmitted to the outgoing port only when all the
frames ahead in the queue have been successfully transmitted.
Port-based memory
It is possible for a single frame to delay the transmission of all the
frames in memory because of a busy destination port.
This delay occurs even if the other frames could be transmitted to
open destination ports.
Deposits all frames into a common memory buffer shared by all
switch ports and the amount of buffer memory required by a port is
dynamically allocated.
Shared memory
The frames in the buffer are dynamically linked to the destination
port enabling a packet to be received on one port and then
transmitted on another port, without moving it to a different queue.
Shared memory buffering also results in the ability to store larger frames with potentially
fewer dropped frames. This is important with asymmetric switching which allows for
different data rates on different ports such as when connecting a server to a 10 Gbps switch
port and PCs to 1 Gbps ports.
7.5.4. Duplex and Speed Settings
Two of the most basic settings on a switch are the bandwidth (sometimes referred to as
“speed”) and duplex settings for each individual switch port. It is critical that the duplex and
bandwidth settings match between the switch port and the connected devices, such as a
computer or another switch.
20
WELCOME TO INTRODUCTION TO NETWORK
There are two types of duplex settings used for communications on an Ethernet network:
Full-duplex - Both ends of the connection can send and receive simultaneously.
Half-duplex - Only one end of the connection can send at a time.
Autonegotiation is an optional function found on most Ethernet switches and NICs. It enables
two devices to automatically negotiate the best speed and duplex capabilities. Full-duplex is
chosen if both devices have the capability along with their highest common bandwidth.
In the figure, the Ethernet NIC for PC-A can operate in full-duplex or half-duplex, and in 10
Mbps or 100 Mbps.
S2 will continually experience collisions because S1 keeps sending frames any time it has
something to send.
21
WELCOME TO INTRODUCTION TO NETWORK
Duplex mismatch occurs when one or both ports on a link are reset, and the autonegotiation
process does not result in both link partners having the same configuration. It also can occur
when users reconfigure one side of a link and forget to reconfigure the other. Both sides of a
link should have autonegotiation on, or both sides should have it off. Best practice is to
configure both Ethernet switch ports as full-duplex.
7.5.5. Auto-MDIX
Connections between devices once required the use of either a crossover or straight-through
cable. The type of cable required depended on the type of interconnecting devices.
For example, the figure identifies the correct cable type required to interconnect switch-to-
switch, switch-to-router, switch-to-host, or router-to-host devices. A crossover cable is used
when connecting like devices, and a straight-through cable is used for connecting unlike
devices.
Note: A direct connection between a router and a host requires a cross-over connection.
Most switch devices now support the automatic medium-dependent interface crossover (auto-
MDIX) feature. When enabled, the switch automatically detects the type of cable attached to
the port and configures the interfaces accordingly. Therefore, you can use either a crossover
or a straight-through cable for connections to a copper 10/100/1000 port on the switch,
regardless of the type of device on the other end of the connection.
The auto-MDIX feature is enabled by default on switches running Cisco IOS Release
12.2(18)SE or later. However, the feature could be disabled. For this reason, you should
always use the correct cable type and not rely on the auto-MDIX feature. Auto-MDIX can be
re-enabled using the mdix auto interface configuration command.
7.5.6. Check Your Understanding - Switch Speeds and Forwarding Methods
What are two methods for switching data between ports on a switch? (Choose two.)
A. cut-off switching
B. cut-through switching
C. store-and-forward switching
22
WELCOME TO INTRODUCTION TO NETWORK
D. store-and-supply switching
E. store-and-restore switching
Which switching method can be implemented using fast-forward switching or fragment-
free switching?
A. cut-off switching
B. cut-through switching
C. store-and-forward switching
D. store-and-restore switching
Which two types of memory buffering techniques are used by switches? (Choose two.)
A. long-term memory buffering
B. port-based memory buffering
C. shared memory buffering
D. short-term memory buffering
What feature automatically negotiates the best speed and duplex setting between
interconnecting devices?
A. auto-MDIX
B. autobots
C. autonegotiation
D. autotune
A Layer 2 Ethernet switch makes its forwarding decisions based solely on the Layer 2
Ethernet MAC addresses. The switch dynamically builds the MAC address table by
examining the source MAC address of the frames received on a port. The switch forwards
frames by searching for a match between the destination MAC address in the frame and an
entry in the MAC address table. As a switch receives frames from different devices, it is able
to populate its MAC address table by examining the source MAC address of every frame.
When the MAC address table of the switch contains the destination MAC address, it is able to
filter the frame and forward out a single port.
Switch Speeds and Forwarding Methods
Switches use one of the following forwarding methods for switching data between network
ports: store-and-forward switching or cut-through switching. Two variants of cut-through
switching are fast-forward and fragment-free. Two methods of memory buffering are port-
based memory and shared memory. There are two types of duplex settings used for
communications on an Ethernet network: full-duplex and half-duplex. Autonegotiation is an
optional function found on most Ethernet switches and NICs. It enables two devices to
automatically negotiate the best speed and duplex capabilities. Full-duplex is chosen if both
devices have the capability along with their highest common bandwidth. Most switch devices
now support the automatic medium-dependent interface crossover (auto-MDIX) feature.
When enabled, the switch automatically detects the type of cable attached to the port and
configures the interfaces accordingly.
7.6.2. Module Quiz - Ethernet Switching
What will a host on an Ethernet network do if it receives a frame with a destination
MAC address that does not match its own MAC address?
A. It will discard the frame.
B. It will forward the frame to the next host.
C. It will remove the frame from the media.
D. It will strip off the data-link frame to check the destination IP address.
What is auto-MDIX?
A. a type of Cisco switch
B. an Ethernet connector type
C. a type of port on a Cisco switch
D. a feature that detects Ethernet cable type
Which two functions or operations are performed by the MAC sublayer? (Choose two.)
A. It is responsible for Media Access Control.
B. It performs the function of NIC driver software.
C. It adds a header and trailer to form an OSI Layer 2 PDU.
D. It handles communication between upper and lower layers.
E. It adds control information to network protocol layer data.
What type of address is 01-00-5E-0A-00-02?
A. an address that reaches every host inside a local subnet
B. an address that reaches one specific host
C. an address that reaches every host in the network
24
WELCOME TO INTRODUCTION TO NETWORK
26