batman project

26
BATMAN project 김김김 2015.11.25 Mobile Convergence LAB, Department of Computer Engineering, Kyung Hee University.

Upload: kyunghee-univ

Post on 10-Jan-2017

347 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Batman project

BATMAN project

김준호2015.11.25

Mobile Convergence LAB,Department of Computer Engineering,

Kyung Hee University.

Page 2: Batman project

INDEX

1. Overview

2. BATMAN

3. BATMAN daemon(batmand)

4. BATMAN-adv

5. BATCTL

6. ALFRED

7. My program(GOTHAM)

Page 3: Batman project

Overview

1. BATMAN- Routing protocol

2. BATMAN daemon(batmand)- First implementation of BATMAN routing protocol (Layer 3)

3. BATMAN-adv (batman-adv)- Substantive implementation of BATMAN routing protocol (Layer 2)

4. BATCTL (batctl)- Managing, Debugging tool

5. ALFRED (alfred)- User space daemon (vis, hostname, DNS information, local weather forecast etc.)

Page 4: Batman project

BATMAN

1. BATMAN(Better Approach To Mobile Ad hoc Network)2. 기존 Routing protocol 과 다름

- 기존의 routing protocol 은 wireless ad-hoc network 에 맞지 않다 .- Wireless ad-hoc network

- Unstructured, Dynamically change topology, Unreliable3. 전체 경로는 기억 X -> 노드 사이의 가장 좋은 링크 정보만 기억

- Routing 시 무조건 좋은 쪽으로 보냄 ( 목적지에 따라 ) 4. OGM(OriGinator Message)

- 각 노드에서 OGM 을 broadcast, 이웃 노드가 OGM 을 받으면 source 를 자기 자신의 주소로 바꾼 뒤 다시 re-broadcast

Page 5: Batman project

BATMAN DAEMON(batmand)

1. Start on layer 3(IP layer)2. 개발 중지 ( 현재 ) – 현재 batman-adv 로 개발 중

- 처음 테스트 용으로 개발3. Internet connection

- http://www.open-mesh.org/projects/batmand/wiki/InternetTuning 4. Visualization

- Vis server 생성- 각 노드의 local view 들을 모아 graph 생성

- 동작 X- s3d.berlios.de – 최신버전 : 2011.01.05

- http://s3d.sourceforge.net- 설치 했으나 사용법을 모르겠음

Page 6: Batman project

BATMAN DAEMON(batmand)

Page 7: Batman project

BATMAN-adv

1. BATMAN routing protocol 구현물- 현재 BATMAN 0.3(BATMAN Ⅳ) – default routing algorithm

2. 2007 년부터 개발 시작- 개발 인원 : 6 명

3. batmand 와 구별하기 위해 – adv 명명4. Layer 2 에서 동작5. Implementation as a kernel module

- overhead 를 줄이기 위해6. BATMAN-adv 를 설치하지 않아도 mesh-network 에 들어 올 수 O

Page 8: Batman project

BATMAN-adv

1. Layer 2- Network layer agnostic

- IPv4, IPv6, DHCP etc. 상관 없음- Nodes can participate in a mesh without having an IP- Easy integration of non-mesh (mobile) clients- Roaming of non-mesh clients (hand-over)

Page 9: Batman project

BATMAN-adv (Quick Start Guide)

개발 환경 : Raspberry Pi 2 OS : Ubuntu mate 15.04kernel version : Linux-kernel version 3.18.0-20-rpi2BATMAN-adv version : 2014.4.0BATCTL version : 2014.3.0-2

Page 10: Batman project

BATMAN-adv (Quick Start Guide)sudo apt-get install batctl sudo stop network-managersudo ifconfig wlan0 downsudo iwconfig wlan0 mode ad-hoc essid junho_mesh channel 8

essid 별로 네트워크 구축 sudo ifconfig wlan0 upsudo modprobe batman-adv -> load batman-adv module( 이거 안 할 시 , Error - batman-adv module has not been loaded 뜸 ) sudo batctl if add wlan0sudo ifconfig wlan0 mtu 1527sudo cat /sys/class/net/wlan0/batman_adv/iface_status

"active" 라고 떠야한다 sudo ifconfig wlan0 10.0.0.10노드마다 다른 ip 주소 (10.0.0.10 은 임시 ip)sudo ifconfig bat0 192.168.0.10노드마다 다른 ip 주소 (10.0.0.10 은 임시 ip)  sudo ifconfig bat0 upsudo batctl o현재 연결된 노드가 보인다 .

Page 11: Batman project

BATMAN-adv

1. Tables- Originator table

- 모든 노드는 다른 모든 노드 리스트를 가지고 있으며 어디로 패킷을 보내야 할지 알고 있다 .

- Specific information- .

- Sample output

Page 12: Batman project

BATMAN-adv

1. Tables- Translation table

- 자신이 속해있는 mesh 에 들어오고 싶어하는 client 의 MAC 정보를 가지고 있다 .

- Specific information - (local)

- (global)

- Sample output (local)- .

Page 13: Batman project

BATMAN-adv

1. Tables- Gateway table

- 사용 가능한 모든 gateway 정보를 가지고 있다 .- Specific information

- .

- Sample output - .

Page 14: Batman project

BATMAN-adv

1. Tables- Bridge loop avoidance claim table

- Bridge loop 문제를 해결하기 위해 bridge 노드에 존재하는 client 목록과 그 노드의 주소를 가지고 있다 .

