PVC bundling
U
SER
G
UIDE
142
In the previous section it is described how to classify packets and give them a mark through the
command
iptables
.
In the bundle configuration, each of the two circuits can be associated to a mark so that all the
packets with that value will be transmitted only to the corresponding virtual circuit.
An example of the previous commands is:
set pvc-bundle pvc0 shdsl.835 mark 0x04
set pvc-bundle pvc1 shdsl.836
set pvc-bundle ipaddr 192.168.1.2
set pvc-bundle netmask 255.255.255.252
The following command:
set iptables -t mangle -A PREROUTING -p tcp --dport 80 -s 10.10.0.0/16 -j MARK --set-mark 0x04
marks with 0x04 value all the TCP packets coming from the
10.10.0.0/16
sub-network and
addressed to the
80
port
. These packets will be transmitted only on the
shdsl.835
circuit, while
all the other packets will be distributed in round robin way between the
shdsl.835
and
shdsl.836
circuit.
If the following commands are set:
set pvc-bundle pvc0 shdsl.835 mark 0x04
set pvc-bundle pvc1 shdsl.836 mark 0x08
set pvc-bundle ipaddr 192.168.1.2
set pvc-bundle netmask 255.255.255.252
set iptables -t mangle -A PREROUTING -p tcp --dport 80 -s 10.10.0.0/16 -j MARK --set-mark 0x04
set iptables -t mangle -A PREROUTING -p tcp --dport 110 -s 10.10.0.0/16 -j MARK --set-mark 0x08
The consequence is:
Packets addressed to 80 port will be sent only on SHDSL.835
Packets addressed to 110 port will be sent only on SHDSL.836
All the other packets will be redistributed on the two interfaces
In order to deactivate the bundle function the command is:
set pvc-bundle off
enable or disable PAT functions for outgoing packets on
pbond0
interface.
This command destroys the virtual interface
pbond0
, so if no address has been assigned to
SHDSL.835 and SHDSL.836 physical interfaces, they cannot be used. The commands:
set pvc-bundle masquerade
set pvc-bundle no-masquerade
enable or disable PAT functions for outgoing packets on
pbond0
interface.
set pvc-bundle default-route
set pvc-bundle no-default-route
activate or deactivate a default static route on bundle interface.
The
pbond0
interface inherits MTU values and the transmission queue size from the second
interface which is inserted in the bundle list. It is possible, however, to change them through the
commands: