Difference between revisions of "HOWTO extract the IP src/dst address from a packet"

From Nsnam
Jump to: navigation, search
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{TOC}}
 
{{TOC}}
  
One of the main points of using simulation software is that you don't have
+
A common question we hear is, "what is the appropriate way to extract the ip
to buy lots of hardware in order to investigate large configurations.  We
+
src/dst address from a packet"? Here is the official answer ...
have a realtime emulation package that allows us to connect ns-3 to real
+
networks on real machines. The problem, of course, is that you need lots
+
of real machines to run real programs. Using VMware, we replace "real
+
machines" with "virtual machines" and configure virtual networks of virtual
+
machines instead of having to work with tons of real hardware.
+
  
== HOWTO use VMware to set up virtual networks (Windows) ==
+
== HOWTO extract the IP src/dst address from a packet ==
  
1.  Get the VMware server software
+
What is the appropriate way to extract the ip src/dst address from a packet?
    a.  You may read in various release notes or documentation that you need
+
 
        Microsoft servers of various kinds.  This is not the case.  You can
+
  // copy packet to avoid modifying the original packet
        run VMware server on XP just fine;
+
  Ptr<Packet> copy = p->Copy ();
    b.  Go to http://www.vmware.com/download/server/ to get the software;
+
  Ipv4Header iph;
    c.  Select the Download Now button (download as usual);
+
  copy->RemoveHeader (iph);
    d. Install the software in the usual way;
+
  // copy will disappear when you are done with it.
    e.  Ignore warnings about requiring Microsoft IIS to continue.
+
 
 +
[[User:Craigdo|Craigdo]] 19:55, 5 August 2008 (EDT)

Latest revision as of 23:55, 5 August 2008

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

A common question we hear is, "what is the appropriate way to extract the ip src/dst address from a packet"? Here is the official answer ...

HOWTO extract the IP src/dst address from a packet

What is the appropriate way to extract the ip src/dst address from a packet?

 // copy packet to avoid modifying the original packet
 Ptr<Packet> copy = p->Copy ();
 Ipv4Header iph;
 copy->RemoveHeader (iph);
 // copy will disappear when you are done with it.

Craigdo 19:55, 5 August 2008 (EDT)