[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fragmentation/reassembly functions at link layer



	Hi, I also feel it's necessary to implement datagram
fragment/reassemble in IP layor of ns.
	I think we can "add" another attribute of link as "MTU",
and modify the class Agent, so that whenever an agent intends
to send a packet to downstream agent, it will examin the "MTU"
of outgoing link first, if necessary, break the packet into
pieces which fits in the MTU and send the fragments out; and
in the recv path, an agent may also need to "reassemble" ip
fragments if some field in packet header indicate they're 
fragments.
	
	Another issue I'm not clear is whether TCP in ns2
has a MSS (maximum segment size) specified somewhere, is it
sets to the default value 536 or something else?



Kaichuan


On Thu, 24 Jun 1999, Nguyen Huu Thanh wrote:

> Hello folks,
> 
> I like to add some functions at link layer such as packet
> fragmentation/reassembly for simulation of IP packets in different
> network environments, e.g., ATM.
> 
> My idea is as follows: I would write a class "MyLink" derived from, say,
> LinkDelay. On receipt of an ip_packet from higher layer, it performs
> recv():
> 
> struct hdr_atm{
> ...
> }
> 
> revc(Packet* ip_packet, Handler*){
> 
> 	hdr_cmn* ch= (hdr_cmn*)ip_packet->access(hdr_cmn::offset_);
> 	cellNumber_= ch->size()/53;
> 
> 	for (int i=0; i <= cellNumber_; i++) {
> 		Packet* p = Packet::alloc();
> 		copy_cmn_hdr_into_this_cmn_header();
> 		initialize_atm_header();
> 		target_->recv(p);
> 	}
> 
> 	// .. and so on
> }
> 
> I simply copy the hdr_cmn of the IP packet into hdr_cmn of the ATM
> cells. The receiving end performs the reassembly function based on the
> information carried in the hdr_cmn and hdr_atm of the ATM cells.
> 
> However, I think it would violate some rules noted in the ns
> Documentation, namely:
> 
> - Only class Agent and its classes generate packets.
> - hdr_cmn::uid_ must be unique.
> 
> My questions are:
> 
> - Can I do that?
> - How can I set hdr_cmn::uid_?
> - Has anyone already implemented link-layer fragmentation/reassembly or
> has a better idea?
> 
> Thanks very much in advance.
> 
> Thanh
> 
> -- 
> ------------------------------------------------
>     Nguyen Huu Thanh                      
> 
>     Universitaet der Bundeswehr Muenchen  
>     Institut fuer informationstechnische Systeme
>     Werner-Heisenberg-Weg 39
>     85577 Neubiberg                        
>     Tel.: +49 89 6004-2279                   
>     Email: [email protected]  
> -------------------------------------------------
>