GEN_SCRIPTS= \
gen-datacenter.cfg.5-opts.pl \
gen-pct.conf.5-opts.pl \
+ gen-pct-network-opts.pl \
gen-qm.conf.5-opts.pl \
gen-vzdump.conf.5-opts.pl \
gen-pve-firewall-cluster-opts.pl \
update: clean
rm -f *.5-opts.adoc *.1-synopsis.adoc *.8-synopsis.adoc
rm -f api-viewer/apidata.js
- rm -f pve-firewall-macros.adoc
+ rm -f pve-firewall-macros.adoc pct-network-opts.adoc
make all
clean:
--- /dev/null
+#!/usr/bin/perl
+
+use lib '.';
+use strict;
+use warnings;
+use PVE::RESTHandler;
+use PVE::LXC::Config;
+
+my $prop = PVE::LXC::Config->json_config_properties();
+
+my $phash = $prop->{net0};
+
+my $format = $phash->{format};
+
+my $typetext = PVE::PodParser::schema_get_type_text($phash);
+
+print "`net[n]`: `$typetext`\n\n";
+
+print PVE::RESTHandler::dump_properties($format);
--- /dev/null
+`net[n]`: `name=<String> [,bridge=<vmbr<Number>>] [,firewall=<[1|0]>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<MAC>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<Number>] [,rate=<mbps>] [,tag=<VlanNo>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]`
+
+`bridge`: `<vmbr<Number>>` ::
+
+Bridge to attach the network device to.
+
+`firewall`: `<[1|0]>` ::
+
+Controls whether this interface's firewall rules should be used.
+
+`gw`: `<GatewayIPv4>` ::
+
+Default gateway for IPv4 traffic.
+
+`gw6`: `<GatewayIPv6>` ::
+
+Default gateway for IPv6 traffic.
+
+`hwaddr`: `<MAC>` ::
+
+The interface MAC address. This is dynamically allocated by default, but
+you can set that statically if needed, for example to always have the same
+link-local IPv6 address. (lxc.network.hwaddr)
+
+`ip`: `<IPv4Format/CIDR>` ::
+
+IPv4 address in CIDR format.
+
+`ip6`: `<IPv6Format/CIDR>` ::
+
+IPv6 address in CIDR format.
+
+`mtu`: `<Number>` ::
+
+Maximum transfer unit of the interface. (lxc.network.mtu)
+
+`name`: `<String>` ::
+
+Name of the network device as seen from inside the container.
+(lxc.network.name)
+
+`rate`: `<mbps>` ::
+
+Apply rate limiting to the interface
+
+`tag`: `<VlanNo>` ::
+
+VLAN tag for this interface.
+
+`trunks`: `<vlanid[;vlanid...]>` ::
+
+VLAN ids to pass through the interface
+
+`type`: `(veth)` ::
+
+Network interface type.
+
Container Network
-----------------
-TODO
+You can configure up to 10 network interfaces for a single
+container. The corresponding options are called 'net0' to 'net9', and
+they can contain the following setting:
+
+include::pct-network-opts.adoc[]
Managing Containers with 'pct'