Changes between Version 9 and Version 10 of GpoLab/MyplcNodeDataplaneInterfaces
- Timestamp:
- 08/08/11 14:40:07 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GpoLab/MyplcNodeDataplaneInterfaces
v9 v10 3 3 = Configuring dataplane interfaces on MyPLC PlanetLab nodes = 4 4 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. 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. For upgrade instructions specific to your plficonfig version, please see the INSTALL file included in the source distribution. 6 6 7 7 == Purpose of the `plifconfig` Tool == … … 18 18 || <python-version> || The version of python installed on your node || Examples: python2.5, python2.6 || 19 19 || <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 || 20 21 21 22 === Set Up the Environment === … … 33 34 ==== Add VLAN Tagtype to !PlanetLab Database on MyPLC Machine ==== 34 35 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: 36 To 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: 43 39 {{{ 44 40 sudo ~/<plifconfig-version>/myplc/add_vlan_tagtype_to_plc_db -- -n … … 46 42 }}} 47 43 44 If '''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 {{{ 48 sudo ~/<plifconfig-version>/myplc/add_vlan_tagtype_to_plc_db 49 }}} 50 51 * Confirm tagtype was added: 52 {{{ 53 sudo ~/<plifconfig-version>/myplc/add_vlan_tagtype_to_plc_db -- -n 54 echo $? 55 }}} 56 48 57 If '''1''' is printed out by the echo command then the VLAN tagtype was successfully added to the !PlanetLab database. 49 58 50 59 ==== Apply the Patch to `plnet.py` File on All Nodes ==== 51 60 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 61 Make 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. 55 65 {{{ 56 66 cp /usr/lib/<python-version>/site-packages/plnet.py ~/plnet.py.orig 57 67 }}} 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 72 If 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 {{{ 76 scp root@<myplc-node>:~/plnet.py.orig ~/plnet.py 77 }}} 78 79 * On your MyPLC machine, apply the patch: 80 {{{ 81 patch ~/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 {{{ 86 scp ~/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 {{{ 93 service nm restart 94 }}} 95 96 ===== Option 2: Patch a Previously Patched Version of plnet.py ===== #StepPatch 97 98 If you know that you have the second-most recent version of plifconfig installed, then you can use this option. 99 100 If you log into your MyPLC machine and run 101 {{{ 102 sudo plifconfig --version 103 }}} 104 then 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`. 58 105 59 106 * From your MyPLC machine, copy the `plnet.py` file over from your MyPLC-based !PlanetLab node. … … 64 111 * On your MyPLC machine, apply the patch: 65 112 {{{ 66 patch ~/plnet.py < ~/<plifconfig-version>/nodes/plnet .patch113 patch ~/plnet.py < ~/<plifconfig-version>/nodes/plnet_<version-step>.patch 67 114 }}} 68 115 … … 97 144 }}} 98 145 146 You should now be finished setting up the environment for plifconfig. 147 99 148 === Using the `plifconfig` Tool === 100 101 149 102 150 ==== Getting Started ==== … … 123 171 If 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`. 124 172 173 Options 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 125 183 {{{ 126 184 [you@myplc] $ sudo plifconfig list … … 155 213 156 214 ====== Adding a VLAN Interface to a Node ====== 215 216 Options 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 || 157 224 158 225 {{{ … … 187 254 ====== Adding an Alias to a Node ====== 188 255 256 Options 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 189 265 {{{ 190 266 [you@myplc] $ sudo plifconfig list … … 219 295 220 296 ====== Adding a Alias of a VLAN Interface to a Node ====== 297 298 Options 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 || 221 307 222 308 {{{ … … 254 340 255 341 ===== Viewing Interface Details ===== 342 343 Options 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 || 256 348 257 349 To 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 }}}. … … 277 369 278 370 If 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 372 Options 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 || 279 377 280 378 {{{ … … 414 512 * Delete all SUBSYSTEM comment-and-line blocks except this one, and save the file 415 513 * Reboot the node 514