6

I've done several exercises where you're given the MTU of a net or subnet, but I wonder how routers know the MTU of the nets they're connected. I've learnt that in OSPF protocol this information is excanged among routers. However, is there another way of finding that information for a router that doesn't use OSPF?

I hope someone can help me. Thank you for your responses.

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191
Josemi
  • 185
  • 3

2 Answers2

5

Routers know because they have physical interfaces connected to the networks. Those interfaces are configured for the correct MTU.

You are mistaken about OSPF: The protocol does not exchange MTU information.

Ron Trunk
  • 66,852
  • 5
  • 65
  • 126
  • I think the OSPF confusion is that the MTU must match for OSPF to form a neighbor. – Ron Maupin Jan 07 '19 at 21:52
  • I don't think so, if you consult the rfc of OSPF, version 2: https://www.rfc-editor.org/pdfrfc/rfc2328.txt.pdf , in page 195 where the information database packet is described, there is a field of `interface MTU`. – Josemi Jan 07 '19 at 22:06
  • @Josemi, from [Why Are OSPF Neighbors Stuck in Exstart/Exchange State?](https://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/13684-12.html): "_OSPF states for adjacency formation are Down, Init, Attempt, 2-way, Exstart, Exchange, Loading and Full. There can be number of reasons why the Open Shortest Path First (OSPF) neighbors are stuck in exstart/exchange state. This document focuses on an MTU mismatch between OSPF neighbors resulting in exstart/exchange state. For more details on troubleshooting OSPF refer to Troubleshooting OSPF._" – Ron Maupin Jan 07 '19 at 23:35
4

The MTU of an interface is a function of the layer-2 protocol for that interface, and a device, including a router, will inherently know the MTU of the interface based on the protocol for the interface. For example the MTU for ethernet is 1500.

Some routers can configure the interface MTU with a configuration command. Also virtual interfaces, e.g. a tunnel, will calculate the MTU based on the MTU of the physical interface that is the source of the tunnel, minus the tunnel protocol overhead.


For Cisco routers, you can use the show interfaces command to see the MTU for one or more interfaces. Other vendors will have similar commands.

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191