Skip to content
Snippets Groups Projects
Commit 0ccbcbb1 authored by patrick.bug's avatar patrick.bug
Browse files

ISP packet loss

parent 81f42c4b
No related branches found
No related tags found
No related merge requests found
......@@ -165,23 +165,20 @@ write_files:
<entry key="Auto-generate config" type="Boolean">false</entry>
<entry key="config" type="String"> ifconfig eth1 up 192.168.101.1 netmask 255.255.255.252&#xD;
ifconfig eth2 up 192.168.102.1 netmask 255.255.255.252&#xD;
&#xD;
&#xD;
dhclient eth0&#xD;
dhclient eth3&#xD;
&#xD;
&#xD;
route add default gw 172.16.1.254 eth3&#xD;
route add -net 192.168.101.0/30 gw 192.168.101.2 dev eth1&#xD;
route add -net 192.168.1.0/24 gw 192.168.101.2 dev eth1&#xD;
route add -net 192.168.102.0/30 gw 192.168.102.2 dev eth2&#xD;
route add -net 192.168.2.0/24 gw 192.168.102.2 dev eth2&#xD;
&#xD;
&#xD;
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE&#xD;
iptables -A FORWARD -i eth2 -j ACCEPT&#xD;
iptables -A FORWARD -i eth1 -j ACCEPT&#xD;
/sbin/tc qdisc add dev eth3 root handle 1:1 netem delay 100ms&#xD;
/sbin/tc qdisc add dev eth2 root handle 1:1 netem delay 100ms loss 5%&#xD;
service ssh start&#xD;
&#xD;
hostname ISP&#xD;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment