Skip to content

ethertype: introduce 6LoENC ethertype#4861

Closed
miri64 wants to merge 14 commits intoRIOT-OS:masterfrom
miri64:ethertype/enh/6loenc
Closed

ethertype: introduce 6LoENC ethertype#4861
miri64 wants to merge 14 commits intoRIOT-OS:masterfrom
miri64:ethertype/enh/6loenc

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Feb 20, 2016

Introduces feature requested in #4857. I did not test this, but it should work with any ethernet enabled board (including native), by just including gnrc_sixlowpan_router_default to the modules and setting the 6Lo flag with 6LoWPAN. Wireshark should be configurable by clicking right on a packet and setting for Ethertype 0x87dd the 6LoWPAN dissector with Decode As....

@miri64 miri64 added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Feb 20, 2016
@miri64 miri64 added the Area: network Area: Networking label Feb 20, 2016
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 7, 2016

@OlegHahm ping?

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Mar 7, 2016

Sorry, will test ASAP.

@bsmelo
Copy link
Copy Markdown

bsmelo commented Mar 14, 2016

I want to test this, but could I ask for clearer instructions on how to do it?

it should work with any ethernet enabled board (including native), by just including gnrc_sixlowpan_router_default to the modules

  • I'm using native and have added USEMODULE += gnrc_sixlowpan_router_default to gnrc_networking's example Makefile from master. (I see USEMODULE += gnrc_ipv6_router_default there as well, should I remove this or any other thing?)

and setting the 6Lo flag with 6LoWPAN.

  • Not sure I understood this.

Wireshark should be configurable by clicking right on a packet and setting for Ethertype 0x87dd the 6LoWPAN dissector with Decode As....

  • If I right-click a package on Wireshark (before the change to the Makefile) I see 0x86dd (IPv6) on the "Link" tab of Decode As... menu. 6LoWPAN is not an option on neither "Link" nor "Network" tabs.

If I do change the Makefile, no packages are seen on Wireshark (and udp server + udp send doesn't work between RIOT nodes).

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 15, 2016

it should work with any ethernet enabled board (including native), by just including gnrc_sixlowpan_router_default to the modules

  • I'm using native and have added USEMODULE += gnrc_sixlowpan_router_default to gnrc_networking's example Makefile from master. (I see USEMODULE += gnrc_ipv6_router_default there as well, should I remove this or any other thing?)

Doesn't hurt to leave it in there. It won't add any code ;-).

and setting the 6Lo flag with 6LoWPAN.

Not sure I understood this.

In the shell type ifconfig <if> set 6lo

Wireshark should be configurable by clicking right on a packet and setting for Ethertype 0x87dd the 6LoWPAN dissector with Decode As....

If I right-click a package on Wireshark (before the change to the Makefile) I see 0x86dd (IPv6) on the "Link" tab of Decode As... menu. 6LoWPAN is not an option on neither "Link" nor "Network" tabs.

Damn :( then we probably need to implement some kind of dissector for that :(.

@bsmelo
Copy link
Copy Markdown

bsmelo commented Mar 15, 2016

In the shell type ifconfig set 6lo

It just gives me the usage information in response to this command (which is not documented within the usage information itself). Is this the correct command?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 15, 2016

Args sorry, drop the set.

ifconfig <if> 6lo

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 15, 2016

while you're at it you can also activate IPHC this way:

ifconfig <if> iphc

@bsmelo
Copy link
Copy Markdown

bsmelo commented Mar 15, 2016

I don't think it's working:

> ifconfig
ifconfig
Iface  7   HWaddr: ca:1f:1a:cd:d9:51 

           MTU:1500  HL:64  
           Source address length: 6
           Link type: wired
           inet6 addr: ff02::1/128  scope: local [multicast]
           inet6 addr: fe80::c81f:1aff:fecd:d951/64  scope: local
           inet6 addr: ff02::1:ffcd:d951/128  scope: local [multicast]

> ifconfig 7 6lo
ifconfig 7 6lo
usage: ifconfig <if_id> [-]{promisc|autoack|csma|autocca|cca_threshold|preload|iphc|rtr_adv}
> ifconfig 7 iphc
ifconfig 7 iphc
error: unable to (un)set IPHC
> ifconfig 7 -6lo
ifconfig 7 -6lo
usage: ifconfig <if_id> [-]{promisc|autoack|csma|autocca|cca_threshold|preload|iphc|rtr_adv}
> ifconfig 7 -iphc
ifconfig 7 -iphc
error: unable to (un)set IPHC

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 15, 2016

Okay, obviously this PR still needs some work ^^". Will do as soon as I find some time.

@miri64 miri64 added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Mar 15, 2016
@miri64 miri64 modified the milestone: Release 2016.07 Mar 29, 2016
@miri64 miri64 force-pushed the ethertype/enh/6loenc branch from efca6e4 to 9a1b7d3 Compare May 31, 2016 15:05
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented May 31, 2016

Okay, I've updated this PR a little bit, now at least sending is working, but reception still doesn't work and it needs some investigation to find out why (I suspect some unexpected behavior regarding neighbor discovery ;-)).

Changes I did:

  • Rebase to current master,
  • Update of draft URL, and
  • I realized, that shell: ifconfig: fixes #4028 made 6lo for the ifconfig command read-only ⇒ The flag needs to be set on start-up. For that I introduced a set pseudo-modules gnrc_sixloenc% (to inform the build about the slightly different configuration) and a constant GNRC_SIXLOENC_IFACE to allow for that configuration.

I will provide a dissector in a separate PR as soon as I found a solution for the reception problem.

@kYc0o
Copy link
Copy Markdown
Contributor

kYc0o commented Jul 25, 2016

Feature freeze -> postponed.

@kYc0o kYc0o modified the milestones: Release 2016.10, Release 2016.07 Jul 25, 2016
@miri64 miri64 force-pushed the ethertype/enh/6loenc branch from 9a1b7d3 to 8670a7a Compare September 29, 2016 12:16
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 29, 2016

Finally came around to do something for this PR. Rebased and fixed. Problem was the header compression and the neighbor discovery: they were not able to handle MAC-48 link-layer addresses. Now they are. Regarding the "Decode As..." problem in wireshark: I issued a question for that to wireshark.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 1, 2016

In the meantime, here is a little lua hack you can put into your ~/.config/wireshark/plugins directory:

-- get 6LoWPAN dissector
sixlo = Dissector.get("6lowpan")
-- get Ethertype dissector table
eth_table = DissectorTable.get("ethertype")
-- add 6LoWPAN dissector for experimental ethertype
eth_table:add(0x88b6, sixlo)

Note that this generates output that has a little bit of a messed up IPHC, since wiresharks IPHC implementation seems to expect IEEE 802.15.4 frames ;-).

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 31, 2016

