MTU

advertisement
MTU
Amit Dhamija
amit.dhamija@colt.net
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 and
pass traffic upto 1514 bytes or
IP-MTU = Physical-MTU
 In Cisco IOS when we ping and give the total payload size
then it accommodates the (IP+ICMP Header)
Example :If we ping 1500 bytes as payload in IOS it means payload is 1472
as it includes 1472+20+8.
 MRU in IOS is – physical-MTU so if it receives packet higher then
MTU it will drop it, However in egress it will fragment
automatically.
 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
pass traffic upto 1486 bytes or
IP-MTU =Physical-MTU-14 Bytes ( Ethernet Header)
RP/0/RP0/CPU0:crs1.BLB#sh interfaces Te0/1/1/0 | in MTU
Fri May 23 15:45:36.197 IST
MTU 4484 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
RP/0/RP0/CPU0:crs1.BLB#sh ipv4 interface Te0/1/1/0 | in MTU
Fri May 23 15:45:47.241 IST
MTU is 4484 (4470 is available to IP)
 In Cisco IOS-XR when we ping and give the total payload size
then it accommodates the (IP+ICMP Header)
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
 In JUNOS adds icmp and ip header to the payload size you
specify. So 1500 becomes 1528 bytes of ip packet.
 MRU in JUNOS is – physical-MTU so if it receives packet higher
then MTU it will drop it, However in egress it will fragment
automatically.
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:KJC_PE_00001# show port 5/1/2 | match MTU
Physical Link
: Yes
MTU
: 9212
*A:KJC_PE_00001# 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 pass it, However in egress it will fragment automatically
and ip-mtu is similar to IOS/IOS-XR
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
Thanks
Download