MTU Calculation in IOS-XR

Download Report

Transcript MTU Calculation in IOS-XR

MTU Calculations
for Cisco/Juniper
& ALU
Amit Dhamija
MTU Calculation in IOS
 In cisco IOS physical MTU consists of L2 headers.
Example :-
MTU 1500 on Ethernet links includes 14 bytes of L2 header
IP MTU = Physical MTU
 In Cisco IOS when we ping and give the total payload size
then it accommodates the additional 28 bytes of (IP+ICMP
Header)
Example :If we ping 1500 bytes in IOS it means payload is 1472 as it includes
1472+20+8.
 MRU in IOS is equal to physical MTU so if it receives packet
higher then MTU it will drop it.
 Fragmentation of IP packets happens in egress side.
 IP-MTU command works only in egress direction
MTU Calculation in IOS-XR
 In cisco IOS-XR physical MTU is excluding the L2 headers.
Example :-
MTU 1500 on Ethernet links excludes 14 bytes of L2 header and will
pass IP traffic upto 1486 bytes.
IPMTU =Physical MTU-14 Bytes ( Ethernet Header)
RP/0/RP0/CPU0:xxx.xx#sh interfaces Te0/1/1/0 | in MTU
Fri May 23 15:45:36.197 IST
MTU 1514 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
RP/0/RP0/CPU0:xxx.xx#sh ipv4 interface Te0/1/1/0 | in MTU
Fri May 23 15:45:47.241 IST
MTU is 1500 (1500 is available to IP)
 In Cisco IOS-XR when we ping the size of packet is including
the headers (IP + ICMP).
 CRC ( 4 Bytes) are not taken into consideration for MTU
Calculation in Cisco devices
MTU Calculation in JUNOS
 In JUNOS physical MTU is excluding the L2 headers.
Example :-
MTU 1500 on Ethernet links excludes 14 bytes of L2 header and
pass traffic upto 1486 bytes or
IP MTU =Physical MTU-14 Bytes ( Ethernet Header)
lab@Mx-240-Test> show interfaces xe-0/0/0 | match MTU
Link-level type: Ethernet, MTU: 1600, LAN-PHY mode, Speed:
10Gbps,
Protocol inet, MTU: 1582  Including one Vlan TAG (IP-MTU)
 JUNOS adds icmp and ip header to the payload size you
specify. So 1500 becomes 1528 bytes of ip packet.
 MRU in JUNOS is equal to physical MTU so if it receives packet
higher then MTU it will drop it.
 In Egress it will fragment the ip packets.
 CRC ( 4 Bytes) are not taken into consideration for MTU
Calculation in Juniper routers.
MTU Calculation in SR-OS
 In SR-OS physical MTU is excluding the L2 headers.
Example :MTU 1500 on Ethernet links excludes 14 bytes of L2 header and pass
traffic upto 1486 bytes or
IP-MTU =Physical-MTU-14 Bytes ( Ethernet Header)
*A:test-pe1# show port 5/1/2 | match MTU
Physical Link
: Yes
MTU
: 9212
*A:test-pe1# show router interface "To_FSS_PE_00004_IPE-4" detail | match MTU
IP Oper MTU
: 9198
ICMP Mask Reply : True
 In SR-OS it adds icmp and ip header to the payload size you specify.
So 1500 becomes 1528 bytes of ip packet.
 Service MRU in SR-OS has no limit so if it receives packet higher then
MTU it will not drop it and transmit the packets
 However in egress it will fragment automatically and ip-mtu is similar
to IOS/IOS-XR
 CRC ( 4 Bytes) are not taken into consideration for MTU Calculation
in Alcatel-Lucent routers.
Fragmentation in Egress – Router
 If IP packet is longer than the MTU, the
router breaks packet into smaller
packets Called IP fragments
 Fragments are still IP packets
MTU
IP Packet
3
Fragmentation
2
IP Packets
1
Multiple Fragmentations
 Original packet may be
fragmented multiple times along its
route
Source
Host
Internet
Process
Destination
Host
Internet
Process
Fragmentation
Defragmentation
Internet layer process on destination
host defragments, restoring the
original packet
IP Defragmentation only occurs
once
Source
Host
Internet
Process
Destination
Host
Internet
Process
Defragmentation
Fragmentation and IP Fields
 More Fragments field (1 bit)
–
–
–
–
1 if more fragments
0 if not
Source host internet process sets to 0
If router fragments, sets More
Fragments field in last fragment to 0
– In all other fragments, sets to 1
0
Original IP Packet
0
1
Fragments
1
Identification Fields & Fragment Offset
 IP packet has a 16-bit Identification
field
Version
(4)
Hdr Len
(4)
TOS (8)
Indication (16 bits)
Time to Live (8)
Total Length in bytes (16)
Flags (3)
Protocol (8)
Fragment Offset (13)
Header Checksum (16)
Source IP Address
Destination IP Address
Options (if any)
Data Field
PAD
Identification Fields
 Purpose
– Allows receiving host’s internet layer
process know what fragments belong
to each original packet
– Works even if an IP packet is
fragmented several times
47
Original IP Packet
47
47
Fragments
47
Fragment Offset
 Fragment offset field (13 bits) is used to reorder
fragments with the same Identification field
 Contains the data field’s starting point (in octets)
from the start of the data field in the original IP
packet
 Value of offset is measured in 8 bytes. This is
done because length of offset is only 13 bits long
and cannot be represent a sequence of bytes
greater then 8191.This force host/router that
fragment datagrams to choose the size of each
fragment so that first byte number is divisible by 8
Fragment Offset Field
 Receiving host’s internet layer process
assembles fragments in order of
increasing fragment offset field value
 This works even if fragments arrive out
of order!
 Works even if fragmentation occurs
multiple times
Fragment Offset Field
730
212
0
Fragmentation Rule
 First fragment will be equal to ip-mtu – 20 bytes
and then rest of fragments can be summed up.
Example below a link with ip-mtu 1300 with a
payload of 5008 fragments into 4
1280 ( 0 – 1279) frag offset – 0 - 0
1280 ( 1280 – 2559) frag offset – 1280
1280 ( 2560 – 3839) frag offset – 2560
1168 ( 3840 – 1279) frag offset – 3480
Wireshark Captures
showing fragment off-set
Thanks