Bow-Nan,
Your assessment is correct. In this case, the special ETHER_TYPE
triggers the logic to send the message using the NEM broadcast address
with a DSCP of 0. There is room for improvement here. The virtual
transport uses predefined MAC addresses in the following format:
02:02:00:00:XX:XX
Where, XX:XX is the 16 bit NEM id. This is used to map all locally
generated traffic. That logic would still hold true regardless of
ETHER_TYPE. Although not implemented this way currently, the code can
easily be changed to only set the DSCP to 0 for unknown ETHER_TYPEs and
proceed with the current MAC to NEM id logic that exists for the IPv4
and IPv6 types.
--
Steven Galgano
Adjacent Link LLC
On 04/11/2013 10:48 PM, Cheng, Bow-Nan - 0665 - MITLL wrote:
> Thanks Steve,
>
> One quick related question -- do you know the impact of everything getting
> sent with the NEM broadcast address?
>
> Looking through the code, it seems ARP packets (because they have a
> special ETHER_TYPE) are intercepted to add the entry to the neighbor
> cache. Since IPv6 doesn't have "ARP", you guys intercept IPv6 packets and
> then do a deeper search to see if its and ICMP Neighbor Solicitation or
> Advertisement message before adding the entry into the neighbor table.
> Since we replace the IPv6 ETHERTYPE with our custom one (we do not do the
> same for ARP), this function won't get exercised. My guess is that all our
> IPv6 packets (OSPF hello, LSAs, IPv6 neighbor discovery packets, etc.) are
> getting sent to the broadcast NEM and that's probably why it shows up that
> we're receiving and sending a lot more multicast packets (in EMANE
> Upstream/Downstream stats) since everyone is receiving and it won't get
> dropped until it goes up to the kernel. Does that sound like a reasonable
> assessment?
>
> Here's the section of code I was talking about:
>
> case EMANEUtils::ETH_P_IPV6:
> {
> //ipv6 header
> const EMANEUtils::Ip6Header *pIp6Header =
> (EMANEUtils::Ip6Header*) ((EMANEUtils::EtherHeader*) pEthHeader + 1);
>
> // check for icmpv6
> if (pIp6Header->u8Ipv6next == EMANEUtils::IPV6_P_ICMP)
> {
> // icmpv6 header
> const EMANEUtils::IP6ICMPHeader *pICMP6Header =
> (EMANEUtils::IP6ICMPHeader*) ((EMANEUtils::Ip6Header*) pIp6Header + 1);
>
> // icmp type
> const ACE_UINT8 icmpv6Type = pICMP6Header->u8Type;
>
> // icmpv6 neighbor solicitation or advertisement
> if ((icmpv6Type == EMANEUtils::IP6_ICMP_NEIGH_SOLICIT) ||
> (icmpv6Type == EMANEUtils::IP6_ICMP_NEIGH_ADVERT))
> {
> addEntry(pEthHeader->src, nemId);
> }
> }
> }
>
>
>
> Thanks again for your help.
>
_______________________________________________
emane-users mailing list
[email protected]
http://pf.itd.nrl.navy.mil/mailman/listinfo/emane-users