Postponed due to Feature Freeze.

@miri64 miri64 modified the milestones: Release 2017.01, Release 2016.10 Oct 31, 2016
@OlegHahm
Copy link
Copy Markdown
Member

@miri64, if you're okay we can try to merge this at the next H&A.

@OlegHahm OlegHahm added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Jan 15, 2017
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 15, 2017

👍

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 24, 2017

You can test with gnrc_networking on native with the following patch

diff --git a/examples/gnrc_networking/Makefile b/examples/gnrc_networking/Makefile
index fb8bfe8..1ee9781 100644
--- a/examples/gnrc_networking/Makefile
+++ b/examples/gnrc_networking/Makefile
@@ -19,6 +19,7 @@ USEMODULE += gnrc_netdev_default
 USEMODULE += auto_init_gnrc_netif
 # Specify the mandatory networking modules for IPv6 and UDP
 USEMODULE += gnrc_ipv6_router_default
+USEMODULE += gnrc_sixloenc_router_default
 USEMODULE += gnrc_udp
 # Add a routing protocol
 USEMODULE += gnrc_rpl
@@ -38,7 +39,7 @@ USEMODULE += netstats_rpl
 # Comment this out to disable code in RIOT that does safety checking
 # which is not needed in a production environment but helps in the
 # development process:
-CFLAGS += -DDEVELHELP
+CFLAGS += -DDEVELHELP -DGNRC_SIXLOENC_IFACE=7
 
 # Comment this out to join RPL DODAGs even if DIOs do not contain
 # DODAG Configuration Options (see the doc for more info)

and by adding a small dissector (which will hopefully be fixed in wireshark upstream soonish):

mkdir ~/.config/wireshark/plugins/
echo "-- get 6LoWPAN dissector
sixlo = Dissector.get("6lowpan")
-- get Ethertype dissector table
eth_table = DissectorTable.get("ethertype")
-- add 6LoWPAN dissector for 6LoENC ethertype
eth_table:add(0xa0ed, sixlo)" > ~/.config/wireshark/plugins/6loenc.lua

@OlegHahm
Copy link
Copy Markdown
Member

Hm, while pinging I get wrong ICMP checksums in Wirshark.

@OlegHahm
Copy link
Copy Markdown
Member

Ah, no wonder the source and destination addresses are corrupted, both are fe80:: (I was pinging the link local address).

@PeterKietzmann PeterKietzmann modified the milestones: Release 2017.01, Release 2017.04 Jan 26, 2017
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 28, 2017

Hm, while pinging I get wrong ICMP checksums in Wirshark.

Ah, no wonder the source and destination addresses are corrupted, both are fe80:: (I was pinging the link local address).

On Oct 1, 2016 @miri64 wrote:

Note that this generates output that has a little bit of a messed up IPHC, since wiresharks IPHC implementation seems to expect IEEE 802.15.4 frames ;-).

Since the addresses are in different places in IEEE 802.15.4 and Ethernet the compression of course causes garbage output in Wireshark. If I find the time I will look into it in wireshark.

@miri64 miri64 removed the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Nov 6, 2017
@smlng
Copy link
Copy Markdown
Member

smlng commented Dec 15, 2017

@miri64 would you rebase, if this PR is still on? Otherwise close as memo?!

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Dec 18, 2017

Would be nice to have RFC 7973 working. However, at the moment this has low priority for me and I would rather see #6121 merged first that this PR.

All in all, let's keep it open at least until the next release.... After that I might give up. However, the number 4861 is kind of important to me ;-)

@smlng
Copy link
Copy Markdown
Member

smlng commented Jan 12, 2018

at the moment this has low priority

Remove milestone, until further development.

@smlng smlng removed this from the Release 2018.01 milestone Jan 12, 2018
@miri64 miri64 added the State: archived State: The PR has been archived for possible future re-adaptation label Feb 15, 2018
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Feb 15, 2018

Will revive this maybe later-on, but for now I'm closing it as memo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: archived State: The PR has been archived for possible future re-adaptation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants