fbpx

Understanding the Concept of MTU at Layer 2 and Layer 3: Impacts and Considerations

Facebook
Twitter
LinkedIn
WhatsApp
Telegram

To ensure that data flows efficiently and smoothly over a network, it is essential that consistency in data transmission is maintained. One of the key factors affecting this coherence is the MTU (Maximum Transmission Unit).

At the end of the article you will find a small test that will allow you assess the knowledge acquired in this reading

The MTU is a fundamental concept in the field of networks, and its understanding is essential in both Layer 2 and Layer 3 of the OSI (Open Systems Interconnection) model.

 

What is the MTU?

The MTU is the maximum amount of data that can be transmitted on a single drive without fragmenting into smaller pieces. In other words, it is the maximum size a data packet can be before it must be divided into smaller fragments for transmission over the network.

At both Layer 2 and Layer 3, the MTU plays a critical role in communication efficiency.

 

MTU at Layer 2 (Link)

At Layer 2 of the OSI model, which refers to the data link layer, the MTU is associated with the transmission of data over physical media or virtual links, such as Ethernet connections.

The MTU at Layer 2 is usually fixed and standard for a specific type of network technology, such as Ethernet (1500 bytes), but can vary for other technologies.

When the size of a packet at Layer 2 exceeds the MTU allowed for the medium or technology in use, the packet must be fragmented into smaller fragments for transmission. This can negatively impact network performance by increasing processing overhead and latency.

Additionally, if an intermediate link cannot handle large fragments, it may result in data loss or retransmissions, further decreasing network efficiency.

Understanding the Concept of MTU at Layer 2 and Layer 3: Impacts and Considerations

MikroTik RouterOS parameters

The MikroTik RouterOS L2MTU and Max L2MTU parameters are used to configure the Layer 2 Maximum Transmission Unit (MTU) on a network interface.

L2MTU

The L2MTU parameter defines the maximum size of a packet that can be transmitted over a network interface. The default value of L2MTU is 1500 bytes, which is the maximum size of an Ethernet packet.

Max L2MTU

The Max L2MTU parameter defines the maximum size of a packet that can be transmitted over a network interface, regardless of the size of the data link's Layer 2 MTU. The default value of Max L2MTU is 1500 bytes, which is the maximum size of an Ethernet packet.

 

Difference between L2MTU and Max L2MTU

The difference between L2MTU and Max L2MTU is that L2MTU is based on the size of the data link's Layer 2 MTU, while Max L2MTU is not.

L2MTU and Max L2MTU Settings

To configure L2MTU and Max L2MTU on a MikroTik RouterOS network interface, the mtu command can be used.

/interface ethernet set [interface-name] mtu [l2mtu] [max-l2mtu]

For example, to configure L2MTU on an Ethernet interface with name “ether1” to 1400 bytes and Max L2MTU to 1500 bytes, the following command would be used:

/interface ethernet set ether1 mtu 1400 max-l2mtu 1500

 

Examples of use

The L2MTU and Max L2MTU parameters can be used to troubleshoot packet fragmentation on a network. If packet fragmentation is occurring, the L2MTU or Max L2MTU value can be increased to prevent packets from being fragmented.

They can also be used to improve the performance of a network. If the data link is known to have a small MTU, the L2MTU or Max L2MTU value can be reduced to avoid wasting bandwidth by sending packets larger than necessary.

 

MTU at Layer 3 (Network)

At Layer 3 of the OSI model, which refers to the network layer, the MTU is related to the fragmentation of IP packets. Routers and routing devices play a crucial role in managing IP packets and MTU at this layer.

When an IP packet moves from one network to another through a router, the MTU can vary between networks. If an IP packet is larger than the MTU of the destination network, the router must fragment the packet or discard it.

IP packet fragmentation can have significant impacts on network performance and efficiency. Fragmented packets require more processing resources and bandwidth to transmit, which can impact network speed and increase the likelihood of packet loss.

Additionally, some devices and firewalls may block or discard fragmented packets for security reasons, which can lead to connectivity issues.

 

Considerations for Optimizing the MTU

To ensure optimal performance on a network, it is important to carefully consider the MTU at both layers. Some key considerations include:

 

1. Knowledge of Technology

