Download Chapter 9

Document related concepts

Airborne Networking wikipedia , lookup

Parallel port wikipedia , lookup

RS-232 wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

IEEE 1394 wikipedia , lookup

Passive optical network wikipedia , lookup

Computer network wikipedia , lookup

I²C wikipedia , lookup

CAN bus wikipedia , lookup

IEEE 1355 wikipedia , lookup

Registered jack wikipedia , lookup

Network tap wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

AppleTalk wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Wake-on-LAN wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Virtual LAN wikipedia , lookup

Power over Ethernet wikipedia , lookup

Transcript
Ethernet
Network Fundamentals
Chapter 9
Objectives



Identify the basic characteristics of network
media used in Ethernet.
Describe the physical and data link features
of Ethernet.
Describe the function and characteristics of
the media access control method used by
Ethernet protocol.
Objectives



Explain the importance of Layer 2 addressing
used for data transmission and determine
how the different types of addressing impacts
network operation and performance.
Compare and contrast the application and
benefits of using Ethernet switches in a LAN
as opposed to using hubs.
Explain the ARP process.
Outline

Overview of Ethernet






Ethernet: standards and implementation
Ethernet: layer 1 and layer 2
Logical Link Control: connecting to the upper layers
MAC: getting data to the media
Physical implementations of Ethernet
Ethernet: communication through the LAN




Historic Ethernet
Legacy Ethernet
Current Ethernet
Moving to 1Gbps and beyond
Outline

Ethernet frame






Ethernet MAC




Frame: encapsulating the packet
Ethernet MAC address
Hexadecimal numbering and addressing
Another layer of addressing
Ethernet unicast, multicast and broadcast
CSMA/CD: the process
Ethernet timing
Interframe spacing and backoff
Ethernet physical layer

10-Mbps Ethernet
Outline




Hubs and switches




100-Mbps Ethernet (Fast Ethernet)
1000-Mbps Ethernet (Gigabit Ethernet)
10-Gbps and Future Ethernet
Legacy Ethernet: using hubs
Ethernet: using switches
Switches: selective forwarding
Address Resolution Protocol (ARP)



Resolving IPv4 addresses to MAC addresses
Maintaining a cache of mappings
ARP broadcast issues
Overview of Ethernet

Ethernet is one of the LAN standards.




There were several other LAN standards such as Token
Ring, FDDI, etc.
However, nowadays, Ethernet is the dominant
standard used in LANs.
The initial Ethernet specifies a 10Mbps LAN
standard using coaxial cable.
Over time, Ethernet has evolved to use other
transmission media as well as higher data rate.
Ethernet: Standards and
Implementation


The first Ethernet standard was published in
1980 by a consortium of Digital Equipment
Corporation, Intel and Xerox (DIX).
Ethernet was then standardized by IEEE in
1985 under the standard 802.3.


Ethernet is also called IEEE 802.3
This standard includes layer 1 (physical
layer) and part of layer 2 (data link layer) of
the OSI model.
Ethernet: Layer 1 and Layer 2
Ethernet: Layer 1 and Layer 2

Ethernet includes two standards:



IEEE 802.3 – for physical layer and the MAC sublayer of
the data link layer.
IEEE 802.2 – for the LLC sublayer of the data link layer.
Layer 1 elements specified by Ethernet:




Signals
Bit streams that travel on the media
Physical components that put signals on the media
Network topologies
Ethernet: Layer 1 and Layer 2

Layer 2 elements specified by Ethernet:





The MAC sublayer is concerned with the physical
components that are used to communicate
information and prepare data for transmission over
that media.


Provides an interface to the upper-layer protocols
Provides an address to identify devices
Uses frames to organize bits into meaningful groups
Controls the transmission of data from sources
Will be different for different media.
The LLC sublayer, on the other hand, is
independent of the physical equipment used.
Logical Link Control: Connecting
to the Upper Layers


LLC manages the communication between the
networking software at the upper layers and
hardware at the lower layers.
LLC is implemented in software and is independent
of the physical equipment.



LLC can be considered the driver software for the network
interface card (NIC).
The driver program interacts directly with the hardware on
the NIC to pass the data between the media and the MAC
sublayer.
LLC takes the Network layer PDU (IPv4 packet) and
adds control information to deliver the packet to the
destination node.
MAC: Getting Data to the
Media


The MAC sublayer is implemented in hardware (the
NIC).
It has two main responsibilities:




