Re: MTU of outgoing Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The first hack I tried was using RTNETLINK. However, given the destination address, I was given the Path MTU which might be less than the MTU of the outgoing interface. The code is at

http://www.wand.net.nz/~mjl12/netlink-mtu.c

Hmm, looks sane to me and honestly, so far I've only been interested in the FIB's per route mtu setting and didn't care much about the interface mtu itself.


What is the suggested way to get the outgoing interface's MTU under Linux?

Does the following work for you or did I completely misunderstand your request?


    ip route flush cache; ip route get ${IP_ADDRESS} \
       dev ${PHYS_INTERFACE} ¦ awk '/mtu/ {print $3}'

HTH and best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux