I was under the assumption that fragmentation only happens at the router however this makes me wonder how datagrams get to the router without first being fragmented at the source to comply with the MTU of ethernet.
I was under the assumption that fragmentation only happens at the router however this makes me wonder how datagrams get to the router without first being fragmented at the source to comply with the MTU of ethernet.
In the context of plain ol' IP datagrams your host won't create IP datagrams larger than the MTU of the network media.
TCP has a concept of a maximum segment size, which specifies the largest segment that can be received by the remote end of the connection. The initial MSS is controlled by the TCP implementation in your OS. Typically the initial MSS is set to the MTU of the network media. Path MTU discovery is a common way that TCP/IP implementations "discover" the MTU for a path across the 'net and tune the size of the transmitted segments to match the capabilities of the path.
It would be pretty silly for a host to emit fragmented IP datagrams. Fragmentation causes overhead (in headers), so it's better for hosts to work out the optimal datagram size between themselves.