Data encapsulation
Performing media access control (MAC)
Data encapsulation involves the process of adding a
header and a trailer to layer 3 PDUs.
There are three functions of data encapsulation:


Frame delimiting – to identify the start and end of frame.
Addressing – to specify the source and destination MAC
address
MAC: Getting Data to the
Media


Media access control is performed to control how
and when the nodes gain access to the media.



Error detection – to add CRC (cyclic redundancy check)
code to the trailer to be used by the receiver to detect bit
errors
This includes what to do to recover from collision.
For historic and legacy Ethernet networks, this is done
using CSMA/CD.
Media access control also defines when to decide to
accept a frame.

This is done by examining the destination MAC address
inside the frame header.
Physical Implementations of
Ethernet

The first Ethernet was developed back in 1970s.


Since then, it has evolved to meet the increased
demand for high-speed LANs.



Started with 10 Mbps Ethernet.
Today, the fastest Ethernet can achieve data rate up to 10
Gbps.
Also used in WANs (wide area networks) and MANs
(metropolitan area networks).
There are various Ethernet standards to support
different data rate, transmission media and
connector specification.
Physical Implementations of
Ethernet

To ensure compatibility between the various
standards, Ethernet uses the same frame
structure.


As a result, the different Ethernet standards can
be used together in a single LAN.
Reasons for Ethernet success:




Simplicity and ease of maintenance
Ability to incorporate new technologies
Reliability
Low cost of installation and upgrade.
Historic Ethernet


The original Ethernet design uses a shared bus
topology.
There were two standards:




10BASE2 (Thinnet) – uses thin coaxial cable.
10BASE5 (Thicknet) – uses thick coaxial cable.
These early Ethernet standards were deployed in
low bandwidth (10 Mbps) LANs.
Due to the use of bus topology, collision may
happen.

Therefore, access to the media was managed by CSMA,
and later CSMA/CD.
Historic Ethernet
Legacy Ethernet

This generation of Ethernet is characterized by the
use of UTP cable and physical star topology.



However, the logical topology is still a bus.





Hosts are connected to a hub using UTP cable.
This Ethernet standard is called 10BASE-T.
A hub broadcast incoming frame to all outgoing ports.
Only one station can transmit at a time (half-duplex).
Collision may happen.
Access to the media is managed using CSMA/CD.
Later, the use of a hub is replaced with a switch.

This minimizes the possibility of collisions and increases
the performance and reliability of Ethernet.
Legacy Ethernet
Current Ethernet

This Ethernet standard has a data rate of 100 Mbps.


The use of hubs has been replaced with switches.


This leads to point-to-point logical topology.
A switch can forward incoming frame only to the port
that leads to the receiver.




The standard is called 100BASE-T (Fast Ethernet).
This minimizes the possibility of collisions.
Eliminates the necessity to perform CSMA/CD.
It also enables the hosts to have the full bandwidth of the
media.
Later switch implementation also support full-duplex
communications.
Current Ethernet
Topology
physical: Star
Logical: Point-to-point
Moving to 1 Gbps and Beyond

Ethernet nowadays can operate at the rate of 1
Gbps (1000 Mbps) or even 10 Gbps (10000 Mbps).



Switch is still used as the connecting device.


These are called Gigabit Ethernet and 10-Gigabit Ethernet
respectively.
This higher speed is necessary to properly support Voice
over IP (VoIP) and multimedia applications.
However, the switch must have full-duplex capability.
In addition to UTP cable, fiber optic cable can also
be used.


Fiber optic cable will allow for greater distance.
This enables Ethernet to be used in WANs and MANs.
Moving to 1 Gbps and Beyond
Ethernet Frame

All Ethernet standards use the same frame
structure.


There are three versions of Ethernet frame:




Ethernet has a header and a trailer.
DIX
IEEE 802.3 (Original)
IEEE 802.3 (Revised 1997)
An Ethernet frame has minimum size of 64 bytes
and maximum size of 1518 bytes.

Any received frame not within this size will be considered
as corrupted and will be discarded.
Ethernet Frame
Ethernet Frame

Preamble and start frame delimiter


Destination address


The MAC address of the receiver.
Source address


To synchronize sending and receiving devices.
The MAC address of the sender.
Length/Type



Can either be a length or a type value.
Length refers to the length of the data field.
Type refers to the upper-layer protocol.
Ethernet Frame

Data and pad



Contains layer 3 PDU (an IPv4 packet).
All frames must be at least 64 bytes long. If the
data is small, it needs to be pad with zeros so that
the frame reaches its minimum size.
Frame check sequence (FCS)


Contains the error correction code for error
detection.
The code is generated by the sender using a
technique called CRC (cyclic redundancy check).
Ethernet MAC Address

Each NIC has a unique MAC address.


In a LAN with a logical bus topology (such as
Ethernet), a frame sent will be received by all hosts
in the LAN.


This address is burned inside the NIC’s ROM and cannot
be changed.
The hosts will decide whether they will take or discard the
frame based on the destination MAC address inside the
header.
An Ethernet MAC address is a 48-bit binary value,
expressed in 12 hexadecimal digits.
Ethernet MAC Address

There are two parts to the MAC address:



The OUI is assigned by IEEE and is unique for each
NIC manufacturer.



Organization Unique Identifier (OUI) – 24 bits.
Vendor assigned – 24 bits.
For example, Cisco is assigned the OUI “00 60 2F”.
The other 24 bits are then assigned by the vendor
uniquely to every NIC that they produce.
From Windows command prompt, you can check
your MAC address by typing “ipconfig /all”.
Ethernet MAC Address
Hexadecimal Numbering and
Addressing

Hexadecimal (“hex”) is a convenient way to
represent binary values.




Decimal – base 10 number system
Binary – base 2 number system
Hex – base 16 number system
Each hexadecimal digit represents a 4-bit
value.


Hex digit ranges from 0 to 9 and A to F.
Hex number is normally preceded by 0x
(example: 0x73).
Hexadecimal Numbering and
Addressing
Another Layer of Addressing

A network host has two addresses:



Layer 3 address – IP address
Layer 2 address – MAC address
Although both addresses are unique for a host, they
serve different purpose.


IP address is hierarchical and is used to carry packet from
source to destination host across the Internet (or any
TCP/IP network).
MAC address is non-hierarchical and is used to carry
frame from source to destination host across the local
media (example: a LAN, a point-to-point WAN connection).
Ethernet Unicast, Multicast
and Broadcast

Unicast: sending frame to a single host



Broadcast: sending frame to all hosts in a network.



IP address: IP address of receiving host.
MAC address: MAC address of receiving host.
IP address: broadcast address of the targeted network (for
directed broadcast) or 255.255.255.255 (for limited
broadcast).
MAC address: FF-FF-FF-FF-FF-FF
Multicast: sending frame to a group of hosts


IP address: a multicast IP address that identifies the group.
MAC address: a special address that starts with 01-00-5E,
followed by the lower 23 bits of the multicast IP address
and followed by a 0.
Ethernet MAC

Ethernet uses the media access control (MAC)
method called CSMA/CD.



Only used in historical and legacy Ethernet (physical bus
topology and physical ring topology using hub).
If a switch is used instead of a hub, the use of CSMA/CD is
not required.
CSMA/CD is used to prevent and recover from
collision.


Collision refers to the condition where signals from two or
more hosts get mixed up in the media.
Can happen in any shared media environment.
CSMA/CD: The Process

There are three steps in CSMA/CD process:

Listen before sending



Each device must listen to the media before
transmitting a frame.
Transmission is only done if there is no other signal on
the media.
Detecting a collision


While transmitting, the device keeps listening to the
media to check if collision occurs.
Collision can be detected when the signal on the
media is jumbled up as the result of the collision.
CSMA/CD: The Process

Jam signal and random backoff




If collision is detected, a jam signal is transmitted so
that all other devices know about the collision.
All devices involved in the collision would then invoke
a backoff algorithm which will cause them to stop
transmitting for a random amount of time.
After the random backoff timer expires, the device
would go back to the “listen before sending” mode.
The random backoff timer will make sure that the
devices would not transmit at the same time again and
cause another collision.
Hubs and Collision Domain


Collision can occur in any shared media topology,
even when using CSMA/CD.
Conditions that lead to the increase in collision:




More devices connected to the network
More frequent access to the media
Increased cable distances between devices
In legacy Ethernet, the size of the network can be
increased with the use of hub or repeater.

Done by connecting a hub to another hub.
Hubs and Collision Domain

A series of devices connected using hubs or
repeaters creates a collision domain.



A collision domain is the area of the network which will be
affected when collision occurs.
Using hubs and repeaters will increase the size of the
collision domain.
For good performance, it is desirable to keep the
size of the collision domain to be as small as
possible.

This is achieved by using switch instead of hub to increase
the network size (add more devices).
Ethernet Timing

In order to properly manage collision, there are
several issues related to timing that need to be
considered.





Latency
Timing and synchronization
Bit time
Slot time
These issues may put a limit on some of the network
characteristics such as number of hubs used,
maximum cable length and minimum frame size.
Ethernet Timing – Latency

Latency refers to the time it takes for the
electrical signal to travel down the cable.


Each hub in the signal path will increase latency.
Longer latency would increase the possibility of
collision.


This is because it takes a longer time for a device at
one end of the network to listen for the signal from
another device at the other end of the network.
Without being able to detect the signal from the first
device soon enough, the second device will transmit
and cause collision.
Ethernet Timing – Timing and
Synchronization


Synchronization refers to the method used to get the
receiver to synchronize with the signal’s frequency.
This is done using 64 bits of timing synchronization
information (called preamble bits) in the Ethernet
header.



Used in 10 Mbps Ethernet.
Asynchronous communication.
100 Mbps and faster Ethernet use signaling
methods that include a method of synchronization.


The preamble bits in the header are not required, although
they are retained for compatibility reasons.
Synchronous communication.
Ethernet Timing – Bit Time

Bit time refers to the time it takes for a bit to be
placed and sensed on the media.





10 Mbps Ethernet: bit time = 100 ns
100 Mbps Ethernet: bit time = 10 ns
1 Gbps Ethernet: bit time = 1 ns
10 Gbps Ethernet: bit time = 0.1 ns
For CSMA/CD to operate, a sending device must
become aware of collision before it has completed
the transmission of a minimum-sized frame.


With shorter bit time, shorter cable is needed for this to
happen.
This puts a limit on the maximum cable length.
Ethernet Timing – Slot Time

Slot time refers to the maximum time required to
detect a collision.



Equal to twice the time it takes for a signal to travel
between two most-distant stations on the network.
The slot time must be set such that if a collision is
going to occur, it will be detected within the
transmission time of a minimum-size frame.
Ethernet slot times:



10 Mbps Ethernet: 512 bit times (51200 ns)
100 Mbps Ethernet: 512 bit times (5120 ns)
1 Gbps Ethernet: 4096 bit times (4096 ns)
Ethernet Timing – Slot Time


The slot time specified also includes the time it takes
for the signal to travel through cables and hubs.
This is then used to define the standard for:



The maximum length of network cables
The maximum number of hubs that can be used in a
shared Ethernet segment.
Using cables that are longer than the one specified
by the standard will create late collision detection.


Collision that is detected too late cannot be managed by
CSMA/CD (Ethernet will not handle the frame
retransmission).
The receiving software would then need to initiate a
retransmission.
Interface Spacing and Backoff

After a node has transmitted, a delay needs to occur
before the next transmission.



The delay after successful transmission is called
interframe spacing.


This give time for the signals in the media to dissipate.
It is required regardless of whether the frame is transmitted
successfully or not (due to collision).
Interframe spacing = 96 bit times
The delay after a collision is called backoff.


Backoff time = interframe spacing + (some random time)
The random time will be different for each device to prevent
them from transmitting at the same time and cause another
collision.
Ethernet Physical Layer

The differences between Ethernet, Fast Ethernet,
Gigabit Ethernet and 10-Gigabit Ethernet occur at
the physical layer.






10 Mbps: 10BASE-T Ethernet
100 Mbps: Fast Ethernet
1 Gbps (1000 Mbps): Gigabit Ethernet
10 Gbps: 10-Gigabit Ethernet
For each data rate, there are several Ethernet types.
There are 3 identifiers in an Ethernet type:



Speed (in Mbps)
Type of signaling used (baseband or broadband)
Cable distance or type of medium used
Ethernet Physical Layer
Ethernet Type
Bandwidth
Cable Type
Max distance (m)
10BASE5
10Mbps
Thick coax
500
10BASE2
10Mbps
Thin coax
185
10BASE-T
10Mbps
Cat3/Cat5 UTP
100
100BASE-TX
100Mbps
Cat5 UTP
100
100BASE-FX
100Mbps
Multimode/single
mode fiber
400/2000
1000BASE-T
1 Gbps
Cat5e UTP
100
1000BASE-TX
1 Gbps
Cat6 UTP
100
1000BASE-SX
1 Gbps
Multimode fiber
550
1000BASE-LX
1 Gbps
Single mode fiber
2000
10GBASE-T
10 Gbps
Cat6a/Cat7 UTP
100
10GBASE-LX4
10 Gbps
Multimode/single
mode fiber
300/10,000
10-Mbps Ethernet

There are three 10 Mbps Ethernet standards:


10BASE5 and 10BASE2 are early Ethernet
standards.




10BASE5, 10BASE2 and 10BASE-T
Used coaxial cable.
Connected in physical bus topology.
No longer used nowadays.
All 10 Mbps Ethernet today uses the 10BaseT standard.
10-Mbps Ethernet

10BASE-T Ethernet has the following
characteristics:





Uses Cat3 or Cat5 UTP cable.
Uses a physical star topology, with a hub at the center.
The maximum length for the UTP cable is 100 meter.
Uses Manchester encoding over two unshielded twistedpair cable.
The UTP cable used has the following
characteristics:



It has four-pair of copper wires, terminated at each end
with an 8-pin RJ-45 connector.
Pin 1 and 2 are used for transmitting
Pin 3 and 6 are used for receiving.
100-Mbps Ethernet (Fast
Ethernet)

There are two popular 100-Mbps Ethernet
standards:



100BASE-TX and 100BASE-FX
100BASE-TX supports 100 Mbps transmission over
UTP cable.
Most of the implementation details of 100BASE-TX
are similar to 10BASE-T except for the following:



The UTP cable used must be Cat5 or better.
It uses the 4B/5B encoding.
A switch is typically used instead of a hub.
100-Mbps Ethernet (Fast
Ethernet)


100BASE-FX is similar to 100BASE-TX except that
it uses fiber optic cable instead of UTP cable.
100BASE-FX is commonly used to interconnect two
devices in a point-to-point fashion.




Between two computers
Between a computer and a switch
Between two switches
A switch supporting 100BASE-FX normally have
only one fiber interface (as opposed to many UTP
cable interfaces).
1000-Mbps Ethernet (Gigabit
Ethernet)

There are several 1 Gbps Ethernet standards, that
can support both UTP and fiber optic cables.


1000BASE-T, 1000BASE-SX, 1000BASE-LX, etc.
1000BASE-T supports 1 Gbps transmission over
UTP cable.




All four pair of wires in the Cat5 cable are used.
Each wire pair can transmit 125 Mbps.
With four pair of wires, the cable can transmit 500 Mbps.
Each wire pair can transmit in full-duplex, doubling the data
rate from 500 Mbps to 1000 Mbps.
1000-Mbps Ethernet (Gigabit
Ethernet)

Other modifications made to the 1000BASE-T
standard:



The encoding used is 4D-PAM5.
 Each 8-bit of data is converted to 4 code symbols.
 The 4 code symbols are transmitted simultaneously over
the four pair of wires.
Each pair of wire can transmit in full-duplex.
 At any one time, each wire will contain signals from both
sides.
 Special techniques are used so that the receiver can read
the received signals correctly.
Multiple voltage levels are used.
1000-Mbps Ethernet (Gigabit
Ethernet)

1000BASE-SX and 1000BASE-LX support 1 Gbps
transmission over fiber optic cable.





1000BASE-SX: used for multimode fiber
1000BASE-LX: used for single-mode fiber (can provide
longer distance compared to 1000BASE-SX).
Two strands of optical fiber are used.
The encoding scheme used is 8B/10B.
Using fiber optics offer the following advantages
over UTP:



Noise immunity
Smaller physical size
Increased distance
10-Gbps and Future Ethernet



10-Gigabit Ethernet (10GbE) standard is included in
the IEEE 802.3ae standard (a revised version of
IEEE 802.3).
10GbE is designed not only to be used in LANs, but
also in MANs and WANs.
Due to the use of the same frame structure, 10GbE
can be used with existing Ethernet infrastructure.


Makes it easy to upgrade or extend the current network.
Standards on 40-, 100-, and even 160-Gbps
Ethernet are already being developed.
Legacy Ethernet: Using Hubs


A hub is a physical layer device, which broadcast
the received signal to all the outgoing ports.
The use of hubs to increase the size of a network
can cause several issues:





Limited scalability – there is a limit on the amount of
bandwidth that devices can share.
Increased latency – can increase collisions.
More network failures – a malfunction device can affect the
whole network.
More collision – due to larger collision domain.
Nowadays, hubs are only used in small LANs or in
LAN with low bandwidth requirement.
Ethernet: Using Switches


Switches provide an alternative to the contentionbased environment of legacy Ethernet.
Switch allows the segmentation of LAN into
separate collision domains.