Understanding the specific network technology being used and its standard MTU is essential to avoid fragmentation issues.

2. MTU Settings

In some cases, it may be beneficial to adjust the MTU on specific devices to optimize network performance.

3. Path MTU Discovery (PMTUD)

Using mechanisms such as PMTUD to determine the maximum MTU along the communication path can help avoid packet fragmentation.

4. Avoid Fragmentation

Where possible, packet fragmentation should be avoided as it can have a negative impact on network efficiency.

 

In summary, the MTU at Layer 2 and Layer 3 is a fundamental concept in communication networks. Its proper management is essential to ensure optimal performance and avoid packet fragmentation problems, which can affect network efficiency and reliability.

Understanding the Concept of MTU at Layer 2 and Layer 3: Impacts and Considerations

MPLS MTU

The MPLS MTU parameter defines the maximum size of an MPLS packet that can be transmitted over an MPLS tunnel. The default MPLS MTU value is 1508 bytes, which is the maximum size of an IP packet with two MPLS labels.

L3MTU

The L3MTU parameter defines the maximum size of an IP packet that can be transmitted over a network interface. The default value of L3MTU is 1500 bytes, which is the maximum size of an IP packet without MPLS tags.

Difference between MPLS MTU and L3MTU

The difference between MPLS MTU and L3MTU is that MPLS MTU is based on the size of an MPLS packet, while L3MTU is based on the size of an IP packet.

MPLS MTU and L3MTU Configuration

To configure MPLS MTU and L3MTU on a MikroTik RouterOS MPLS tunnel, the mpls interface command can be used.

				
					/mpls interface set [tunnel-name] mtu [mpls-mtu] [l3mtu]
				
			

For example, to configure MPLS MTU on an MPLS tunnel with the name “tun1” to 1530 bytes and L3MTU to 1500 bytes, the following command would be used:

				
					/mpls interface set tun1 mtu 1530 l3mtu 1500
				
			

Examples of use

The MPLS MTU and L3MTU parameters can be used to troubleshoot packet fragmentation in an MPLS tunnel. If packet fragmentation is occurring, the MPLS MTU or L3MTU value can be increased to prevent packets from being fragmented.

They can also be used to improve the performance of an MPLS tunnel. If the data link is known to have a small MTU, the MPLS MTU or L3MTU value can be reduced to avoid wasting bandwidth by sending packets larger than necessary.

Conclusions

The MPLS MTU and L3MTU parameters are useful tools for configuring the Layer 3 MTU on a MikroTik RouterOS MPLS tunnel. They can be used to solve packet fragmentation problems and improve the performance of an MPLS tunnel.

Additional explanation

For MPLS tunnels, the Layer 3 MTU must be at least 20 bytes larger than the Layer 2 MTU of the data link. This is to allow MPLS headers to be added to the IP packet.

The MPLS MTU parameter is used to determine the maximum size of an MPLS packet that can be transmitted over an MPLS tunnel. The L3MTU parameter is used to determine the maximum size of an IP packet that can be transmitted over a network interface.

It is important to configure the MPLS MTU and L3MTU parameters so that they are compatible with each other and with the data link MTU. If the parameters are not supported, packet fragmentation or packet rejection may occur.

 

MTU PPPoE

The MTU parameter defines the maximum size of a packet that can be transmitted over a PPPoE connection. The default MTU value is 1492 bytes, which is the maximum size of an Ethernet packet with PPPoE headers.

MRU

The MRU parameter defines the maximum size of a packet that can be received over a PPPoE connection. The default value of MRU is 1500 bytes, which is the maximum size of an Ethernet packet without PPPoE headers.

Difference between MTU and MRU

The difference between MTU and MRU is that MTU is based on the size of a packet that is sent over a PPPoE connection, while MRU is based on the size of a packet that is received over a PPPoE connection.

MTU and MRU Settings

To configure MTU and MRU on a MikroTik RouterOS PPPoE connection, the ppp secret command can be used.

Examples of use

The MPLS MTU and L3MTU parameters can be used to troubleshoot packet fragmentation in an MPLS tunnel. If packet fragmentation is occurring, the MPLS MTU or L3MTU value can be increased to prevent packets from being fragmented.

They can also be used to improve the performance of an MPLS tunnel. If the data link is known to have a small MTU, the MPLS MTU or L3MTU value can be reduced to avoid wasting bandwidth by sending packets larger than necessary.

Conclusions

The MPLS MTU and L3MTU parameters are useful tools for configuring the Layer 3 MTU on a MikroTik RouterOS MPLS tunnel. They can be used to solve packet fragmentation problems and improve the performance of an MPLS tunnel.

Additional explanation

For MPLS tunnels, the Layer 3 MTU must be at least 20 bytes larger than the Layer 2 MTU of the data link. This is to allow MPLS headers to be added to the IP packet.

The MPLS MTU parameter is used to determine the maximum size of an MPLS packet that can be transmitted over an MPLS tunnel. The L3MTU parameter is used to determine the maximum size of an IP packet that can be transmitted over a network interface.

It is important to configure the MPLS MTU and L3MTU parameters so that they are compatible with each other and with the data link MTU. If the parameters are not supported, packet fragmentation or packet rejection may occur.

 

MTU PPPoE

The MTU parameter defines the maximum size of a packet that can be transmitted over a PPPoE connection. The default MTU value is 1492 bytes, which is the maximum size of an Ethernet packet with PPPoE headers.

MRU

The MRU parameter defines the maximum size of a packet that can be received over a PPPoE connection. The default value of MRU is 1500 bytes, which is the maximum size of an Ethernet packet without PPPoE headers.

Difference between MTU and MRU

The difference between MTU and MRU is that MTU is based on the size of a packet that is sent over a PPPoE connection, while MRU is based on the size of a packet that is received over a PPPoE connection.

MTU and MRU Settings

To configure MTU and MRU on a MikroTik RouterOS PPPoE connection, the ppp secret command can be used.

				
					/interface ppp secret set [secret-name] mtu [mtu] mru [mru]
				
			

For example, to set the MTU on a PPPoE connection named “PPPoE-out” to 1480 bytes and MRU to 1512 bytes, the following command would be used:

				
					/interface ppp secret set PPPoE-out mtu 1480 mru 1512
				
			

Examples of use

The MTU and MRU parameters can be used to troubleshoot packet fragmentation on a PPPoE connection. If packet fragmentation is occurring, the MTU or MRU value can be increased to prevent packets from being fragmented.

They can also be used to improve the performance of a PPPoE connection. If the data link is known to have a small MTU, the MTU or MRU value can be reduced to avoid wasting bandwidth by sending packets larger than necessary.

 

Conclusions

The MTU and MRU parameters are useful tools for configuring the Layer 2 and Layer 3 MTU on a MikroTik RouterOS PPPoE connection.

They can be used to troubleshoot packet fragmentation and improve the performance of a PPPoE connection.

 

Additional explanation

For PPPoE connections, the Layer 2 MTU must be at least 6 bytes larger than the Layer 3 MTU. This is to allow PPPoE headers to be added to the Ethernet packet.

The MTU parameter is used to determine the maximum size of a packet that can be sent over a PPPoE connection. The MRU parameter is used to determine the maximum size of a packet that can be received over a PPPoE connection.

It is important to configure the MTU and MRU parameters so that they are compatible with each other and with the data link MTU. If the parameters are not supported, packet fragmentation or packet rejection may occur.

 

Special case: 1500 byte MTU

In some cases, it is possible to set the MTU of a PPPoE connection to 1500 bytes. This is known as “baby jumbo frames”.

To configure the MTU of a PPPoE connection to 1500 bytes, you must set the mtu parameter to 1500 and the mru parameter to 1512.

				
					/interface ppp secret set [secret-name] mtu 1500 mru 1512
				
			

Setting the MTU of a PPPoE connection to 1500 bytes can improve the performance of a PPPoE connection. However, it is important to note that not all devices and service providers support this setting.

Brief knowledge quiz

What do you think of this article?
Do you dare to evaluate your learned knowledge?

QUIZ - Understanding the Concept of MTU at Layer 2 and Layer 3: Impacts and Considerations

Recommended book for this article

Do you want to suggest a topic?

Every week we post new content. Do you want us to talk about something specific?
Topic for the next blog

Leave a comment

Your email address will not be published. Required fields are marked with *

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011