Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
20-Nov-2015
SAKURA Internet Research Center.
Senior Researcher / Naoto MATSUMOTO
kernel compile for 6LoWPAN
1) Linux kernel compile for IPv6 over Bluetooth (6LoWPAN)
# uname -sr ; cat /etc/redhat-release
Linux 3.10.0-229.20.1.el7.x86_64
CentOS Linux release 7.1.1503 (Core)
# yum install -y wget net-tools bzip2 bc openssl-devel bluez usbutils
# yum groupinstall "Development Tools" -y
# cd /usr/local/src/
# wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.1.13.tar.xz
# tar vxf ./linux-4.1.13.tar.xz
# cd /usr/local/src/linux-4.1.13
# cp /boot/config-3.10.0-229.20.1.el7.x86_64 ./.config
# make oldconfig
# vi .config
CONFIG_6LOWPAN=m
CONFIG_6LOWPAN_NHC=m
CONFIG_6LOWPAN_NHC_DEST=m
CONFIG_6LOWPAN_NHC_FRAGMENT=m
CONFIG_6LOWPAN_NHC_HOP=m
CONFIG_6LOWPAN_NHC_IPV6=m
CONFIG_6LOWPAN_NHC_MOBILITY=m
CONFIG_6LOWPAN_NHC_ROUTING=m
CONFIG_6LOWPAN_NHC_UDP=m
CONFIG_IEEE802154_6LOWPAN=m
CONFIG_BT_6LOWPAN=m
# make; make modules_install; make install
# sync; sync; sync; reboot
# uname -sr
Linux 4.1.13
SOURCE: SAKURA Internet Research Center. 11/2015
NAT64
Linux
BT Device
BT4.0
(USB)
IPv6 over Bluetooth
(6LoWPAN)
INTERNET
2) IPv6 over Bluetooth (6LoWPAN) Config
# modprobe bluetooth_6lowpan
# hciconfig hci0 up
# echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
3) Connect IPv6 over Bluetooth (6LoWPAN)
# hcitool lescan
LE Scan ...
00:6B:53:21:30:A8 IPv6ICMP
# echo "connect 00:6B:53:21:30:A8 1" > /sys/kernel/debug/bluetooth/6lowpan_control
4) Check Interface Status (6LoWPAN)
# hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 5C:F3:70:63:06:D9 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
# ifconfig -a
bt0: flags=4177<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
inet6 fe80::5ef3:70ff:fe63:6d9 prefixlen 64 scopeid 0x20<link>
5) Ping6 over IP over Bluetooth (6LoWPAN)
# ping6 -c2 -I bt0 ff02::1 | grep DUP
64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=1 ttl=64 time=77.5 ms (DUP!)
# ping6 fe80::26b:53ff:fe21:30a8 -I bt0
64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=1 ttl=64 time=146 ms
64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=2 ttl=64 time=157 ms
64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=3 ttl=64 time=100 ms
NAT64
6LoWPAN Config & Connect
SOURCE: SAKURA Internet Research Center. 11/2015
Linux
BT Device
BT4.0
(USB)
IPv6 over Bluetooth
(6LoWPAN)
INTERNET

More Related Content

How to twist a IPv6 over Bluetooth (6lowpan)

  • 1. 20-Nov-2015 SAKURA Internet Research Center. Senior Researcher / Naoto MATSUMOTO
  • 2. kernel compile for 6LoWPAN 1) Linux kernel compile for IPv6 over Bluetooth (6LoWPAN) # uname -sr ; cat /etc/redhat-release Linux 3.10.0-229.20.1.el7.x86_64 CentOS Linux release 7.1.1503 (Core) # yum install -y wget net-tools bzip2 bc openssl-devel bluez usbutils # yum groupinstall "Development Tools" -y # cd /usr/local/src/ # wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.1.13.tar.xz # tar vxf ./linux-4.1.13.tar.xz # cd /usr/local/src/linux-4.1.13 # cp /boot/config-3.10.0-229.20.1.el7.x86_64 ./.config # make oldconfig # vi .config CONFIG_6LOWPAN=m CONFIG_6LOWPAN_NHC=m CONFIG_6LOWPAN_NHC_DEST=m CONFIG_6LOWPAN_NHC_FRAGMENT=m CONFIG_6LOWPAN_NHC_HOP=m CONFIG_6LOWPAN_NHC_IPV6=m CONFIG_6LOWPAN_NHC_MOBILITY=m CONFIG_6LOWPAN_NHC_ROUTING=m CONFIG_6LOWPAN_NHC_UDP=m CONFIG_IEEE802154_6LOWPAN=m CONFIG_BT_6LOWPAN=m # make; make modules_install; make install # sync; sync; sync; reboot # uname -sr Linux 4.1.13 SOURCE: SAKURA Internet Research Center. 11/2015 NAT64 Linux BT Device BT4.0 (USB) IPv6 over Bluetooth (6LoWPAN) INTERNET
  • 3. 2) IPv6 over Bluetooth (6LoWPAN) Config # modprobe bluetooth_6lowpan # hciconfig hci0 up # echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable 3) Connect IPv6 over Bluetooth (6LoWPAN) # hcitool lescan LE Scan ... 00:6B:53:21:30:A8 IPv6ICMP # echo "connect 00:6B:53:21:30:A8 1" > /sys/kernel/debug/bluetooth/6lowpan_control 4) Check Interface Status (6LoWPAN) # hciconfig -a hci0: Type: BR/EDR Bus: USB BD Address: 5C:F3:70:63:06:D9 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING PSCAN # ifconfig -a bt0: flags=4177<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280 inet6 fe80::5ef3:70ff:fe63:6d9 prefixlen 64 scopeid 0x20<link> 5) Ping6 over IP over Bluetooth (6LoWPAN) # ping6 -c2 -I bt0 ff02::1 | grep DUP 64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=1 ttl=64 time=77.5 ms (DUP!) # ping6 fe80::26b:53ff:fe21:30a8 -I bt0 64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=1 ttl=64 time=146 ms 64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=2 ttl=64 time=157 ms 64 bytes from fe80::26b:53ff:fe21:30a8: icmp_seq=3 ttl=64 time=100 ms NAT64 6LoWPAN Config & Connect SOURCE: SAKURA Internet Research Center. 11/2015 Linux BT Device BT4.0 (USB) IPv6 over Bluetooth (6LoWPAN) INTERNET