opmip-mag driver is the responsible for detect attach/dettach events and pass the correspondent mobile node id to the opmip-mag application.
OPMIP has built-in support for wireless cards with MadWifi drivers, and also an implementation of a dummy driver that generate random events, useful for experiments. But you can also write your own drivers to detect events, for instance, from 802.1x, or any other technology.
To build your own driver you must write a C++ class that extends opmip::plugins::driver
and implement start
and stop
functions.
The code must be compiled as a shared library. The generated .so
is then used by the opmip-mag application
(see Usage).
Note | |
---|---|
Check
You can also check |
Important | |
---|---|
|
OPMIP-MAG ICMP driver options usage:
<local interface 1> <local interface N>
MAG 1
MAG 2
LMA
MN
node.db file
The node database contains the database of LMA/MAG nodes, also known as router nodes, and the mobile nodes database. It will be used by the MAGs and the LMA nodes. It uses the JSON format:
{ "router-nodes" : [ { "id" : "node5", "ip-address" : "2001:aaaa:bbbb:cccc::5", "ip-scope-id" : "4" }, { "id" : "node4", "ip-address" : "2001:aaaa:bbbb:cccc::4", "ip-scope-id" : "4" }, { "id" : "node1", "ip-address" : "2001:aaaa:bbbb:cccc::1", "ip-scope-id" : "4" } ], "mobile-nodes" : [ { "id" : "mn1", "ip-prefix" : [ "3001:aaaa:bbbb:cccc::/64" ], "link-address" : [ "00:80:48:5f:a2:8b" ], "lma-id" : "node5" } ] }
LMA:
./opmip-lma -d node.db
MAG1:
./opmip-mag -d node.db -e icmp ath0
MAG2:
./opmip-mag -d node.db -e icmp ath0
MN:
In order to enable the MN to send router solicitation messages, “/proc/sys/net/ipv6/conf/all/forwarding” must be set to 0 (zero). Then, just connect the MN to one of the MAGs network.
OPMIP-MAG IEEE 802.21 driver options usage:
"<local MIHF>" "<local interface 1> <local interface N>" ["<remote MIHF 1> <interface>, <remote MIHF N> <interface>"]
MAG 1
MAG 2
LMA
MN
node.db file
The node database contains the database of LMA/MAG nodes, also known as router nodes, and the mobile nodes database. It will be used by the MAGs and the LMA nodes. It uses the JSON format:
{ "router-nodes" : [ { "id" : "node5", "ip-address" : "2001:aaaa:bbbb:cccc::5", "ip-scope-id" : "4" }, { "id" : "node4", "ip-address" : "2001:aaaa:bbbb:cccc::4", "ip-scope-id" : "4" }, { "id" : "node1", "ip-address" : "2001:aaaa:bbbb:cccc::1", "ip-scope-id" : "4" } ], "mobile-nodes" : [ { "id" : "mn1", "ip-prefix" : [ "3001:aaaa:bbbb:cccc::/64" ], "link-address" : [ "00:80:48:5f:a2:8b" ], "lma-id" : "node5" } ] }
Link SAP configuration file
[link] id=link1 port = 1235 tec = 802_11 link_addr_list = ath0 00:80:48:62:e7:bd event_list = link_detected, link_up, link_down, link_parameters_report, link_going_down, link_handover_imminent, link_handover_complete [mihf] ip=127.0.0.1 local_port=1025
MAG 1 MIHF configuration file (for the MAG 2 MIHF the configuration file is identical)
[mihf] id = mihf1 local_port = 1025 remote_port = 4551 transport = udp
LMA:
./opmip-lma -d node.db
MAG 1:
./odtone-mihf --conf.file=./odtone.conf ./link_sap_icmp --conf.file=./link_sap_icmp.conf ./opmip-mag -d node.db -e ieee802.21 mihf1 "control ath0"
MAG 2:
./odtone-mihf --conf.file=./odtone.conf ./link_sap_icmp –conf.file=./link_sap_icmp.conf ./opmip-mag -d node.db -e ieee802.21 mihf1 "control ath0"
MN:
In order to enable the MN to send router solicitation messages, “/proc/sys/net/ipv6/conf/all/forwarding” must be set to 0 (zero). Then, just connect the MN to one of the MAGs network.
MAG 1
MAG 2
LMA
MN
node.db file
The node database contains the database of LMA/MAG nodes, also known as router nodes, and the mobile nodes database. It will be used by the MAGs and the LMA nodes. It uses the JSON format:
{ "router-nodes" : [ { "id" : "node5", "ip-address" : "2001:aaaa:bbbb:cccc::5", "ip-scope-id" : "4" }, { "id" : "node4", "ip-address" : "2001:aaaa:bbbb:cccc::4", "ip-scope-id" : "4" }, { "id" : "node1", "ip-address" : "2001:aaaa:bbbb:cccc::1", "ip-scope-id" : "4" } ], "mobile-nodes" : [ { "id" : "mn1", "ip-prefix" : [ "3001:aaaa:bbbb:cccc::/64" ], "link-address" : [ "00:80:48:5f:a2:8b" ], "lma-id" : "node5" } ] }
Link SAP configuration file
[link] id=link1 port = 1235 tec = 802_11 link_addr_list = ath0 00:80:48:62:e7:bd event_list = link_detected, link_up, link_down, link_parameters_report, link_going_down, link_handover_imminent, link_handover_complete [mihf] ip=127.0.0.1 local_port=1025
MAG 1 MIHF configuration file (for the MAG 2 MIHF the configuration file is identical)
[mihf] id = mihf1 local_port = 1025 remote_port = 4551 peers = poa1_mihf 10.110.1.2 4551 udp transport = udp
PoA 1 MIHF configuration file (for the MAG 2 MIHF the configuration file is identical)
[mihf] id = poa1_mihf local_port = 1025 remote_port = 4551 peers = mihf1 10.110.1.4 4551 udp transport = udp
LMA:
./opmip-lma -d node.db
PoA 1:
./odtone-mihf --conf.file=./odtone.conf ./link_sap_icmp --conf.file=./link_sap_icmp.conf
PoA 2:
./odtone-mihf --conf.file=./odtone.conf ./link_sap_icmp --conf.file=./link_sap_icmp.conf
MAG 1:
./odtone-mihf --conf.file=./odtone.conf ./opmip-mag -d node.db -e ieee802.21 mihf1 "control ath0" “poa1_mihf control”
MAG 2:
./odtone-mihf --conf.file=./odtone.conf ./opmip-mag -d node.db -e ieee802.21 mihf1 "control ath0" “poa2_mihf control”
MN:
In order to enable the MN to send router solicitation messages, “/proc/sys/net/ipv6/conf/all/forwarding” must be set to 0 (zero). Then, just connect the MN to one of the MAGs network.