09.07.2015 Views

VPN IP-Tunneling and QoS Studies of Embedded Linux Network ...

VPN IP-Tunneling and QoS Studies of Embedded Linux Network ...

VPN IP-Tunneling and QoS Studies of Embedded Linux Network ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.1 <strong>VPN</strong> Tunnel Mode TestsFigure 4. The <strong>VPN</strong> Tunnel Mode Testing Environment for <strong>IP</strong><strong>IP</strong>, GRE <strong>and</strong> <strong>IP</strong>SEC <strong>VPN</strong>s.The testing environment in Figure 4 can be set up for the <strong>VPN</strong> Tunnel Mode operation <strong>and</strong>shared among <strong>IP</strong><strong>IP</strong>, GRE <strong>and</strong> <strong>IP</strong>SEC <strong>VPN</strong>s. Both <strong>IP</strong><strong>IP</strong> <strong>and</strong> GRE involve with onlyencapsulation mechanisms, whereas <strong>IP</strong>SEC also involves with data encryption (ESP) <strong>and</strong> headerauthentication (AH). The idea is to use two ELING routers/firewalls as Tunnel Servers A <strong>and</strong> B,<strong>and</strong> build up a corresponding tunnel between Tunnel Servers A <strong>and</strong> B with respect to one <strong>of</strong> thethree types <strong>of</strong> <strong>VPN</strong>s. As long as TD-A <strong>and</strong> TD-B set their default routes via Tunnel Servers A <strong>and</strong>B respectively, VLAN-A <strong>and</strong> VLAN-B can then be connected via the tunnel without being aware<strong>of</strong> the existence <strong>of</strong> <strong>VPN</strong>s.We have tried out <strong>and</strong> established the following scripts, as shown in Table 2 throughoutTable 5 for Tunnel Servers A <strong>and</strong> B in the three types <strong>of</strong> <strong>VPN</strong>s, <strong>and</strong> further details <strong>and</strong> instructionsteps can be found elsewhere [4].Table 2. <strong>IP</strong><strong>IP</strong>-<strong>VPN</strong> Tunnel Server ScriptsTunnel Server ATunnel Server Binsmod ipipinsmod ipipip tunnel add mytun mode ipip remote \ ip tunnel add mytun mode ipip \140.126.75.2 local 140.126.75.3 ttl 255 remote 140.126.75.3 local 140.126.75.2 ttl 255ifconfig mytun 192.168.4.2ifconfig mytun 192.168.5.2route add -net 192.168.5.0/24 dev mytun route add -net 192.168.4.0/24 dev mytunroute add default gw 140.126.75.3 route add default gw 140.126.75.2Table 3. GRE-<strong>VPN</strong> Tunnel Server ScriptsTunnel Server ATunnel Server Binsmod ip_greinsmod ip_greip tunnel add mytun mode gre remote \ ip tunnel add mytun mode gre remote \140.126.75.2 local 140.126.75.3 ttl 255 140.126.75.3 local 140.126.75.2 ttl 255ifconfig mytun 192.168.4.2ifconfig mytun 192.168.5.2route add -net 192.168.5.0/24 dev mytun route add -net 192.168.4.0/24 dev mytunroute add default gw 140.126.75.3 route add default gw 140.126.75.2


Table 4.# Insert the ipsec.o kernel moduleinsmod ipsec# Tunnel configuration setuptncfg --attach --virtual ipsec0 --physical ixp0<strong>IP</strong>SEC-<strong>VPN</strong> Tunnel Server ScriptsTunnel Server Aifconfig ipsec0 140.126.75.2 broadcast 140.126.255.255 netmask 255.255.0.0# Define the Security Association rules <strong>of</strong> ipip/ESP/AH# with spi 0x100 / 0x101/ 0x102 for traffic destined at Server Bspi --ip4 –said tun0x100@140.126.75.3 --src 140.126.75.2 --dst 140.126.75.3spi --esp 3des –said esp0x101@140.126.75.3 \--enckey 0x663066306630663066306630663066306630663066301111spi --ah hmac-md5 –said ah0x102@140.126.75.3 \--authkey 0x66306630663066306630663066302222# Group spi 0x100 / 0x101/ 0x102 as a single one spi 0x100spigrp --said tun0x100@140.126.75.3 esp0x101@140.126.75.3 ah0x102@140.126.75.3# with spi 0x200 / 0x201/ 0x202 for traffic destined at Server Aspi --ip4 –said tun0x200@140.126.75.2 --src 140.126.75.3 --dst 140.126.75.2spi --esp 3des –said esp0x201@140.126.75.2 \--enckey 0x663066306630663066306630663066306630663066301111spi --ah hmac-md5 –said ah0x202@140.126.75.2 \--authkey 0x66306630663066306630663066302222# Group spi 0x200 / 0x201/ 0x202 as a single one spi 0x200spigrp --said tun0x200@140.126.75.2 esp0x201@140.126.75.2 ah0x202@140.126.75.2# Apply the Security Association ruleeroute --add --eraf inet --src 192.168.4.0/24 --dst 192.168.5.0/24 tun0x100@140.126.75.3eroute --add --eraf inet --src 192.168.5.0/24 --dst 192.168.4.0/24 tun0x200@140.126.75.2# Setup a route to VLAN-B via ipsec0route add -net 192.168.5.0 netmask 255.255.255.0 dev ipsec0 gw 140.126.75.3# Insert the ipsec.o kernel moduleinsmod ipsec# Tunnel configuration setuptncfg --attach --virtual ipsec0 --physical ixp0Tunnel Server Bifconfig ipsec0 140.126.75.3 broadcast 140.126.255.255 netmask 255.255.0.0# Define the Security Association rules <strong>of</strong> ipip/ESP/AH# with spi 0x100 / 0x101/ 0x102 for traffic destined at Server Bspi --ip4 –said tun0x100@140.126.75.3 --src 140.126.75.2 --dst 140.126.75.3spi --esp 3des –said esp0x101@140.126.75.3 \--enckey 0x663066306630663066306630663066306630663066301111spi --ah hmac-md5 –said ah0x102@140.126.75.3 \--authkey 0x66306630663066306630663066302222# Group spi 0x100 / 0x101/ 0x102 as a single one spi 0x100


Figure 6. Testing Environment <strong>of</strong> <strong>QoS</strong> Load Balancing.Figure 6 illustrates the testing environment <strong>of</strong> <strong>QoS</strong> Load Balancing, where two ELING routers areconnected with two Ethernet lines to share the load from Net-A. Conceptually this configuration isonly meaningful for routing connection backup, <strong>and</strong> one can replace the right half part with twoservers in two generic PCs respectively to achieve the load balancing <strong>of</strong> application services.4. Results <strong>and</strong> AnalysesThis section summarizes <strong>and</strong> analyzes the <strong>VPN</strong> <strong>and</strong> <strong>QoS</strong> system test results. At this point, the <strong>VPN</strong>results are quite preliminary in the sense that the scalabilities with multiple <strong>VPN</strong> tunnel effects arestill under measurement <strong>and</strong> study, <strong>and</strong> the <strong>IP</strong>SEC performance is estimated since encryption <strong>and</strong>authentication are involved. On the other h<strong>and</strong>, the <strong>QoS</strong> results are more mature <strong>and</strong> stable.Table 5. System Test Results <strong>of</strong> <strong>VPN</strong>s in the Tunnel Mode.<strong>VPN</strong> # <strong>of</strong> Tested Tunnels Validated Functions Performance<strong>IP</strong><strong>IP</strong> 1 Encapsulation 47.7 MbpsGRE 1 Encapsulation 45.1 Mbps<strong>IP</strong>SEC 1 EncapsulationEncryption (ESP)Authentication (AH)>20Mpbs(Estimated)Table 5 summarizes the system test results <strong>of</strong> the three types <strong>of</strong> <strong>VPN</strong>s according to Figure 4. Everytype <strong>of</strong> <strong>VPN</strong> was tested successfully at least with 1 tunnel. Compared to the ELING’s UDPthroughput without any <strong>VPN</strong> tunnel which was measured to be 89 Mbps, both performances <strong>of</strong> <strong>IP</strong><strong>IP</strong><strong>and</strong> GRE, i.e. 47.7 Mbps <strong>and</strong> 45.1 Mbps, seem to be lower than expected. In other words theoverheads purely from encapsulation seem to be high. Further verification about these results areunder study with other traffic generator toolset. Regardless <strong>of</strong> this concern, comparison betweenGRE <strong>and</strong> <strong>IP</strong><strong>IP</strong> does indicate that about 5.5% extra overhead is from GRE, presumably due to the factGRE is somewhat heavier <strong>and</strong> more versatile since it also supports multicasting <strong>and</strong> <strong>IP</strong>v6. Theperformance issues <strong>of</strong> <strong>IP</strong>SEC are more complicated since encryption <strong>and</strong> authentication are alsoinvolved, <strong>and</strong> only an estimate, > 20Mbps, was given.


