'OPMIP - Open PMIPv6'

PrevUpHomeNext

Write an opmip-mag event driver

ICMP driver
IEEE 802.21 driver

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] Note

Check opmip/plugins/test/ for an example of how to implement a plugin.

You can also check opmip/app/opmip-mag/drivers/ for the implementation of the MadWifi driver.

[Important] Important

madwifi and dummy cannot be used to name custom drivers has the names are used by OPMIP to identify the built-in drivers.

OPMIP-MAG ICMP driver options usage:

<local interface 1> <local interface N>

Testbed configuration

ICMP

MAG 1

  • ath0: HWaddr: 00:80:48:62:e7:bd
  • control: HWaddr: 00:03:1d:07:15:7f ; inet6 addr: 2001:aaaa:bbbb:cccc::4/64 Scope:Global

MAG 2

  • ath0: HWaddr: 00:80:48:62:e7:e8
  • control: HWaddr: 00:03:1d:07:15:8e ; inet6 addr: 2001:aaaa:bbbb:cccc::1/64 Scope:Global

LMA

  • control: HWaddr: 00:03:1d:07:15:73 ; inet6 addr: 2001:aaaa:bbbb:cccc::5/64 Scope:Global

MN

  • ath1: HWaddr: 00:80:48:5f:a2:8b

Node database configuration

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"
                }
        ]
}

Execution commands

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>"]

Testbed configuration

80221MAG

MAG 1

  • ath0: HWaddr: 00:80:48:62:e7:bd
  • control: HWaddr: 00:03:1d:07:15:7f ; inet6 addr: 2001:aaaa:bbbb:cccc::4/64 Scope:Global

MAG 2

  • ath0: HWaddr: 00:80:48:62:e7:e8
  • control: HWaddr: 00:03:1d:07:15:8e ; inet6 addr: 2001:aaaa:bbbb:cccc::1/64 Scope:Global

LMA

  • control: HWaddr: 00:03:1d:07:15:73 ; inet6 addr: 2001:aaaa:bbbb:cccc::5/64 Scope:Global

MN

  • ath1: HWaddr: 00:80:48:5f:a2:8b

Configuration files

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

Execution commands

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.

Testbed configuration

80221_MAG-POA

MAG 1

  • ath0: HWaddr: 00:80:48:62:e7:bd
  • control: HWaddr: 00:03:1d:07:15:7f ; inet6 addr: 2001:aaaa:bbbb:cccc::4/64 Scope:Global

MAG 2

  • ath0: HWaddr: 00:80:48:62:e7:e8
  • control: HWaddr: 00:03:1d:07:15:8e ; inet6 addr: 2001:aaaa:bbbb:cccc::1/64 Scope:Global

LMA

  • control: HWaddr: 00:03:1d:07:15:73 ; inet6 addr: 2001:aaaa:bbbb:cccc::5/64 Scope:Global

MN

  • ath1: HWaddr: 00:80:48:5f:a2:8b

Configuration files

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

Execution commands

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.


PrevUpHomeNext