Changes between Version 9 and Version 10 of GpoLab/MyplcNodeDataplaneInterfaces


Ignore:
Timestamp:
08/08/11 14:40:07 (11 years ago)
Author:
tupty@bbn.com
Comment:

gst 2384: update public docs to reflect instructions for plifconfig-2.2

Legend:

Unmodified
Added
Removed
Modified
  • GpoLab/MyplcNodeDataplaneInterfaces

    v9 v10  
    33= Configuring dataplane interfaces on MyPLC PlanetLab nodes =
    44
    5 This page discusses techniques for managing secondary interfaces on MyPLC-controlled PlanetLab nodes, including installation and usage of the BBN developed plifconfig tool, and tips for handling secondary interface labeling.
     5This page discusses techniques for managing secondary interfaces on MyPLC-controlled PlanetLab nodes, including installation and usage of the BBN developed plifconfig tool, and tips for handling secondary interface labeling.  For upgrade instructions specific to your plficonfig version, please see the INSTALL file included in the source distribution.
    66
    77== Purpose of the `plifconfig` Tool ==
     
    1818|| <python-version>     || The version of python installed on your node || Examples: python2.5, python2.6 ||
    1919|| <myplc-node>         || FQDN of a target MyPLC-based !PlanetLab node ||                                ||
     20|| <version-step>       || The step between versions for a patch file   || Example: 2.1_to_2.2            ||
    2021
    2122=== Set Up the Environment ===
     
    3334==== Add VLAN Tagtype to !PlanetLab Database on MyPLC Machine ====
    3435
    35 To create VLAN subinterfaces, you need to add a new tag type to your !PlanetLab database.
    36 
    37  * Run the `add_vlan_tagtype_to_plc_db` script:
    38 {{{
    39 sudo ~/<plifconfig-version>/myplc/add_vlan_tagtype_to_plc_db
    40 }}}
    41 
    42  * Confirm tagtype was added:
     36To create VLAN subinterfaces, you need to add a new tag type to your !PlanetLab database.  You should only do this if you have not already added the VLAN tagtype.
     37
     38 * Confirm that you have not added the VLAN tag type yet:
    4339{{{
    4440sudo ~/<plifconfig-version>/myplc/add_vlan_tagtype_to_plc_db -- -n
     
    4642}}}
    4743
     44If '''1''' is printed out by the echo command then the VLAN tagtype already exists, and you should jump to [#ApplythePatchtoplnet.pyFileonAllNodes applying the patch]; otherwise, continue with this section.
     45
     46 * Run the `add_vlan_tagtype_to_plc_db` script:
     47{{{
     48sudo ~/<plifconfig-version>/myplc/add_vlan_tagtype_to_plc_db
     49}}}
     50
     51 * Confirm tagtype was added:
     52{{{
     53sudo ~/<plifconfig-version>/myplc/add_vlan_tagtype_to_plc_db -- -n
     54echo $?
     55}}}
     56
    4857If '''1''' is printed out by the echo command then the VLAN tagtype was successfully added to the !PlanetLab database.
    4958
    5059==== Apply the Patch to `plnet.py` File on All Nodes ====
    5160
    52 In order to create VLAN interfaces on a node, you need to patch your `plnet.py` file on '''each''' !PlanetLab node associated with your MyPLC.  The following instructions assume that your MyPLC machine has patch installed, but the individual !PlanetLab nodes do not.
    53 
    54  * Log into your MyPLC-based !PlanetLab node as root and make a backup of the existing `plnet.py` file
     61Make sure that you have a backup of the PlanetLab distributed originial `plnet.py`.
     62
     63 * This may exist in `~/plnet.py.orig` if you followed previous instructions here.
     64 * If you have not patched the file before, then create a backup of the original file on your nodes.
    5565{{{
    5666cp /usr/lib/<python-version>/site-packages/plnet.py ~/plnet.py.orig
    5767}}}
     68 * If you cannot find a copy of the original file on your MyPLC-based PlanetLab nodes, then you can also find one on the MyPLC machine under `/usr/lib/<python-version>/site-packages/plnet.py`.  Save a copy of this file to `~/plnet.py.orig` on your nodes.
     69
     70===== Option 1: Apply the Full Patch the Original File ===== #FullPatch
     71
     72If you are unsure which version of plifconfig you are running, or if you have not installed plifconfig before, you should use this option.
     73
     74 * From your MyPLC machine, copy the original `plnet.py.orig` file over from your MyPLC-based !PlanetLab node.
     75{{{
     76scp root@<myplc-node>:~/plnet.py.orig ~/plnet.py
     77}}}
     78
     79 * On your MyPLC machine, apply the patch:
     80{{{
     81patch ~/plnet.py < ~/<plifconfig-version>/nodes/plnet_full.patch
     82}}}
     83
     84 * If the patch succeeded, copy the newly patched file from your patch machine over to your MyPLC-based !PlanetLab node:
     85{{{
     86scp ~/plnet.py root@<myplc-node>:~/usr/lib/<python-version>/site-packages/
     87}}}
     88
     89 * If the patch did not work please let us know at gpo-infra@geni.net.
     90
     91 * Login to the MyPLC-based !PlanetLab node as root and restart !NodeManager:
     92{{{
     93service nm restart
     94}}}
     95
     96===== Option 2: Patch a Previously Patched Version of plnet.py ===== #StepPatch
     97
     98If you know that you have the second-most recent version of plifconfig installed, then you can use this option.
     99
     100If you log into your MyPLC machine and run
     101{{{
     102sudo plifconfig --version
     103}}}
     104then you can compare the version to the first number in <version-step>.  Note that the <version-step> can be found by looking at `~/<plifconfig-version>/nodes/plnet_<version-step>.patch`.
    58105
    59106 * From your MyPLC machine, copy the `plnet.py` file over from your MyPLC-based !PlanetLab node.
     
    64111 * On your MyPLC machine, apply the patch:
    65112{{{
    66 patch ~/plnet.py < ~/<plifconfig-version>/nodes/plnet.patch
     113patch ~/plnet.py < ~/<plifconfig-version>/nodes/plnet_<version-step>.patch
    67114}}}
    68115
     
    97144}}}
    98145
     146You should now be finished setting up the environment for plifconfig.
     147
    99148=== Using the `plifconfig` Tool ===
    100 
    101149
    102150==== Getting Started ====
     
    123171If you have more than one NIC attached to your host, you will need to add it to the !PlanetLab database on your MyPLC machine for it to be usable.  In the example below, I will add `eth1` to `node2.fqdn.com`.  Note that you can add interfaces without IP addresses by specifying an IP address of `0.0.0.0` and a netmask of `255.255.255.255`.
    124172
     173Options in this example:
     174||'''Option'''||'''Description'''         ||'''Notes'''                                                                                                        ||
     175|| -n         || Name of node to modify   ||                                                                                                                   ||
     176|| -i         || IP address               ||                                                                                                                   ||
     177|| -m         || Netmask                  ||                                                                                                                   ||
     178|| -d         || Device name              ||                                                                                                                   ||
     179|| -g         || Gateway IP address       || You do not need to specify a gateway if the node is not on a routable network                                     ||
     180|| --mac      || MAC address              || This should only be specified for base devices (e.g. '''not''' for subinterfaces like aliases or VLAN interfaces) ||
     181
     182
    125183{{{
    126184[you@myplc] $ sudo plifconfig list
     
    155213
    156214====== Adding a VLAN Interface to a Node ======
     215
     216Options in this example:
     217||'''Option'''||'''Description'''         ||'''Notes'''                                                                    ||
     218|| -n         || Name of node to modify   ||                                                                               ||
     219|| -i         || IP address               ||                                                                               ||
     220|| -m         || Netmask                  ||                                                                               ||
     221|| -d         || Device name              ||                                                                               ||
     222|| -g         || Gateway IP address       || You do not need to specify a gateway if the node is not on a routable network ||
     223|| --vlan     || VLAN ID                  || Creates a VLAN interface, ALWAYS use in conjunction with -d                   ||
    157224
    158225{{{
     
    187254====== Adding an Alias to a Node ======
    188255
     256Options in this example:
     257||'''Option'''||'''Description'''         ||'''Notes'''                                                                    ||
     258|| -n         || Name of node to modify   ||                                                                               ||
     259|| -i         || IP address               ||                                                                               ||
     260|| -m         || Netmask                  ||                                                                               ||
     261|| -d         || Device name              ||                                                                               ||
     262|| -g         || Gateway IP address       || You do not need to specify a gateway if the node is not on a routable network ||
     263|| --alias    || Alias name               || Creates an interface alias, ALWAYS use in conjunction with -d                 ||
     264
    189265{{{
    190266[you@myplc] $ sudo plifconfig list
     
    219295
    220296====== Adding a Alias of a VLAN Interface to a Node ======
     297
     298Options in this example:
     299||'''Option'''||'''Description'''         ||'''Notes'''                                                                    ||
     300|| -n         || Name of node to modify   ||                                                                               ||
     301|| -i         || IP address               ||                                                                               ||
     302|| -m         || Netmask                  ||                                                                               ||
     303|| -d         || Device name              ||                                                                               ||
     304|| -g         || Gateway IP address       || You do not need to specify a gateway if the node is not on a routable network ||
     305|| --vlan     || VLAN ID                  || Creates a VLAN interface, ALWAYS use in conjunction with -d                   ||
     306|| --alias    || Alias name               || Creates an interface alias, ALWAYS use in conjunction with -d                 ||
    221307
    222308{{{
     
    254340
    255341===== Viewing Interface Details =====
     342
     343Options in this example:
     344||'''Option'''||'''Description'''         ||'''Notes'''                                                    ||
     345|| -n         || Name of node to modify   ||                                                               ||
     346|| -d         || Device name              ||                                                               ||
     347|| --alias    || Alias name               || Creates an interface alias, ALWAYS use in conjunction with -d ||
    256348
    257349To look up more information about a specific node, you can use the `show` subcommand.  All of this information can also be found on the node or on the web interface, but the `show` subcommand is useful for quickly debugging issues from a central location.  Note that when querying by device, you must specify the full set of {device, vlan, alias} of the device.  For example, to see information on eth1, specify {{{ -d eth1 }}}.  To see information on eth1.123:3, specify {{{ -d eth1 --vlan 123 --alias 3 }}}.  To see information on eth1:3, specify {{{ -d eth1 --alias 3 }}}.
     
    277369
    278370If you need to remove an interface you can use the `del` subcommand.  Note that when querying by device, you must specify the full set of {device, vlan, alias} of the device.  For example, to see information on eth1, specify {{{ -d eth1 }}}.  To see information on eth1.123:3, specify {{{ -d eth1 --vlan 123 --alias 3 }}}.  To see information on eth1:3, specify {{{ -d eth1 --alias 3 }}}.
     371
     372Options in this example:
     373||'''Option'''||'''Description'''         ||'''Notes'''                                                    ||
     374|| -n         || Name of node to modify   ||                                                               ||
     375|| -d         || Device name              ||                                                               ||
     376|| --alias    || Alias name               || Creates an interface alias, ALWAYS use in conjunction with -d ||
    279377
    280378{{{
     
    414512 * Delete all SUBSYSTEM comment-and-line blocks except this one, and save the file
    415513 * Reboot the node
     514