Table 6.Sample Configuration Test Results <strong>of</strong> <strong>QoS</strong> B<strong>and</strong>width Division for UDP Uploading.CBQ or HTB qdisc basedManager LimitStaff LimitTotal LimitB<strong>and</strong>width Division30 Mbps20Mbps50 MbpsTransmitted UDP Flow Rate 50 Mbps 50 Mbps 100 MbpsAchieved B<strong>and</strong>width 30.0 Mbps 19.9 Mbps 49.9 MbpsValid ? Valid Valid ValidPercent Error (Error) 0.0 % (0.0 Mbps) 0.5% (0.1 Mbps) 0.2% (0.1 Mbps)Table 6 gives the sample configuration test results <strong>of</strong> <strong>QoS</strong> b<strong>and</strong>width division via CBQ or HTB qdiscfor UDP uploading according to Figure 5. The b<strong>and</strong>width division is valid <strong>and</strong> precise for bothManager <strong>and</strong> Staff with total error rate around 0.2% (i.e. 0.1 Mbps) for a total b<strong>and</strong>width limit at 50Mbps. Other tests with different total limits were also tested, <strong>and</strong> the results are similar. Due to sometechnical reason, multiple iperf clients can not collocate on one PC where resource competitionhappens. Therefore we conducted FTP tests for the downloading case. Limited by the slow I/O <strong>of</strong>hard disks <strong>of</strong> Test Devices, the total limit was taken to be 5 Mbps, <strong>and</strong> (3 Mbps, 2 Mbps) were thedivided b<strong>and</strong>widths for Manager <strong>and</strong> Staff respectively. Similar conclusion holds for the FTP caseexcept that the error rate increases to 4% (i.e. 0.2 Mbps).Finally,the <strong>QoS</strong> load balancing was tested according to Figure 6. The results are as expected.If the two ELING routers are connected <strong>and</strong> shared by two Ethernet lines, each line gets about 50%<strong>of</strong> the total incoming traffic load. If shared by three Ethernet lines, each line gets about one third <strong>of</strong>the total traffic load.5. Summary <strong>and</strong> OutlookThis research aims at implementing <strong>VPN</strong> <strong>and</strong> <strong>QoS</strong> functions for the SnapGear <strong>Linux</strong> based networkgateways on top <strong>of</strong> the Intel XScale IXP-425 network processor based EVB. We have conducted awide range <strong>of</strong> tests both in <strong>VPN</strong> <strong>and</strong> <strong>QoS</strong>.For <strong>VPN</strong>, we have been able to successfully establish at least one tunnel for each case <strong>of</strong> <strong>IP</strong><strong>IP</strong>,GRE <strong>and</strong> <strong>IP</strong>SEC <strong>VPN</strong>s, although the performance results are only preliminary, the differencebetween GRE <strong>and</strong> <strong>IP</strong><strong>IP</strong> seems to reasonable. More careful performance measurement experimentsare being designed to verify the performance issues including precise performance measurement <strong>of</strong><strong>IP</strong>SEC. According to a desktop report <strong>of</strong> <strong>IP</strong>SEC, if one takes that only 30% <strong>of</strong> the pure routingperformance can survive from the desktop experience <strong>of</strong> <strong>IP</strong>SEC, one can estimate the convolutedeffect should be around ~ 24 Mbps or at least > 20 Mbps, taking all the <strong>IP</strong>SEC operations such asencapsulation, data encryption <strong>and</strong> authentication into account. More tests are under measurement.As for <strong>QoS</strong> based b<strong>and</strong>width division <strong>and</strong> load balancing, we have more mature <strong>and</strong> stableresults. In the case <strong>of</strong> b<strong>and</strong>width division, the network b<strong>and</strong>width can be divided quite precisely froma few Mbps to tens <strong>of</strong> Mbps with error rate from 4% (for 5 Mbps) to 0.2% (for 50 Mbps), both forthe downloading <strong>and</strong> uploading cases. One interesting point worth noting is that the error rate seems


