Saturday, May 23, 2015

MPLS-- MTU and MRU

Maximum transmission unit (MTU) is a well-known parameter in the IP world.
It indicates the maximum size of the IP packet that can still be sent on a data link, without fragmenting the packet.Data links in MPLS networks also have a specific MTU, but for labeled packets.
labeled packets are slightly bigger than the IP packets, because for every label, four bytes are added to the packet. So, if n is s the number of labels, * 4 bytes are added to the size of the packet when the packet is labeled
For the Ethernet encapsulation, for example, MTU is by default set to 1500 ,However, when  n labels are added, n * 4 bytes are added to an already maximum sized IP packet of 1500 bytes
Cisco IOS has the  mpls mtu command that lets you specify how big a labeled packet can be on a data link
If, for example, you know that all packets that are sent on the link have a maximum of
two labels and the MTU is 1500 bytes, you can set the MPLS MTU to 1508 (1500 + 2 * 4). Thus, all labeled packets of size 1508 bytes (labels included) can be sent on the link without fragmenting them
ABC(config)#interface FastEthernet2/0
ABC(config-if)#mpls mtu 1508
ABC(config-if)#^Z
*********************
#show mpls interfaces fastEthernet 2/0 detail
Interface FastEthernet2/0:
IP labeling enabled
LSP Tunnel labeling not enabled
BGP labeling not enabled
MPLS not operational
MTU = 1508
*****************

Giant and Baby Giant Frames

When a packet becomes labeled, the size increases slightly.If the IP packet was already at the

maximum size possible for a certain data link (full MTU), it becomes too big to be sent on that
data link because of the added labels. Therefore, the frame at Layer 2 becomes a giant frame.
Because the frame is only slightly bigger than the maximum allowed, it is called a baby giant 
frame.

On Ethernet data links on LSRs, you can set the MPLS MTU to 1508 bytes to allow IP packets

with a size of 1500 bytes with two labels to be received and forwarded. If, however, the hardware
of the router does not support this, or if an Ethernet switch exists in between, dropping baby giant

frames,

When you set the MPLS MTU to 1500, all the IP packets with a size of 1492 bytes are still forwarded, because the size of the labeled packet then becomes 1500 (1492 plus 8) bytes at Layer 3

However, all IP packets sized between 1493 through 1500 bytes (or more) are fragmented


Giant Frames on Switches


You can also see giant and baby giant frames on Layer 2 switches because the maximum Ethernet


frame has increased by as many bytes as are in the label stack.


Cluster#conf t

Enter configuration commands, one per line.  End with CNTL/Z.
Cluster(config)#system jumbomtu ?
  <1500-9216>  Jumbo mtu size in Bytes, default is 9216

donquijote-msfc#conf t

Enter configuration commands, one per line.  End with CNTL/Z.
donquijote-msfc(config)#int vlan 1
donquijote-msfc(config-if)#mtu ?
  <64-9216>  MTU size in bytes

Lander#conf t

Enter configuration commands, one per line.  End with CNTL/Z
Lander(config)#system mtu ?
  <1500-2000>  MTU size in bytes

MPLS Maximum Receive Unit

Maximum receive unit (MRU) is a parameter that Cisco IOS uses. It informs the LS
received labeled packet of a certain FEC can be that can still be forwarded out of this
fragmenting it. This value is actually a value per FEC (or prefix) and not just per in

reason for this is that labels can be added to or removed from a packet on an LSR.


#show mpls forwarding-table 10.200.252.9 detail 
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    
tag    tag or VC   or Tunnel Id      switched   interface              
21     Pop tag     10.200.252.9/32   0          Et0/0/0    10.200.200.2 

        MAC/Encaps=14/14, MRU=1512, Tag Stack{}
or 

lactometer#show mpls forwarding-table 10.200.254.3 detail 
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop    
tag    tag or VC   or Tunnel Id      switched   interface              
19     17          10.200.254.3/32   0          Et0/0/0    10.200.200.2 

        MAC/Encaps=14/18, MRU=1508, Tag Stack{17}


MRU changes per prefix according to the specific label operation performed on 
the packets

PATH MTU Discovery

If an LSR receives a labeled packet that is too big to be sent out on a data link, the packet should
be fragmented
If a labeled packet is received and the LSR notices that the outgoing MTU is not big enough for this packet, the LSR strips off the label stack, fragments the IP packet, puts the label stack (after the pop, swap, or push operation) onto all fragments, and forwards the fragments
fragmentation causes a performance impact and should be avoided. A good method to 
avoid fragmentation is using the Path MTU Discovery method.
One method to avoid fragmentation is Path MTU Discovery, which most modern IP hosts perform automatically. In that case, the IP packets sent out have the “Don’t Fragment” (DF) bit set.
When 
a packet encounters a router that cannot forward the packet without fragmenting it, the router  notices that the DF bit is set, drops the packet, and sends an ICMP error message “Fragmentation needed and do not fragment bit set” (ICMP type 3, code 4) to the originator of the IP packet"
The originator of the IP packet then lowers the size of the packet and retransmits the packet until no icmp massage received.that determine the MTU of the path.


No comments:

Post a Comment