pf-tools/pf-tools: updating example and spec

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Fri Jan 9 14:09:10 UTC 2015


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/9e3bd103816b
changeset: 1440:9e3bd103816b
user:      shad
date:      Fri Jan 09 15:09:07 2015 +0100
description:
updating example and spec

diffstat:

 doc/filter_privateresolve-sample |   6 +-
 doc/hostfile-links-sample        |  63 ----------------------------------------
 doc/hostfile-sample              |  41 ++++++++++++++++++++++++++
 doc/hostfile-syntax              |  37 ++++++++++++----------
 doc/model-sample                 |  48 ++++++++++++++++++++++++++++++
 doc/network-interface.sample     |  10 ++++++
 doc/networkfile-syntax           |   8 ++--
 doc/networkfile.sample           |   6 +++
 8 files changed, 132 insertions(+), 87 deletions(-)

diffs (300 lines):

diff -r 7fb888385c0c -r 9e3bd103816b doc/filter_privateresolve-sample
--- a/doc/filter_privateresolve-sample	Fri Jan 09 10:02:08 2015 +0100
+++ b/doc/filter_privateresolve-sample	Fri Jan 09 15:09:07 2015 +0100
@@ -7,7 +7,7 @@
     
 - link::HOSTNAME(HOSTNUM)::<link-name>(::link-index)
     link::vip-spawn::net-pfds-ext       => 93.20.126.99
-    link::::net-pfds-ext        => 93.20.126.92
-    link::::net-pfds-ext::1     => 93.20.126.99
-    link::::net-pfds-ext-v6     => 2a02:8400:4:cb:1077:af68:1c24:7806
+    link::HOSTNAME::net-pfds-ext        => 93.20.126.92
+    link::HOSTNAME::net-pfds-ext::1     => 93.20.126.99
+    link::HOSTNAME::net-pfds-ext-v6     => 2a02:8400:4:cb:1077:af68:1c24:7806
 
diff -r 7fb888385c0c -r 9e3bd103816b doc/hostfile-links-sample
--- a/doc/hostfile-links-sample	Fri Jan 09 10:02:08 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-[link::net-system]
-	dev     = eth0
-	mac.0	= 00:00:00:00:00:00
-	ip		= 3.0
-	ip.1    = 3.12
-
-[link::net-admindsi]
-	dev	= eth0
-	ip	= 12
-	tag	= vlan-admindsi
-
-[link::net-pfds-ext]
-	dev		= bond0
-	ip		= 92
-	@route		= default via GATEWAY
-	@option		= slaves eth2 eth3
-	@option		= bond_mode active-backup
-	@option		= bond_miimon 100
-
-[link::net-pfds-ext::1]
-	dev		= bond0
-	comment		= another IP on the same VLAN
-	ip		= link::mirrors
-	
-[link::net-pfds-ext::2]
-	dev		= eth2:1
-	comment		= IP aliasing on the same VLAN
-	ip		= 98
-	
-[link::net-pfds-ext-v6]
-	dev		= bond0
-	ip		= 1077:af68:1c24:7806
-	@route		= default via GATEWAY
-
-[link::net-serpe]
-	dev		= lo
-	ip	 	= link::vip-serpe
-
-[link::net-dhcp]
-	dev		= br0
-	method	        = dhcp
-	@option	        = bridge_ports eth4 eth5
-
-[deployment]
-	mode	= debian
-	arch	= amd64
-	distrib	= wheezy
-	preseed = standard-wheezy-preseed.tpl
-
-[hostgroup]
-	number		= 2
-	order		= 1
-
-[boot]
-	pxefilename = pxelinux.0
-	pxetemplate = standard-wheezy-installer
-	initrd  = initrd.img-3.2.0-4-amd64
-	kernel  = vmlinuz-3.2.0-4-amd64
-	console = default
-
-[dns]
-	resolver	= vip-spawn.private,nscache.private
-	shortname	= vlan-systeme
diff -r 7fb888385c0c -r 9e3bd103816b doc/hostfile-sample
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/hostfile-sample	Fri Jan 09 15:09:07 2015 +0100
@@ -0,0 +1,41 @@
+[hostgroup]
+	comment		= machine example
+	hostname	= cbv4-machine-name%%
+	model		= MODEL:model-sample
+
+[link::net-system]
+	comment	= cf: model-sample
+	mac.0	= 00:00:00:00:00:00
+	ip		= 3.0
+	ip.1    = 3.12
+
+[link::net-admindsi]
+	comment	= cf: model-sample
+	ip	= 12
+
+[link::net-middledsi]
+	comment	= cf: model-sample
+	ip		= 12
+
+[link::net-pfds-ext]
+	comment	= cf: model-sample
+	ip		= 92
+
+[link::net-pfds-ext-v6]
+	comment	= cf: model-sample
+	ip		= 1077:af68:1c24:7806
+
+[link::net-pfds-ext::1]
+	dev		= bond0
+	comment	= another IP on the same VLAN
+	ip		= link::mirrors
+	
+[link::net-pfds-ext::2]
+	dev		= eth2:1
+	comment		= IP aliasing on the same VLAN
+	ip		= 98
+	
+[link::net-dhcp]
+	dev		= br0
+	method	= dhcp
+	@option	= bridge_ports eth4 eth5
diff -r 7fb888385c0c -r 9e3bd103816b doc/hostfile-syntax
--- a/doc/hostfile-syntax	Fri Jan 09 10:02:08 2015 +0100
+++ b/doc/hostfile-syntax	Fri Jan 09 15:09:07 2015 +0100
@@ -1,19 +1,21 @@
-[link::<VLAN_NAME>::<NETWORK_NAME>[::LINK_NUM]]
+[link::<NETWORK_NAME>[::LINK_NUM]]
 	! dev[.%HOSTNUM%]		::= <IFACE_NAME> || NONE if link doesn't exist for the specified %HOSTNUM%
-	! mac.%HOSTNUM%			::= <MAC_ADDR> WARNING this directive MUST BE defined for interface which is used for deployment
-	! ip[.%HOSTNUM%]		::= <IPV4_ADDR> or offset. If default is used then act as old ipstart directive
+	? mac.%HOSTNUM%			::= <MAC_ADDR> WARNING this directive MUST BE defined for interface which is used for deployment
+	? tag					::= <VLAN_NAME> force the interface to be tagged
+	? ip[.%HOSTNUM%]		::= <IP_ADDR> or offset. If default is used then act as old ipstart directive.
 	? @route[.default|%HOSTNUM%]	::= <SUBNET>/<NETMASK> [via <GATEWAY>] (ip route syntax)
-        ? method                        ::= <STR> like dhcp, static, manual ... (default static)
-        ? allow                         ::= <STR> like auto, hotplug ... (default auto)
-        ? @mapping_rules                ::= <STR> all mapping rules as desctibes for /etc/network/interfaces
-        ? version                       ::= <STR> inet, inet6, ipx (default inet or inet6)
-        ? @pre-up                       ::= <STR> command run before bringing the interface up
-        ? @up                           ::= <STR> command run when interface is up
-        ? @postup                       ::= <STR> command after bringing the interface up
-        ? @down                         ::= <STR> command run when interface is down
-        ? @pre-down                     ::= <STR> command before taking the interface down
-        ? @post-down                    ::= <STR> command after  taking  the  interface  down
-        ? @option                       ::= <STR> command or option adding in iface section
+	? method				::= <STR> like dhcp, static, manual ... (default static)
+	? @allow				::= <STR> like hotplug...
+	? @mapping_rules		::= <STR> all mapping rules as desctibes for /etc/network/interfaces
+	? version				::= <STR> inet, inet6, ipx (default inet or inet6)
+	? @pre-up				::= <STR> command run before bringing the interface up
+	? @up					::= <STR> command run when interface is up
+	? @postup				::= <STR> command after bringing the interface up
+	? @down					::= <STR> command run when interface is down
+	? @pre-down				::= <STR> command before taking the interface down
+	? @post-down			::= <STR> command after  taking  the  interface  down
+	? @option				::= <STR> command or option adding in iface section
+	? auto					::= <BOOLEAN>, default at true
 
 [deployment]
 	? os_type				::= redhat|debian|centos ...
@@ -32,9 +34,10 @@
 	? nodes		::= <INT> define here the number of nodes for a designated number into the hostgroup (needed for cluster definition)
 	? order		::= <INT>
 	! hostname	::= <STR>[%%__]? if the string <STR> is ended by one or more % then each percent is a digit for indexing hosts _ indicates the nodes (clustering)
-	? hosttype	::= <STR> if defined this key is used for %HOSTTYPE% instead of the derived one from hostfile name
-        ? @source[.%HOSTNUM%]           ::= <FILE_NAME> include stanzas from other files for /etc/network/interfaces
-        ? @source-directory[.%HOSTNUM%] ::= <PATH_NAME> source multiple files at once for /etc/network/interfaces
+	? hosttype	::= <STR> if defined, this key is used for %HOSTTYPE% instead of the derived one from hostfile name
+	# FIXME find where put theses
+	? @source[.%HOSTNUM%]			::= <FILE_NAME> include stanzas from other files for /etc/network/interfaces
+	? @source-directory[.%HOSTNUM%]	::= <PATH_NAME> source multiple files at once for /etc/network/interfaces
 
 [boot]
 	? pxefilename[.%HOSTNUM%]	::= <FILENAME> pxelinux.0 is used by default (generic legacy PXE boot) need to change if UEFI is used
