Need help: Result doesn't match

201 views
Skip to first unread message

HungLT

unread,
Feb 26, 2012, 10:55:58 PM2/26/12
to omnetpp
Hi all, I want to count lost packets in Ethernet LAN. In my channel
BER = 10^-5, size of data = 10 Mb. In OMNET I got this result:
sendBytes = 10,485,760.00 , lost packets = 1263. This result doesn't
match with my result, which was calculated by formula. I see in
INETMANET, tcp' frame is 512 bytes, so number of packets is
10,485,760.00/512 = 20,480.00 packets. In channel tcp's packet is 602
bytes = 4816 bits , ACK's length is 72 bytes = 576 bits. If BER =
10^-5, then probability of getting bit error with tcp's packet = 1 -
(1- BER)^4816 = 0.047019 , probability of getting bit error with
ACK's packet = 1 - (1- BER)^576 = 0.005743 . Here suppose number of
tcp's packet = number of ACK's packet = 20,480.00, so number of lost
packets must be : 047019 * 20,480.00+ 005743*20,480.00 = 1,080.57 ,
not 1263. What's wrong with my results ?

Here is my .NED file:

package myswitchlan;

import inet.networklayer.autorouting.ipv4.FlatNetworkConfigurator;
import ned.DatarateChannel;
import inet.nodes.inet.StandardHost;
import inet.nodes.inet.Router;
import inet.nodes.ethernet.EtherSwitch;


