Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Introduction: I'm working on a 6lowPAN projects of Wireless Sensor Networks. Basically, I have a set of nodes (Contiki OS) which are running on a linux host. Each nodes have its own tap interface which are bridged on br0. Inside the bridge, all things are working well : node can send request and receive properly neighbor exchanges. All exchanges are using 6lowPAN (IPV6 adaptation).

Problem: Now, I'm interested by sending request from the host to nodes. So, I add route rules for the destination bbbb::/64 to br0. I can ping any node from the host linux, unfortunately UDP requests fail. I'm using Firefox to send (through the Copper plugin) a UDP packet which is correctly received and processed by the node, but the response is rejected by the bridge which replies host unreachable (Port unreachable).

Questions: Are there constraints or particular behaviours on routing rules between bridge and its host? How can I get more log information about Linux's IP stack to determine why it doesn't forward packets to the Firefox socket?

Investigation:

  • I checked with netstat if Firefox is effectively listening on the proper response port [OK]
  • I checked with nc if the host allows UDP IPv6 exchange [OK]
  • No firewall rules [OK]
  • I manually added an IPV6 address to br0 bbbb::1/64 with and without routing rules but this didn't work (ping no works at all) [OK]
  • A lot of other exotic explorations

Basic configuration:

brctl addbr br0
ip tuntap add dev br0 mode tap
brctl addif br0 tapXXX
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
ip -6 route add bbbb::/64 dev br0
ping6 ff02::1 -I br0 [OK]
ping6 bbbb::ff02:1:2:3 [OK]
firefox on coap://[bbbb::ff02:1:2:3]/hello <= FAILED (response is blocked by br0 bridge)

Logs:

ifconfig

br0       Link encap:Ethernet  HWaddr e2:81:42:77:bf:10  
          inet6 addr: fe80::28bf:62ff:fed7:54ac/64 Scope:Link

netstat -p6

AIC Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name  
udp6       0      0 fe80::28bf:62ff:f:46939 bbbb::ff:fe00:1%1:5683  ESTABLISHED 2544/firefox  

Wireshark

fe80::28bf:62ff:fed7:54ac   bbbb::ff:fe00:1       COAP     73     Confirmable, GET, /hello1  
fe80::ff:fe00:1             fe80::28bf:62ff:fed7:54ac COAP     83     Acknowledgment, 2.05  
fe80::28bf:62ff:fed7:54ac   fe80::ff:fe00:1       ICMPv6   131    Destination Unreachable (Port unreachable)  
share|improve this question
    
Have I understood correct that you are using Cooja simulator? Personally I had always been a little uncertain what both addresses mean and it seemed that fe80:: didn't work - I couldn't ping it. ... Though it occurs to me that you might have a firewall issue. You said you've checked, could you, by chance, confuse iptables vs ip6tables? –  errordeveloper Sep 11 '12 at 7:37
    
Indeed, I have already checked ip6tables and there is no rule. I don't use cooja, I compile contiki-os on minimal-net (X86 target) to start all contiki nodes like native applications on my linux, then each of them are directly connected on a big common bridge br0. All is working well until I want to use my linux host to exchange with nodes. Transport layer is blocked on bridge (tap-side), the bridge has an unidirectional behaviour for udp packet... –  user1660251 Sep 12 '12 at 10:08
add comment

migrated from stackoverflow.com Sep 10 '12 at 20:31

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.