documentation:examples:aggregating_multiple_isp_links_with_mlvpn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
documentation:examples:aggregating_multiple_isp_links_with_mlvpn [2020/02/21 21:37] – [Virtual Lab setp] olivier | documentation:examples:aggregating_multiple_isp_links_with_mlvpn [2020/02/21 21:39] – [Backbone routers configuration] olivier | ||
---|---|---|---|
Line 79: | Line 79: | ||
=== Router 2 === | === Router 2 === | ||
- | Router 2 is configured for rate-limiting traffic at 10 Mb/s on interface to/ | + | Router 2 is configured for rate-limiting traffic at 10 Mb/s on interface to/ |
< | < | ||
- | sysrc hostname=R2 | + | sysrc hostname=VM2 \ |
- | sysrc ifconfig_vtnet0=" | + | ifconfig_vtnet0=" |
- | sysrc ifconfig_vtnet2=" | + | |
- | sysrc static_routes="R5" | + | |
- | sysrc route_R5=" | + | firewall_enable=YES |
- | sysrc firewall_enable=YES | + | firewall_script="/ |
- | sysrc firewall_script="/ | + | cat > / |
- | + | ||
- | cat > / | + | |
#!/bin/sh | #!/bin/sh | ||
fwcmd="/ | fwcmd="/ | ||
kldstat -q -m dummynet || kldload dummynet | kldstat -q -m dummynet || kldload dummynet | ||
# Flush out the list before we begin. | # Flush out the list before we begin. | ||
- | ${fwcmd} -f flush | + | \${fwcmd} -f flush |
- | #Create pipes (one for each direction) | + | \${fwcmd} pipe 10 config bw 10Mbit/s |
- | ${fwcmd} pipe 10 config bw 10Mbit/s | + | \${fwcmd} pipe 20 config bw 10Mbit/s |
- | ${fwcmd} pipe 20 config bw 10Mbit/s | + | |
#Traffic getting out vtnet0 is limited to 10Mbit/s | #Traffic getting out vtnet0 is limited to 10Mbit/s | ||
- | ${fwcmd} add 1000 pipe 10 all from any to any out via vtnet0 | + | \${fwcmd} add 1000 pipe 10 all from any to any out via vtnet0 |
#Traffic getting int vtnet0 is limited to 10Mbit/s | #Traffic getting int vtnet0 is limited to 10Mbit/s | ||
- | ${fwcmd} add 2000 pipe 20 all from any to any in via vtnet0 | + | \${fwcmd} add 2000 pipe 20 all from any to any in via vtnet0 |
#We don't want to block traffic, only shape some | #We don't want to block traffic, only shape some | ||
- | ${fwcmd} add 3000 allow ip from any to any | + | \${fwcmd} add 3000 allow ip from any to any |
- | 'EOF' | + | EOF |
service netif restart | service netif restart | ||
service routing restart | service routing restart | ||
service ipfw start | service ipfw start | ||
+ | hostname VM2 | ||
config save | config save | ||
</ | </ | ||
Line 115: | Line 113: | ||
=== Router 3 === | === Router 3 === | ||
- | Router 3 is configured for rate-limiting traffic at 10 Mb/s on interface to/ | + | Router 3 is configured for rate-limiting traffic at 10 Mb/s on interface to/ |
< | < | ||
- | sysrc hostname=R3 | + | sysrc hostname=VM3 \ |
- | sysrc ifconfig_vtnet0=" | + | ifconfig_vtnet0=" |
- | sysrc ifconfig_vtnet2=" | + | |
- | sysrc static_routes="R5" | + | |
- | sysrc route_R5=" | + | firewall_enable=YES |
- | sysrc firewall_enable=YES | + | firewall_script="/ |
- | sysrc firewall_script="/ | + | |
- | cat > / | + | cat > / |
#!/bin/sh | #!/bin/sh | ||
fwcmd="/ | fwcmd="/ | ||
kldstat -q -m dummynet || kldload dummynet | kldstat -q -m dummynet || kldload dummynet | ||
# Flush out the list before we begin. | # Flush out the list before we begin. | ||
- | ${fwcmd} -f flush | + | \${fwcmd} -f flush |
- | #Create pipes (one for each direction) | + | \${fwcmd} pipe 10 config bw 10Mbit/s |
- | ${fwcmd} pipe 10 config bw 10Mbit/s | + | \${fwcmd} pipe 20 config bw 10Mbit/s |
- | ${fwcmd} pipe 20 config bw 10Mbit/s | + | |
#Traffic getting out vtnet0 is limited to 10Mbit/s | #Traffic getting out vtnet0 is limited to 10Mbit/s | ||
- | ${fwcmd} add 1000 pipe 10 all from any to any out via vtnet0 | + | \${fwcmd} add 1000 pipe 10 all from any to any out via vtnet0 |
#Traffic getting int vtnet0 is limited to 10Mbit/s | #Traffic getting int vtnet0 is limited to 10Mbit/s | ||
- | ${fwcmd} add 2000 pipe 20 all from any to any in via vtnet0 | + | \${fwcmd} add 2000 pipe 20 all from any to any in via vtnet0 |
#We don't want to block traffic, only shape some | #We don't want to block traffic, only shape some | ||
- | ${fwcmd} add 3000 allow ip from any to any | + | \${fwcmd} add 3000 allow ip from any to any |
- | 'EOF' | + | EOF |
service netif restart | service netif restart | ||
service routing restart | service routing restart | ||
service ipfw start | service ipfw start | ||
+ | hostname VM3 | ||
config save | config save | ||
</ | </ | ||
Line 151: | Line 148: | ||
=== Router 4 === | === Router 4 === | ||
- | Router 4 is the aggregating server' | + | Router 4 is configured for rate-limiting traffic at 10 Mb/s on interface to/from VM1. |
+ | |||
+ | < | ||
+ | sysrc hostname=VM4 \ | ||
+ | ifconfig_vtnet0=" | ||
+ | ifconfig_vtnet3=" | ||
+ | defaultrouter=" | ||
+ | firewall_enable=YES \ | ||
+ | firewall_script="/ | ||
+ | |||
+ | cat > / | ||
+ | #!/bin/sh | ||
+ | fwcmd="/ | ||
+ | kldstat -q -m dummynet || kldload dummynet | ||
+ | # Flush out the list before we begin. | ||
+ | \${fwcmd} -f flush | ||
+ | \${fwcmd} pipe 10 config bw 10Mbit/s | ||
+ | \${fwcmd} pipe 20 config bw 10Mbit/s | ||
+ | #Traffic getting out vtnet0 is limited to 10Mbit/s | ||
+ | \${fwcmd} add 1000 pipe 10 all from any to any out via vtnet0 | ||
+ | #Traffic getting int vten0 is limited to 10Mbit/s | ||
+ | \${fwcmd} add 2000 pipe 20 all from any to any in via vtnet0 | ||
+ | #We don't want to block traffic, only shape some | ||
+ | \${fwcmd} add 3000 allow ip from any to any | ||
+ | EOF | ||
+ | |||
+ | service netif restart | ||
+ | service routing restart | ||
+ | service ipfw start | ||
+ | hostname VM4 | ||
+ | config save | ||
+ | </ | ||
+ | |||
+ | === Router 5 === | ||
+ | |||
+ | Router 5 is the aggregating server' | ||
< | < | ||
- | sysrc hostname=R4 | + | sysrc hostname=R5 \ |
- | sysrc ifconfig_vtnet1=" | + | ifconfig_vtnet1=" |
- | sysrc ifconfig_vtnet2=" | + | ifconfig_vtnet2=" |
- | sysrc ifconfig_vtnet3=" | + | ifconfig_vtnet3=" |
- | sysrc static_routes=" | + | |
- | sysrc route_R2="-net 10.0.12.0/24 10.0.24.2" | + | |
- | sysrc route_R3="-net 10.0.13.0/24 10.0.34.3" | + | |
+ | | ||
+ | route_ISP3=" | ||
service netif restart | service netif restart | ||
service routing restart | service routing restart | ||
+ | hostname VM5 | ||
config save | config save | ||
</ | </ |
documentation/examples/aggregating_multiple_isp_links_with_mlvpn.txt · Last modified: 2020/02/21 21:42 by olivier