diff -r 7fb888385c0c -r 9e3bd103816b doc/model-sample
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/model-sample	Fri Jan 09 15:09:07 2015 +0100
@@ -0,0 +1,48 @@
+[hostgroup]
+	site		= ALL
+	comment		= model example
+	number		= 2
+
+[deployment]
+	mode	= debian
+	arch	= amd64
+	distrib	= wheezy
+	preseed = standard-wheezy-preseed.tpl
+
+[boot]
+	pxefilename = pxelinux.0
+	pxetemplate = standard-wheezy-installer
+	initrd  = initrd.img-3.2.0-4-amd64
+	kernel  = vmlinuz-3.2.0-4-amd64
+	console = default
+
+[dns]
+	resolver	= vip-spawn.private,nscache.private
+	shortname	= vlan-systeme
+
+[link::net-system]
+	dev     = eth0
+
+[link::net-admindsi]
+	dev	= eth0
+	tag	= vlan-admindsi
+
+[link::net-middledsi]
+	dev		= eth1
+	@route	= 10.11.47.25/32 via GATEWAY
+
+[link::net-pfds-ext]
+	dev		= bond0
+	@route		= default via GATEWAY
+	@option		= slaves eth2 eth3
+	@option		= bond_mode active-backup
+	@option		= bond_miimon 100
+
+[link::net-pfds-ext-v6]
+	dev		= bond0
+	@route		= default via GATEWAY
+	@route		= 2a02:8400:4:42::/64 via GATEWAY
+
+[link::net-serpe]
+	dev		= lo
+	ip	 	= link::vip-serpe
diff -r 7fb888385c0c -r 9e3bd103816b doc/network-interface.sample
--- a/doc/network-interface.sample	Fri Jan 09 10:02:08 2015 +0100
+++ b/doc/network-interface.sample	Fri Jan 09 15:09:07 2015 +0100
@@ -18,6 +18,14 @@
 auto eth0.302
 iface eth0.302 inet static
     address 10.111.204.12
+    netmask 255.255.255.0
+
+auto eth1
+iface eth1 inet static
+    address 10.111.220.12
+    netmask 255.255.255.0
+    up ip route add 10.11.47.25/32 via 10.111.220.254 dev eth1
+    down ip route del 10.11.47.25/32 via 10.111.220.254 dev eth1
 
 auto bond0
 iface bond0 inet static
@@ -37,6 +45,8 @@
     address 2a02:8400:4:cb:1077:af68:1c24:7806
     netmask 64
     gateway 2a02:8400:4:cb::1
+    up ip -6 route add 2a02:8400:4:42::/64 via 2a02:8400:4:cb::1 dev bond0
+    down ip -6 route del 2a02:8400:4:42::/64 via 2a02:8400:4:cb::1 dev bond0
 
 # Bridge setup
 iface br0 inet dhcp
diff -r 7fb888385c0c -r 9e3bd103816b doc/networkfile-syntax
--- a/doc/networkfile-syntax	Fri Jan 09 10:02:08 2015 +0100
+++ b/doc/networkfile-syntax	Fri Jan 09 15:09:07 2015 +0100
@@ -25,10 +25,10 @@
 	! console	::= (default|ttyS0,115200n8)
 
 [<VLAN_NAME>]
-        ! type          ::= vlan
-        ! tag           ::= <INT> 802.1q tag 
+	! type		::= vlan
+	! tag		::= <INT> 802.1q tag 
 	? comment	::= <STR>
-        ? site          ::= <STR> FIXME
+	? site		::= <STR> FIXME
 
 [<NETWORK_NAME>]
 	! type		::= network
@@ -36,7 +36,7 @@
 	! network	::= <NETWORK> define here the network format in CIDR format
 	! scope		::= global|local, if private is defined this network will be ONLY added on zone private for site
 	? gateway	::= <IP_ADDR> or offset
-        ? network_type  ::= anycast, multicast, unicast => allow to use one IP several times
+	? network_type	::= anycast, multicast, unicast => allow to use one IP several times
 
 [<SERVER_NAME>]
 	! type							::= server
diff -r 7fb888385c0c -r 9e3bd103816b doc/networkfile.sample
--- a/doc/networkfile.sample	Fri Jan 09 10:02:08 2015 +0100
+++ b/doc/networkfile.sample	Fri Jan 09 15:09:07 2015 +0100
@@ -110,6 +110,12 @@
     scope	= local
     gateway	= 1
 
+[net-dhcp]
+    type	= network
+    comment	= IP from dhcp
+    network	= 10.144.0.0/16
+    gateway	= 1
+
 [net-serpe]
     type	= network
     comment	= réseau anycast



More information about the pf-tools-commits mailing list