[ns] Header compression(plz help me!) - continuation

Laercio Júnior laerciopericles at gmail.com
Wed Jun 1 06:57:41 PDT 2005


Ok Kamal. Thank you very much.

regards,
Laércio


On 6/1/05, kamal deep singh <kamal.singh at irisa.fr> wrote:
> 
> Hello Laercio,
> 
> when packet leaves the agent (UDP for your case)
> It is received by all the structures (LL, MAC etc) till it reaches its
> destination.
> You will have to look into the code to know more.
> I will try to do that and if i find a more specific answer I will tell 
> you.
> 
> Also try to use gdb to trace the execution of NS.
> And see which functions are being called.
> 
> regards,
> kamal
> 
> ---- Original Message -----
> From: "Laercio Júnior" <laerciopericles at gmail.com>
> To: <ns-users at ISI.EDU>
> Sent: Tuesday, May 31, 2005 12:23 AM
> Subject: [ns] Header compression(plz help me!) - continuation
> 
> 
> 
> Hello Kamal,
> I intend to implement header compression attaching an agent UDP to the
> source node and an agent Null to the destination node. Each node which
> receives a packet belonging to a route must save the compressed fields. 
> The
> such scheme show this:
> 
> 
> --- <- Agent/UDP --- --- <- Agent/Null
> n0 ---> pkt n1 ---> pkt n2
> --- --- ---
> 
> I still don't know where a packet is received in NS-2 when an UDP agent is
> used.
> About the type of wireless link, I'm using the such configuration for my
> wireless network:
> 
> set val(chan) Channel/WirelessChannel ; # channel type
> set val(prop) Propagation/TwoRayGround ; # radio-propagation model
> set val(ant) Antenna/OmniAntenna ; # Antenna
> set val(ll) LL ; # Link layer type
> set val(ifq) Queue/DropTail/PriQueue ; # Interface queue type
> set val(ifqlen) 100 ; # max packet in ifq
> set val(netif) Phy/WirelessPhy ; # network interface type
> set val(mac) Mac/802_11 ; # MAC type
> set val(rp) AODV ; # ad-hoc routing protocol
> set val(nn) 5; # number of mobile nodes
> 
> regards,
> Laércio
> 
> 
> On 5/26/05, kamal deep singh <kamal.singh at irisa.fr> wrote:
> >
> > Hello,
> >
> > I will try to read
> > "A Robust Header Compression Technique for Wireless Ad Hoc Networks"
> >
> > does Header compression in Ad Hoc also need to take care of routing?
> > I guess answer is yes. So, your approach to integrate routing +
> > compression
> > looks good to me.
> >
> > for me the case was simple and Header compression was done per link so
> > there
> > was no need of routing. And I made header compression totally 
> independent
> > of
> > routing.
> >
> > By bottleneck link i meant to say that wont you integrate compression on
> > the
> > both ends of the links? And use this link type as your wireless links?
> >
> > regards,
> > Kamal
> >
> >
> > ----- Original Message -----
> > From: "Laercio Júnior" < laerciopericles at gmail.com>
> > To: <ns-users at ISI.EDU>
> > Sent: Wednesday, May 25, 2005 11:35 PM
> > Subject: Re: [ns] Header compression(plz help me!)
> >
> >
> >
> > >
> > > Hello,
> >
> > I need routing information for that the packet is sent to the 
> destination.
> > So, the routing protocol, for example, AODV, is responsible by creating 
> a
> > route for the destination. After creating a route, the uncompressed 
> packet
> >
> > is sent. As it's been simulating an ad hoc network, each node represents 
> a
> > node-router. Each node that belongs to the route receives the 
> uncompressed
> > packet. These nodes must save the compressed fields. The next packet 
> that
> > will be sent is a compressed packet. The nodes that belong to a route
> > notice
> > that the compressed packet refers to the uncompressed packet sent 
> before.
> > So, the node reconstructs the packet and sent to the next node if
> > necessary.
> > Since ad hoc networks are mobile, any node may fail or go out of route
> > covery.
> > When that happens the sending of packet is stopped. The routing protocol
> > must discover another route. Probably any new node is introduced in the
> > new
> > route. It's good that only new nodes in the new route receive the
> > uncompressed packet.
> >
> > So, I'd like to modify the routing protocol, probably AODV, available in
> > ~ns/aodv/aodv.cc,
> > for sending, first of all, an uncompressed packet for all nodes that
> > belong
> > to the route.
> > In fact, I don't know if routing protocol already implements that.
> > In case of link fail, I also would like to modify it for sending a
> > uncompressed packet only to new nodes in the new route, saving 
> bandwidth.
> >
> > Until now, I think of modifying the method sendmsg() of the UdpAgent
> > class,
> > available in ~ns/apps/udp.cc(NS-2.28), responsible by allocation and
> > sending
> > of packets, since I'm simulating UDP connections. After this, I have to
> > discover in NS-2 where a packet is received in a node.
> > I'd like to know more certainly all the flow of a packet in NS-2, for 
> that
> > I
> > have a idea about which source codes I have to modify.
> > In the simulation, the compressor may be an agent UDP attached to the
> > source
> > node and to the decompressor another agent, maybe an agent Null, 
> attached
> > to
> > the destination node.
> >
> > I didn't understand when you say to modify only the bottleneck link and
> > create a new type of link. What does it mean?
> >
> > regards,
> > Laércio
> >
> >
> >
> > On 5/25/05, kamal deep singh <kamal.singh at irisa.fr> wrote:
> > >
> > > Hello,
> > >
> > > So, finally our approach looks ok.
> > > I still have some questions and comments.
> > >
> > > Why do you need extra things for routing?
> > > We are not touching the IP header but,
> > > are only doing things in our header called compressed header.
> > > If our packet header looks like follows
> > > [compressed header + IP + RTP+ payload]
> > > So, if we dont touch IP header then NS can route the packet normally. 
> I
> > am
> > > not
> > > sure if NS routing depends "only and only "on IP header.
> > >
> > > I implemented header compression in FreeBSD. so, it was not a 
> simulation
> > > but,
> > > more of an implementation. I placed compressor and decompressor 
> between
> > > Layer 2 and IP Layer.
> > > If we follow the same approach in NS then compressor and decompressor
> > > entities can
> > > be placed in the link layer of NS. We need to modify only the 
> bottleneck
> > > link.
> > > So a new type of link will be good. what do you think?
> > >
> > > regards,
> > > Kamal
> > >
> > > ----- Original Message -----
> > > From: "Laercio Júnior" <laerciopericles at gmail.com>
> > > To: <ns-users at ISI.EDU >
> > > Sent: Wednesday, May 25, 2005 12:05 AM
> > > Subject: Re: [ns] Header compression(plz help me!)
> > >
> > >
> > >
> > > Hello Kamal,
> > > I think your presented idea is practicable. While I was reading your
> > > explanation I thought of how the simulated packet size would be
> > modified.
> > > I believe you know that exists the information about simulated packet
> > size
> > > saved in the common header of the packet. This information is the
> > quantity
> > > of bytes sent to the network. I believe that this information it is 
> very
> > > important in the simulation, and your value not depends on Packet 
> object
> > > size, given as sizeof(Packet *p).
> > > According your idea(please correct me if I will be wrong), I think
> > > simulated
> > > packet size should be like this:
> > > simulated_packet_size = new_IP_header_size* + new_RTP_header_size** +
> > > payload
> > >
> > > * - compressed header or uncompressed header
> > > ** - compressed header or uncompressed header
> > >
> > > The UDP header is not included, because I think it is implemented in 
> the
> > > IP
> > > header, since the source port and destination port fields belong the 
> IP
> > > header, implemented in the structures src_ e dst_, respectively.
> > > According your idea, I intend to create new two structures for each 
> type
> > > of
> > > header(IP/RTP), one for uncompressed header and another for compressed
> > > header. About header size field, I believe that it already exists in 
> any
> >
> > > header in NS-2, named hdrlen_. NS-2 obtains your value through
> > > sizeof(header
> > > structure name).
> > >
> > > About which header compresssion mechanism I'm planning to simulate, 
> I'm
> > > being based on compression technique for ad hoc networks presented in
> > the
> > > poster "A Robust Header Compression Technique for Wireless Ad Hoc
> > > Networks",
> > > simulated in NS-2. According this technique, I also will have to be
> > modify
> > > the routing protocol in NS-2 for give support the header compression.
> > > As I'm simulating header compression over ad hoc networks,
> > > taking a look this poster, I noticed that not all compression 
> techniques
> > > are
> > > appropriated for ad hoc networks, also RFC 2507. Basically, first of
> > all,
> > > I
> > > intend to compress only the fields classified as STATIC-DEF, according
> > the
> > > appendix of the RFC 3095. These fields never change in value during 
> the
> > > lifetime of a specific packet stream.
> > > After, if there will be time, I intend to compress the others fields.
> > > By the way, when you implemented header compression did you have to
> > modify
> > > the routing protocol?
> > >
> > >
> > > best regards,
> > > Laércio
> > >
> > >
> > >
> > >
> > > On 5/24/05, kamal deep singh <kamal.singh at irisa.fr> wrote:
> > > >
> > > > Hello Laercio,
> > > >
> > > > I "think" it is possible to have compressed header in parellel with
> > > > IP header because NS packets contain all headers (even unwanted
> > > headers).
> > > > Maybe someone having more experience with NS can verify this but,
> > > normally
> > > > it should be the case.
> > > >
> > > > So every packet will have Compressed header + IP header + RTP +
> > payload
> > > +
> > > > others
> > > >
> > > > 1) Before compression, the compressed header will have all the
> > > fields(copy
> > > > of IP header)
> > > > but,
> > > > 2)After compression it will have only compressed fields.
> > > >
> > > > NS will still be able to route everythign because IP header
> > > > will still be intact and unchanged.
> > > >
> > > > I was telling you to include the header size field in the compressed
> > > > header
> > > > as an extra value to keep track of everything.
> > > >
> > > > Also, the complexity will depend on the header compression mechanism
> > > that
> > > > you are planning
> > > > to simulate. Are you planning to simulate RFC 2507 ?
> > > >
> > > > regards,
> > > > Kamal
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Laercio Júnior" <laerciopericles at gmail.com >
> > > > To: <ns-users at ISI.EDU>
> > > > Sent: Tuesday, May 24, 2005 5:41 PM
> > > > Subject: Re: [ns] Header compression(plz help me!)
> > > >
> > > >
> > > >
> > > > Hello Kamal,
> > > > thank you for your attention. I'll try to explain my idea.
> > > > My idea consists of creating another structure for each type of
> > header.
> > > > For
> > > > example, for the IP header, the new structure named 
> 'hdr_ip_compress'
> > > will
> > > > not have some fields, for example, source address and destination
> > > address.
> > > > In NS-2, each object Packet is composed of many header structures, 
> for
> > > > example, 'hdr_ip', 'hdr_rtp', 'hdr_aodv', etc, depending of which 
> the
> > > user
> > > > wants to active in the simulation code.
> > > > So, when I want to send a compressed packet, the structure 'hdr_ip'
> > will
> > > > not
> > > > be used, but the structure 'hdr_ip_compress'.
> > > > However, if NS-2 wants to send this packet it will need the fields
> > > source
> > > > address and destination address that were removed in the
> > > > 'hdr_ip_compress'.
> > > > I thought of saving the values these fields in the Agent object, for
> > > that
> > > > they were referenced whenever needed. However, in many, many places 
> in
> > > > NS-2,
> > > > for example, in the source code of routing protocol AODV, those 
> fields
> > > are
> > > > needed. So, modify all the source codes, in my opinion maybe it is
> > > > impracticable. Besides that, I don't know exactly which source codes
> > > I'll
> > > > have to modify.
> > > >
> > > > I have analyzed your idea. In your idea, how the NS-2 will get to 
> send
> > a
> > > > packet without some fields of the headers?
> > > >
> > > > Regards,
> > > > Laércio
> > > >
> > > >
> > > >
> > > > On 5/24/05, kamal deep singh < kamal.singh at irisa.fr> wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > > I have worked before on header compression but, only regarding
> > > > > implementation
> > > > > and not on simulation.
> > > > >
> > > > > May be we can share some points.
> > > > > For simulation over ns I think that using a field header size in 
> the
> > > > > packet
> > > > > will be more easy.
> > > > > Uncompressed packet will have header size equal to sum of IP + UDP 
> +
> > > RTP
> > > > > and compressed packet will have the size equal to compressed 
> packet.
> > > > >
> > > > > for more granularity may be it can be tried that each field has a
> > size
> > > > > field
> > > > > so that for example
> > > > > if IP-ID is sent full then size will be 2*8 bits but if only some
> > > delta
> > > > or
> > > > > something lets say of 4 bits is
> > > > > sent then size will become 4.
> > > > >
> > > > > Do you have any other ideas?
> > > > >
> > > > > regards,
> > > > > Kamal
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Laercio Júnior" <laerciopericles at gmail.com>
> > > > > To: < ns-users at ISI.EDU>
> > > > > Sent: Monday, May 23, 2005 3:55 PM
> > > > > Subject: [ns] Header compression(plz help me!)
> > > > >
> > > > >
> > > > >
> > > > > Hi everybody,
> > > > > I'm simulating header compression of VoIP packets in ns-2. The
> > > simulated
> > > > > packet is as below:
> > > > > simulated_packet = payload + header_ip + header_rtp
> > > > >
> > > > > I'm thinking of creating two types of packet: uncompressed packet
> > and
> > > > > compressed packet. The uncompressed packet consists of all fields 
> of
> > > the
> > > > > IP/RTP headers plus payload.
> > > > > The compressed packet consists of some fields of the IP/RTP 
> headers
> > > plus
> > > > > payload.
> > > > > First, I intend to compress the IP header. The structure of this
> > > header
> > > > in
> > > > > C++ implemented in NS-2(available in ~ns/common/ip.h) is as below:
> > > > >
> > > > > struct hdr_ip {
> > > > > /* common to IPv{4,6} */
> > > > > ns_addr_t src_;
> > > > > ns_addr_t dst_;
> > > > > int ttl_;
> > > > >
> > > > > /* Monarch extn */
> > > > > // u_int16_t sport_;
> > > > > // u_int16_t dport_;
> > > > >
> > > > > /* IPv6 */
> > > > > int fid_; /* flow id */
> > > > > int prio_;
> > > > >
> > > > > static int offset_;
> > > > > inline static int& offset() { return offset_; }
> > > > > inline static hdr_ip* access(const Packet* p) {
> > > > > return (hdr_ip*) p->access(offset_);
> > > > > }
> > > > >
> > > > > /* per-field member acces functions */
> > > > > ns_addr_t& src() { return (src_); }
> > > > > nsaddr_t& saddr() { return (src_.addr_); }
> > > > > int32_t& sport() { return src_.port_;}
> > > > >
> > > > > ns_addr_t& dst() { return (dst_); }
> > > > > nsaddr_t& daddr() { return (dst_.addr_); }
> > > > > int32_t& dport() { return dst_.port_;}
> > > > > int& ttl() { return (ttl_); }
> > > > > /* ipv6 fields */
> > > > > int& flowid() { return (fid_); }
> > > > > int& prio() { return (prio_); }
> > > > > };
> > > > >
> > > > > I'd like to know if it is possible to set the IP header described
> > > above
> > > > > for
> > > > > that just some fields are sent in the IP header. Will I have to
> > create
> > > > > another structure in C++ containing only the needed fields or
> > consider
> > > > the
> > > > > same structure ignoring some fields?
> > > > > Any idea is important.
> > > > >
> > > > > Thank you in advance,
> > > > >
> > > > > Laércio Jr.
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> 
>


More information about the Ns-users mailing list