# Dummynet



## Sandra (May 16, 2012)

Hello, 

As I've written others posts, I'm doing a virtual laboratory to test WAN Optimization. I've installed Vyatta on VMware EXSi 5.0. This is the network diagram: 

http://www.wanopt.net/Lab_WANOptimization_final.jpg 

I've configured static NAT so the server's IP address is 10.10.50.5/24 and it is being translated to another private IP 10.192.192.5/32. I've followed this guide to set up the configuration: http://amila-kumanayake.blogspot.com.au/2009/04/how-to-configure-nat-for-small-office.html. 

The final NAT configuration on the vyatta router is: 

http://www.wanopt.net/Configuration_vyatta NAT.jpg 

Also, I've configured the private IP 10.192.192.5/32 as a secondary IP on the interface eth0 (which is the same interface which is connecting with DummyNet) In addition, on Dummynet I have created a static route to know the IP 10.192.192.5/24 through the interface 10.10.40.1/24 

After that, I've tried to ping this IP (10.192.192.5) from Dummynet and I don't have ping answer. I checked the route table on Dummynet and saw traffic on the new static route. 

Have I missed something on Dummynet. Someone can help me? 

Thanks so much,


----------



## ecazamir (May 19, 2012)

What you should do, considering your setup:


Check why the second image of the original post is not available.
Try to separate the NAT task from dummynet. First, enable NAT, make sure it works properly, then bring dummynet too.
Make sure you have support for ipfw, dummynet and natd. [cmd=]kldstat -v[/cmd] should help.
Inspect outgoing traffic with tcpdump, it is possible to have the 'wrong' IP address as source. Inspect incoming traffic too, dummynet can operate for ingress traffic too. [cmd=]ipfw pipe show[/cmd] and [cmd=]ipfw queue show[/cmd] will display the packet counters.
Inspect incoming traffic at the test target with tcpdump, Wireshark, or whatever tool you like. Make sure that you have incoming echo requests and outgoing echo replies.
Use tools like iperf/jperf to measure the results of your work.


----------



## Sandra (May 20, 2012)

Hello ecazamir,

This is the link of the second image http://www.wanopt.net/Configuration_vyatta NAT.jpg

I'll follow your suggestion, to check the NAT first and then, use the commands to do troubleshooting.  I'll post then.

Thanks,


----------



## Sandra (May 23, 2012)

Hello,

I've put down the NAT and am testing just between Dummynet and Vyatta with these 2 tests: 

*FIRST TEST*

Dummynet:
em0 10.10.40.1/24
I've added a static route with this command: *route add -net 10.192.192.0/24 10.10.40.1*

Vyatta:
eth0 interface 10.10.40.2/24
eth0 interface IP secondary 10.192.192.5/24

Then, from Dummynet I ping the IP 10.10.40.2 but I can't ping the IP 10.192.192.5.

*SECOND TEST*
Dummynet:
em0 10.10.40.1/24
I've added a static route with this command: *route add -net 10.192.192.0/24 10.10.40.1*

Vyatta:
eth0 interface 10.10.40.2/24
lo loopback interface 10.192.192.5/24

Then, I've tested and found the same previous result.  From Dummynet I ping the IP 10.10.40.2 but I can't ping the IP 10.192.192.5.  

I've checked the routing table on Dummynet (with the command *netstat -r*) and I found the route already set up.  This is the image: http://www.wanopt.net/routing_table_Dummynet.jpg 

Also, I've tested with traceroute and the result showed me that the packet never goes out from Dummynet.

Someone has a clue about what is happening? *W*hy I can't ping that IP 10.192.192.5?

Thanks so much for your help,


----------



## Sandra (May 23, 2012)

Hello,

I've continued testing and I've changed the IP 10.192.192.5/24 to 192.168.27.3/32.  

This was my test:
Dummynet:
em0 10.10.40.1/24
I've added a static route with this command: *route add -net 192.168.27.3/32 10.10.40.1*

Vyatta:
eth0 interface 10.10.40.2/24
eth0 interface IP secondary 192.168.27.3/32

Then, from Dummynet I ping the IP 192.168.27.3. It meant I've solved the problem changing the IP.  Honestly, I don't why now it's working if I didn't have any IP duplicity before.

Someone knows why this change allowed I ping the IP 192.168.27.3 from Dummynet?

Thanks,


----------



## ecazamir (May 24, 2012)

I believe you have a wrong route. Why do you add a route to 10.192.192.0 through the local machine (10.10.40.1) , instead of 10.10.40.2?


----------



## Sandra (May 28, 2012)

Thanks Ecazamir, Yes, probably it was the error. Thanks,


----------