to increase with the b<strong>and</strong>width, which seems contrary to the common expectation. However, theabsolute value <strong>of</strong> this error somewhat maintains at constant level, then it may be safe to interpret thiserror as a constant overhead by qdisc algorithms such as CBQ <strong>and</strong> HTB. Whether this is true or notwill need more finely segmented experiments over the measured b<strong>and</strong>width range. We will pursuealong this track soon.Finally in the case <strong>of</strong> load balancing, the test results were successful <strong>and</strong> as expected for twoor three Ethernet lines. Conceptually, one can extend this study case to another one where the righthalf part <strong>of</strong> Figure 6 can be replaced with two PCs, each running with the same network service suchas the FTP or Web servers, <strong>and</strong> load sharing between two network services can then be achieved.However, the performance benchmarking <strong>of</strong> web servers is another issue, as suggested by SpecWeb96 <strong>and</strong> SpecWeb 99 etc., <strong>and</strong> the performance benchmarking <strong>of</strong> FTP is more disk-speed specific. Wewill try to develop some study cases along this direction too.References[1] W.P. Lai, Requirement Specification Document <strong>of</strong> 2004 NSC Open Source Project, NSC93-2218-E-163-001.[2] W.P. Lai, Project Execution Plan Document <strong>of</strong> 2004 NSC Open Source Project, NSC93-2218-E-163-001.[3] W.P. Lai, System Design Document <strong>of</strong> 2004 NSC Open Source Project, NSC93-2218-E-163-001.[4] W.P. Lai, System Testing Document <strong>of</strong> 2004 NSC Open Source Project, NSC93-2218-E-163-001.[5] For SnapGear <strong>Linux</strong>, please see: http://www.snapgear.org.[6] For Intel IXP-425, please see: http://dwdm.cis.nctu.edu.tw/project/WiMax_Gateway/NP425.htm.[7] For Netfilter <strong>and</strong> iptables, please see: http://www.netfilter.org.[8] For GRE, please see: http://lartc.org/howto/lartc.tunnel.gre.html.[9] For FreeS/WAN, please see: http://www.freeswan.org.[10] For CBQ, please see: http://www.icir.org/floyd/cbq.html or http://lartc.org.[11] For HTB, please see: http://luxik.cdi.cz/~devik/qos/htb or http://lartc.org.[12] For TEQL, please see: http://www.sangoma.com/linux/linux-teql.htm or http://lartc.org.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!