diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_routes.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_routes.rst new file mode 100644 index 000000000..836a8c55b --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_routes.rst @@ -0,0 +1,88 @@ +Configure routes +----------------- + +There are 2 ways to configure OS route in xCAT: + + * ``makeroutes``: command to add or delete routes on the management node or any given nodes. + * ``setroute``: script to replace/add the routes to the node, it can be used in postscripts/postbootscripts. + +``makeroutes`` or ``setroute`` will modify OS temporary route, it also modifies persistent route in ``/etc/sysconfig/static-routes`` file. + +Before using ``makeroutes`` or ``setroute`` to configure OS route, details of the routes data such as routename, subnet, net mask and gateway should be stored in ``routes`` table. + +Configure ``routes`` table +`````````````````````````` + +#. Store default route data in ``routes`` table: :: + + chdef -t route defaultroute net=default mask=255.0.0.0 gateway=10.0.0.101 + +#. Store additional route data in ``routes`` table: :: + + chdef -t route 20net net=20.0.0.0 mask=255.0.0.0 gateway=0.0.0.0 ifname=eth1 + +#. Check data in ``routes`` table: :: + + tabdump routes + #routename,net,mask,gateway,ifname,comments,disable + "30net","30.0.0.0","255.0.0.0","0.0.0.0","eth2",, + "20net","20.0.0.0","255.0.0.0","0.0.0.0","eth1",, + "defaultroute","default","255.0.0.0","10.0.0.101",,, + +Use ``makeroutes`` to configure OS route on xCAT management node +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +#. define the names of the routes to be setup on the management node in ``site`` table: :: + + chdef -t site mnroutenames="defaultroute,20net" + lsdef -t site clustersite -i mnroutenames + Object name: clustersite + mnroutenames=defaultroute,20net + +#. add all routes from the ``mnroutenames`` to the OS route table for the management node: :: + + makeroutes + +#. add route ``20net`` and ``30net`` to the OS route table for the management node: :: + + makeroutes -r 20net,30net + +#. delete route ``20net`` from the OS route table for the management node: :: + + makeroutes -d -r 20net + +Use ``makeroutes`` to configure OS route for compute node +''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +#. define the names of the routes to be setup on the compute node: :: + + chdef -t cn1 routenames="defaultroute,20net" + +#. add all routes from the ``routenames`` to the OS route table for the compute node: :: + + makeroutes cn1 + +#. add route ``20net`` and ``30net`` to the OS route table for the compute node: :: + + makeroutes cn1 -r 20net,30net + +#. delete route ``20net`` from the OS route table for the compute node: :: + + makeroutes cn1,cn2 -d -r 20net + +Use ``setroute`` to configure OS route for compute node +''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +#. define the names of the routes to be setup on the compute node: :: + + chdef -t cn1 routenames="defaultroute,20net" + +#. If adding ``setroute [replace | add]`` into the node’s postscripts list, ``setroute`` will be executed during OS deployment on compute node to replace/add routes from ``routenames``: :: + + chdef cn1 -p postscripts="setroute replace" + +#. Or if the compute node is already running, use ``updatenode`` command to run ``setroute [replace | add]`` postscript: :: + + updatenode cn1 -P "setroute replace" + + diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_routes.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_routes.rst new file mode 100644 index 000000000..9fb5d6b78 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/cfg_routes.rst @@ -0,0 +1 @@ +.. include:: ../../../../common/deployment/network/cfg_routes.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/index.rst index 43286943d..1300effb7 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/network/index.rst @@ -8,3 +8,4 @@ This section describes how to configure network adapters with persistent configu cfg_network_adapter.rst cfg_second_adapter.rst + cfg_routes.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_routes.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_routes.rst new file mode 100644 index 000000000..9fb5d6b78 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/cfg_routes.rst @@ -0,0 +1 @@ +.. include:: ../../../../common/deployment/network/cfg_routes.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/index.rst index 43286943d..1300effb7 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/diskless/customize_image/network/index.rst @@ -8,3 +8,4 @@ This section describes how to configure network adapters with persistent configu cfg_network_adapter.rst cfg_second_adapter.rst + cfg_routes.rst