network MySwitchLAN
{
parameters:
double ber1;
@display("bgb=565,314");

types:
channel ethernet_line extends DatarateChannel
{
// delay = 50 ns;
datarate = 10 Mbps;
}

channel fiber_line extends DatarateChannel
{
datarate = 512 Mbps;
}

submodules:
Switch: EtherSwitch {
@display("p=190,152");
}
Router: Router {
@display("p=348,153");
}
Internet: Router {
@display("p=494,153;i=misc/cloud");
}
Configurator: FlatNetworkConfigurator {
@display("p=494,274");
}
Client_1: StandardHost {
@display("p=64,40");
}
Client_2: StandardHost {
@display("p=64,153");
}
Client_3: StandardHost {
@display("p=64,271");
}
Server: StandardHost {
@display("p=494,40;i=device/server");
}

connections:
Client_1.ethg++ <--> ethernet_line { ber=ber1; @display("ls=,
1,s"); } <--> Switch.ethg++;
Client_2.ethg++ <--> ethernet_line { @display("ls=,1,s"); } <--
> Switch.ethg++;
Client_3.ethg++ <--> ethernet_line { @display("ls=,1"); } <-->
Switch.ethg++;
Switch.ethg++ <--> ethernet_line { @display("ls=,1"); } <-->
Router.ethg++;

Router.pppg++ <--> fiber_line { @display("ls=,4"); } <-->
Internet.pppg++;
Internet.pppg++ <--> fiber_line { @display("ls=,4"); } <-->
Server.pppg++;
}

And here's my .ini file:

simtime-scale = -12
#**.module-eventlog-recording = false
**.scalar-recording = false
**.vector-recording = false

[Config MySwitchLAN]
network = MySwitchLAN

#tkenv-plugin-path = ../../../etc/plugins
description = "BER = 0"

**.Client_1.**.scalar-recording = true
**.Client_1.**.vector-recording = true
#record-eventlog = true
#**.vector-recording = true
#**.scalar-recording = true
output-vector-file = ${resultdir}/${configname}-${runnumber}.vec
output-scalar-file = ${resultdir}/${configname}-${runnumber}.sca
eventlog-file = ${resultdir}/${configname}-${runnumber}.elog
#**.channel.throughput.result-recording-modes = all

# config TCP app of Client_1
**.Client_1.numTcpApps = 1
**.Client_1.tcpApp[*].typename = "TCPSessionApp"
**.Client_1.tcpApp[*].connectAddress = "Server"
**.Client_1.tcpApp[*].localPort = -1
**.Client_1.tcpApp[*].connectPort = 1000
**.Client_1.tcpApp[*].sendBytes = 10 MiB


# config TCP app of Server
**.Server.numTcpApps = 1
**.Server.tcpApp[*].typename = "TCPSinkApp"

# config NIC
**.eth[*].mac.duplexMode = true

# config channel
#**.channel.ber = ${10e-5, 10e-6, 10e-7, 10e-8, 10e-9}
**.ber1 = ${10e-5, 10e-6, 10e-7, 10e-8, 10e-9, 0}
#**.channel.packets.result-recording-modes = all
#**.channel.packetBytes.result-recording-modes = all
#**.channel.packetsDiscarded.result-recording-modes = all





Alfonso Ariza Quintana

unread,
Feb 27, 2012, 6:28:53 AM2/27/12
to omn...@googlegroups.com

Have you considered the mac retransmission?
the lost packet in the application layer are due to the mac retransmission has fail in recover the error


> Date: Sun, 26 Feb 2012 19:55:58 -0800
> Subject: [Omnetpp-l] Need help: Result doesn't match
> From: hung...@gmail.com
> To: omn...@googlegroups.com
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp

HungLT

unread,
Feb 27, 2012, 1:08:08 PM2/27/12
to omnetpp
Thank Anfolso. So could you tell me how to count lost packets of Mac
retrasmission by theory?

HungLT

unread,
Feb 27, 2012, 10:28:28 PM2/27/12
to omnetpp
Sorry, I made a mistake here
**.ber1 = ${10e-5, 10e-6, 10e-7, 10e-8, 10e-9, 0}

It must be :
**.ber1 = ${1e-5, 1e-6, 1e-7, 1e-8, 1e-9, 0}
But after rebuilding network, I got lost packets = 114. Only 114 lost
packets ??????

On Feb 27, 6:28 pm, Alfonso Ariza Quintana <aariza...@hotmail.com>
wrote:
> Have you considered the mac retransmission?
> the lost packet in the application layer are due to the mac retransmission has fail in recover the error
>
>
>
>
>
>
>
> > Date: Sun, 26 Feb 2012 19:55:58 -0800
> > Subject: [Omnetpp-l] Need help: Result doesn't match
> > From: hungpa...@gmail.com

Borbély Tamás

unread,
Feb 28, 2012, 5:02:44 AM2/28/12
to omn...@googlegroups.com
Hello,

The MySwitchLAN.Client_1.eth[0].mac/droppedPkBitError:count statistic only records the packets dropped by the client, i.e. the ACK frames.

The erroneous frames sent by the client are dropped by the switch and their count is collected in MySwitchLAN.Switch.mac[0]/droppedPkBitError:count.

tomi

2012/2/28 HungLT <hung...@gmail.com>

HungLT

unread,
Feb 28, 2012, 5:22:24 AM2/28/12
to omn...@googlegroups.com
Oh, thank you. I've just found this error today. In Switch's size, number of loss packets = 1028. Other question: in manetmanet, do the node use error-detection coding to recover error packet?

Alfonso Ariza Quintana

unread,
Feb 28, 2012, 6:41:40 AM2/28/12
to omn...@googlegroups.com

I don't know if the error coding detection/correction is simulated


Date: Tue, 28 Feb 2012 02:22:24 -0800
From: hung...@gmail.com
To: omn...@googlegroups.com
Subject: Re: [Omnetpp-l] Re: Need help: Result doesn't match

HungLT

unread,
Mar 5, 2012, 8:04:56 AM3/5/12
to omn...@googlegroups.com
Dear Anfolso, I have a question: I configured my network as bellow:

# config nic
**.radio.bitrate = 11Mbps
**.radio.transmitterPower = ${5, 10, 15, 20}mW
#**.radio.transmitterPower = 20mW
**.radio.thermalNoise = -110dBm
**.radio.sensitivity = -85dBm
**.radio.pathLossAlpha = 2
**.radio.snirThreshold = 4dB
**.mac.bitrate = 11Mbps

# channel physical parameters
*.channelControl.carrierFrequency = 2.4GHz
*.channelControl.pMax = 20mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2

The laptop pings the access point when it's moving away from access point with speed 1mps .  transmitterPower is : 5 mW, 10 mW, 15 mW, 20 mW. 

By theory I calculated that transmission range R in km between the laptop and access point is : 0.396 km; 0.559 km; 0.685 km; 0.791 km. But in result file I see the last records of rtt count as bellow: 
- with TxPower = 5 mW, the laptop has rtt count =  0,00124 when distance between laptop and AP is about 448 m 
- with TxPower = 10 mW, the laptop has rtt count=  0.00124 when distance between laptop and AP is about 612 m
- with TxPower = 15 mW, the laptop has rtt count=  0.0363 when distance between laptop and AP is about 655 m
- with TxPower = 20 mW, the laptop has rtt count =  0.0367 when distance between laptop and AP is about 657 m

So why laptop stops writing rtt vector NOT in the moment when it moves out of transmission range?  You coud see my grapht with  transmitterPower=5 mW here (sorry about my English skill)

Reply all
Reply to author
Forward
0 new messages