Each port represents a separate collision domain.
This reduces collision.
The bandwidth is only shared between the nodes
inside that collision domain.


This increases the average bandwidth for each node.
Provides better performance.
Ethernet: Using Switches
router
Single Collision Domain
hub
hub
hub
hub
hub
hub
hub
hub
Ethernet: Using Switches
router
switch
hub
hub
switch
hub
Collision Domains
hub
hub
hub
Collision Domains
Ethernet: Using Switches

Devices can also be attached directly to a switch.


Each device would then be in its own collision domain.
Connecting devices directly to a switch brings the
following advantages:



Dedicated full bandwidth to each port – the bandwidth is no
longer shared between multiple devices.
Collision-free environment – there is only one device in the
collision domain and therefore collision does not occur,
which results in higher throughput.
Full-duplex operation – the device can transmit and receive
simultaneously (for example, in 100 Mbps LAN, the device
and transmit at 100 Mbps and receive at 100 Mbps).
Switches: Selective
Forwarding

The advantages of a switch are due to its ability to
do the following:


Forward frame only to the port where the destination node
is connected.
 This is called selective forwarding.
 Free the other ports from transmitting signals unnecessarily.
 Creates a logical point-to-point connection.
Buffer an incoming frame and forward it to the proper port
when the port is idle.
 This is called store and forward.
 Allows a sender to transmit even though the outgoing port
is currently busy.
 This prevents collision from ever happening.
Forwarding Based on
Destination MAC Address

To perform selective forwarding, the switch
maintains a table called the MAC table.



This table is also called the switch table or the bridge table.
The table keeps a list of MAC addresses together
with the switch port number that leads to the device
with that MAC address.
When a frame comes, the switch will:



Read the destination MAC address in the header.
Find a matching address in the MAC table.
Forward the frame to the appropriate outgoing port as
specified in the MAC table.
Switch Operation

Learning:





When a switch is first put on the network, the MAC table is
empty.
The switch is able to fill in the MAC table automatically.
When a frame arrives from a certain port, the switch will
check whether the source MAC address is already
available in the table.
If not, then the source MAC address and its corresponding
incoming port number will be recorded in the table.
Aging:



Each entry in the MAC table is associated with a timer.
If the timer expires, the entry will be deleted from the table.
A common timer value is 300 seconds (5 minutes).
Switch Operation

Flooding:


Selective forwarding:


When a frame arrives at the switch but the destination
MAC address is not in the MAC table, the frame will be
forwarded to all outgoing ports.
When a frame arrives at the switch and the destination
MAC address is in the MAC table, it will be forwarded only
to the corresponding port.
Filtering:

A frame will not be forwarded if the receiver is located on
the same port on which the frame arrives.
Address Resolution Protocol
(ARP)


When an Ethernet frame is to be transmitted, the
sender must put the destination MAC address in the
header.
How can the sender know what is the destination
MAC address?



It can refer to a table in its RAM called the ARP table (or
ARP cache).
On Windows, this table can be viewed with the command
‘arp –a’.
This table contains mappings between an IP
address and its corresponding MAC address.
Address Resolution Protocol
(ARP)



When a device is first connected to the network, this
table is initially empty.
If a device needs to send a frame and the receiver’s
MAC address is not in the table, it needs to find the
mapping.
A mapping can be automatically added into the ARP
table with the following process:


The device broadcasts an ARP request message which
contains the IP address of the destination host.
All devices in the LAN will receive this request.
Address Resolution Protocol
(ARP)




Each entry in the ARP table is associated with a
timer.


The device whose IP address matches the address in the
ARP request message will send an ARP reply message.
This message contains the device’s MAC address.
The sending device can then add this information to its
ARP table.
When the timer expires, the entry will be deleted from the
ARP table.
The ARP table entries can also be managed
manually.

On Windows, this is done using the ‘arp’ command.
Mapping to Destination
Outside the Local Network



MAC address is only valid within the local
network.
If the receiver is on the same network as the
sender, the destination MAC address put in
the header corresponds to the MAC address
of the receiver.
But what if the destination is outside the local
network?

The sender must put the MAC address of the
gateway router in the header.
Mapping to Destination
Outside the Local Network

The MAC address of the gateway router can be
obtained using the same method as discussed
before, or by using proxy ARP.



Proxy ARP is protocol that allows a router to reply to an
ARP request message asking for the MAC address of a
host outside the local network.
The router would then reply this message with its own MAC
address.
When the frame is forwarded to another network,
the source and destination MAC address in the
header will change accordingly.