Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MTU option of IPv6 router advertisement ignored

I recently turned up an IPv6 tunnel from Hurricane Electric (http://tunnelbroker.net/) to my home router, which is a Cisco 1921 ISR. The IPv6 tunnel works great, save for one small problem. That being that the MTU of the tunnel is 1480 and the MTU on my Mac is 1500. If I manually set the MTU on my Mac to 1480, everything works as expected. However, part of IPv6 autoconfig is setting the MTU for situations like this where there is a tunnel or the more common PPPoE, both of which require a lower MTU. The router is configured to set this option, and I can see it via tcpdump and radvdump:


[root@strongbad]# tcpdump -i en0 -n -XX icmp6

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode

listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes

11:36:09.218626 IP6 fe80::ca9c:1dff:fed6:17a0 > ff02::1: ICMP6, router advertisement, length 64

0x0000: 3333 0000 0001 c89c 1dd6 17a0 86dd 6e00 33............n.

0x0010: 0000 0040 3aff fe80 0000 0000 0000 ca9c ...@:...........

0x0020: 1dff fed6 17a0 ff02 0000 0000 0000 0000 ................

0x0030: 0000 0000 0001 8600 1266 4000 0708 0000 .........f@.....

0x0040: 0000 0000 0000 0101 c89c 1dd6 17a0 0501 ................

0x0050: 0000 0000 05c8 0304 40c0 0027 8d00 0009 ........@..'....

0x0060: 3a80 0000 0000 2001 0470 e9ba 0001 0000 :........p......

0x0070: 0000 0000 0000 ......


[root@strongbad]# radvdump

#

# radvd configuration generated by radvdump 1.6

# based on Router Advertisement from fe80::ca9c:1dff:fed6:17a0

# received by interface en0

#


interface en0

{

AdvSendAdvert on;

# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump

AdvManagedFlag off;

AdvOtherConfigFlag off;

AdvReachableTime 0;

AdvRetransTimer 0;

AdvCurHopLimit 64;

AdvDefaultLifetime 1800;

AdvHomeAgentFlag off;

AdvDefaultPreference medium;

AdvSourceLLAddress on;

AdvLinkMTU 1480;


prefix 2001:470:e9ba:1::/64

{

AdvValidLifetime 2592000;

AdvPreferredLifetime 604800;

AdvOnLink on;

AdvAutonomous on;

AdvRouterAddr off;

}; # End of prefix definition


}; # End of interface definition


You can plainly see the MTU is at 1500, when it should be 1480:


[root@strongbad]# ifconfig en0

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

ether 00:16:cb:ab:af:0d

inet6 fe80::216:cbff:feab:af0d%en0 prefixlen 64 scopeid 0x4

inet 192.168.1.44 netmask 0xffffff00 broadcast 192.168.1.255

inet6 2001:470:e9ba:1:216:cbff:feab:af0d prefixlen 64 autoconf

media: autoselect (1000baseT <full-duplex>)

status: active


[root@strongbad]# netstat -in

Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll

lo0 16384 <Link#1> 800471 0 800471 0 0

lo0 16384 ::1/128 ::1 800471 - 800471 - -

lo0 16384 fe80::1%lo0 fe80:1::1 800471 - 800471 - -

lo0 16384 127 127.0.0.1 800471 - 800471 - -

gif0* 1280 <Link#2> 0 0 0 0 0

stf0* 1280 <Link#3> 0 0 0 0 0

en0 1500 <Link#4> 00:16:cb:ab:af:0d 24352460 0 36285322 0 0

en0 1500 fe80::216:c fe80:4::216:cbff: 24352460 - 36285322 - -

en0 1500 192.168.1 192.168.1.44 24352460 - 36285322 - -

en0 1500 2001:470:e9 2001:470:e9ba:1:2 24352460 - 36285322 - -

fw0 2030 <Link#5> 00:1c:b3:ff:fe:9b:6d:d0 0 0 0 0 0

en1 1500 <Link#6> 00:1c:b3:b0:41:f0 0 0 0 0 0

vmnet 1500 <Link#7> 00:50:56:c0:00:01 0 0 0 0 0

vmnet 1500 172.16.130/24 172.16.130.1 0 - 0 - -

vmnet 1500 <Link#8> 00:50:56:c0:00:08 0 0 0 0 0

vmnet 1500 172.16.123/24 172.16.123.1 0 - 0 - -


On my Mac in System Preferences > Network > Ethernet > Advanced > Ethernet the "Configure" value is set to "Automatically". I discovered a manual sysctl setting that looked promising, but had no noticeable effect:


[root@strongbad]# sysctl -w net.inet6.ip6.accept_rtadv=1

net.inet6.ip6.accept_rtadv: 0 -> 1


I'm running the latest version of Snow Leopard (10.6.7) on my Mac, and there doesn't appear to be any updates for it. Just for fun, here's the kernel banner:


[root@strongbad]# uname -a

Darwin strongbad.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386


Any ideas on how to get my Mac to honor the MTU in IPv6 router advertisements and set the MTU automatically?


Thanks in advance,


-Lex

Posted on May 30, 2011 11:04 AM

Reply
Question marked as Best reply

Posted on Jun 8, 2011 9:00 PM

I was wrong. The MTU in IPv6 router advertisements is not ignored by my Mac. In fact, it works great. A few things threw me off here:


1. The IPv6 MTU is not relected in ifconfig and netstat output if it's different than IPv4.


2. The MTU size was wrong. The IPv6 MTU also has to account for ADSL PPPoE overhead the same as any other protocol. PPPoE adds 8 bytes overhead per packet. That means with the 6in4 tunneling overhead of 20 bytes, the true MTU for an IPv6 packet over a 6in4 tunnel over PPPoE is 1472.


3. The firewall was correctly configured to pass ICMPv6, so PMTUD was working. However, this created the illusion that some destinations were working and some were not. I wrongly assumed that mucking with the MTU to and from 1480 was making a difference. In reality, it was PMTUD doing its thing, albeit slowly and on a strict destination by destination basis.


In sum, setting the MTU on the router interface closest to my Mac to 1472, made it all work beautifully. I had to wait for a few route advertisements to pass by, but my Mac did end up doing the right thing.


One last thing worth noting. On a Cisco router, setting the "ipv6 mtu" to something non-default will be reflected in the IPv6 route advertisements it sends out.


Hope this helps,


-Lex

1 reply
Question marked as Best reply

Jun 8, 2011 9:00 PM in response to aaronsca

I was wrong. The MTU in IPv6 router advertisements is not ignored by my Mac. In fact, it works great. A few things threw me off here:


1. The IPv6 MTU is not relected in ifconfig and netstat output if it's different than IPv4.


2. The MTU size was wrong. The IPv6 MTU also has to account for ADSL PPPoE overhead the same as any other protocol. PPPoE adds 8 bytes overhead per packet. That means with the 6in4 tunneling overhead of 20 bytes, the true MTU for an IPv6 packet over a 6in4 tunnel over PPPoE is 1472.


3. The firewall was correctly configured to pass ICMPv6, so PMTUD was working. However, this created the illusion that some destinations were working and some were not. I wrongly assumed that mucking with the MTU to and from 1480 was making a difference. In reality, it was PMTUD doing its thing, albeit slowly and on a strict destination by destination basis.


In sum, setting the MTU on the router interface closest to my Mac to 1472, made it all work beautifully. I had to wait for a few route advertisements to pass by, but my Mac did end up doing the right thing.


One last thing worth noting. On a Cisco router, setting the "ipv6 mtu" to something non-default will be reflected in the IPv6 route advertisements it sends out.


Hope this helps,


-Lex

MTU option of IPv6 router advertisement ignored

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.