- Bridge loop avoidance backbone table- Bridge loop 문제를 해결하기 위해 bridge 노드의 backbone gateway

정보를 가지고 있다 .- Distributed ARP table – local cache table

- Cached 로 ARP 정보를 가지고 있다 (IPv4 + MAC). – LAN 으로 바로 ARP request 를 하기 위해 .

- Network coding – potential coding neighbor table- Network coding 이 가능한 모든 incoming & outgoing 정보를 가지고

있다 .

Page 15: Batman project

BATMAN-adv (Gateways)

1. How to make the internet uplink?- Gateway mode

- 인터넷이 연결되어 있는 노드는 gateway mode 로 되어있고 , 다른 노드들은 gateway client mode 로 되어있어야 한다 .

- gateway client mode 로 되어있지 않으면 routing 시 gateway 무시- non-mesh client 인터넷 연결

- Gateway 노드는 무조건 DHCP 서버가 존재해야 한다 .- .

- .

Page 16: Batman project

BATMAN-adv (Gateways)

1. How to make the internet uplink? (Configuration)- 인터넷 bandwidth 를 조절 할 수 있다 . (gateway)

- batctl gw_mode server 5mbit/1mbit- (download bandwidth of 5Mbit, upload of 1Mbit)

- Client setting- batctl gw_mode client

- Status show- batctl gwl- batctl gw_mode

Page 17: Batman project

BATMAN-adv (Ap-isolation)

1. Ap isolation mode 설정 가능- .

- inter-meshnode communications prevention only

2. Configure- batctl ap_isolation 1- batctl ap 1

Page 18: Batman project

BATMAN-adv (NetworkCoding)

1. Network Coding 설정 가능- 네트워크 코딩은 relay node 가 두 개의 packet 을 한번에 전송하는 것이다 .- CATWOMAN project- .

-

2. Configure- Setting at compile time- disable -> batctl nc 0

Page 19: Batman project

BATMAN-adv (Roaming-improvements)

1. Hand-over (?)- non-mesh client 가 roaming 시 ( 새로운 mesh node 로 switching 시 )

interruption time 을 줄이고 , synchronization issue 를 제거한다 .- TVLV(Type-Version-Length-Value)- Translation table- http://www.open-mesh.org/projects/batman-adv/wiki/Client-roaming- http://www.open-mesh.org/projects/batman-adv/wiki/TVLV

Page 20: Batman project

BATMAN-adv (Etc.)

1. ELP(Echo Location Protocol)- 새로운 neighbors 을 찾을 때 OGM 이 아닌 ELP 를 사용해서 찾는다 .

2. Bridge loop avoidance- loop avoidance mechanism

3. Network wide multi link optimization- 한 노드에 여러 개의 인터페이스가 존재할 때 최적의 길로 optimize 한다 .

Page 21: Batman project

BATCTL (batctl)

1. Configuration tool- Mesh network 에 interface 추가 및 제거- batman-adv 설정 변경 및 확인 (OGM interval setting etc.)- batman-adv 기능 변경 및 확인 (gateway announcement etc.)

2. Debugging tool- Ping & traceroute nodes(MAC address)- Parse log files- Retrieve live information from the batman-adv module- List 확인 (Originator, client, available gateway etc.)

- http://downloads.open-mesh.org/batman/manpages/batctl.8.html

Page 22: Batman project

ALFRED (alfred)

1. ALFRED(Almighty Lightweight Fact Remote Exchange Daemon)- user space daemon- 각 노드에서 필요한 정보들을 모은다 .- batman-adv visualization 을 위해 설계- hostname, phone books, administration info, DNS info 할당 가능- unix daemon background system.

2. batadv-vis- alfred 를 통해 neighbor 정보와 자신의 local 정보를 가져와 네트워크 구조를

json, graphviz 로 나타낸다 .- graphviz( 프로그램 ) 를 통해 그린 그림 ( 다음 장 )

3. alfred-gpsd- GPS 정보를 받아와 그림을 그림 .

4. alfredA- Android 에서 돌아가는 alfred- slave server 역할을 할 수 있다 .

Page 23: Batman project

ALFRED (batadv-vis)

Page 24: Batman project

sudo apt-get install gitgit clone git://git.open-mesh.org/alfred.gitsudo apt-get install gcc make make 시 에러 발생 (make pkg config not found)

sudo apt-get install pkg-config - 해결 (make no libcap development libraries found)

sudo apt-get install libcap-dev - 해결 (make no libgps development libraries found)

sudo apt-get install libgps-dev - 해결

ALFRED ( 설치 )

Page 25: Batman project

ALFRED (alfred + batadv-vis)

1. Network topology 생성- 모든 노드에 alfred 서버 시작

- alfred –i bat0 –m (-m 은 master 를 의미 )- 모든 노드에 batadv-vis 서버 시작

- batadv-vis –i bat0 -s- batadv-vis 명령 -> graphviz-compatible vis output

- .

- http://git.open-mesh.org/alfred.git/blob_plain/refs/heads/master:/README

Page 26: Batman project

ALFRED (architecture)

1. Structurenode – alfred 가 돌고 있는 de-vice

master – alfred server 로써 , 주위의 다른 master 들과 함께 주기적으로 들어오는 정보를 저장하고 synchronize 를 맞추며 slave 에게 정보를 제공하는 device

slave – alfred server 로써 , 주기적으로 데이터를 master 에게 보내며 , 필요 시 master 에 정보를 request

slave 는 주위에 있는 master 중 가장 TQ 가 좋은 node 만을 알고 있다 .