OSDN Git Service

The network command is added to the manual. master
authorniwa-hideyuki <niwa.hideyuki@jp.fujitsu.com>
Sat, 14 Feb 2015 12:27:28 +0000 (21:27 +0900)
committerniwa-hideyuki <niwa.hideyuki@jp.fujitsu.com>
Sat, 14 Feb 2015 12:27:28 +0000 (21:27 +0900)
lxcf/doc/lxcf.1

index 686200c..57d45a8 100644 (file)
@@ -138,6 +138,20 @@ lxcf \- lxcf framework command
 
 .B     lxcf export-docker (UUID | NAME) ...
 
+.B     *** Network ***
+
+.B     lxcf net-add [ -d NETDEV ] [ -n NUMBER ] [ -g GATEWAY ] [ -b BRIDGE ] CONTAINER_NAME IPADDR/MASK
+
+.B     lxcf net-del [ -n NUMBER ] CONTAINER_NAME
+.B     lxcf net-del -b BRIDGE
+
+.B     lxcf net-gateway CONTAINER_NAME IP_ADDR
+
+.B     lxcf net-route -a  [ -n NUMBER ] CONTAINER_NAME NET_ADDR GATEWAY
+.B     lxcf net-route -d  CONTAINER_NAME NET_ADDR
+
+.B     lxcf net-list [ -b ]
+
 .B     *** help ***
 
 .B     lxcf helpcmd
@@ -506,6 +520,44 @@ The separate model can be handled as docker container.
 When the container that converts the joint model is used, 
 it should mount /usr.
 
+.B net-add [ -d NETDEV ] [ -n NUMBER ] [ -g GATEWAY ] [ -b BRIDGE ] CONTAINER_NAME IPADDR/MASK
+  IPADDR/MASK is allocated in the container of CONTAINER_NAME.
+  Please note that the network information disappears all of IPADDR/MASK set with net-add when the container is stopped or is rebooted.
+
+  -d : It comes to be able to connect it outside by sharing NIC when NETDEV is set optional -d it. It is shared with the container connected with the same bridge.
+  -n : In optional -n, two or more VETH can be connected with the container. NUMBER is put up at the end of the VETH name.
+  -g : In optional -g, default GATEWAY is set.
+  -b : In optional -b, VETH is connected with BRIDGE. If -b is not specified, it is connected with lxcfbr0. It is newly made when there is no bridge, and if it is existing, it is used.
+
+  Example)
+  # lxcf net-add a-srv 192.168.3.2/24
+  192.168.3.2/24 is added to container a-srv. This address can be connected only from HOST.
+  It is connected with bridge lxcfbr0.
+  # lxcf net-add b-srv 192.168.3.3/24
+  It adds in b-srv and it adds it to 192.168.3.3/24. Because the network is the same, it is possible to connect it also with a-srv.
+
+  Eth1(192.168.3.100/24) connected outside is connected with c-srv. GATEWAY is 192.168.3.1.
+  # As for lxcf net-add -d eth1 -g 192.168.3.1 c-srv 192.168.3.3/24 a-srv, b-srv, and c-srv, the connection with the outside becomes possible.
+
+.B net-del [ -n NUMBER ] CONTAINER_NAME
+.B net-del -b BRIDGE
+  VETH added to the container is deleted.
+  -n : Optional -n is deleted expressly specifying VETH NUMBER .
+  -b : When optional -b is specified, the corresponding bridge is deleted.
+
+.B net-gateway CONTAINER_NAME IP_ADDR
+  The gateway is set to the container.
+
+.B net-route -a  [ -n NUMBER ] CONTAINER_NAME NET_ADDR GATEWAY
+.B net-route -d  CONTAINER_NAME NET_ADDR
+  Routing information on the container is updated.
+  -a : Optional -a is added routing information.
+  -d : Optional- d is deleted routing information.
+
+.B net-list [ -b ]
+  Information on the added network is displayed.
+  -b : Bridge information is displayed in optional -b.
+
 .B helpcmd
 
   The list of the command of LXCF is displayed.