LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-13-2015, 03:45 PM   #1
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Rep: Reputation: Disabled
Segmentation fault


Dear sir
When i want to run following script in ns2.29 add on with NIST module terminal show "Segmentation fault"
Please guide

Code:
set ns [new Simulator]
set cir0 1000000
set cbs0 3000
set rate0 2000000
set cir1 2000000
set cbs1 10000
set rate1 1000000
 
set testTime 85.0
set packetSize 1000
 
# Set up the network topology shown at the top of this

set s1 [$ns node]
set s2 [$ns node]
set e1 [$ns node]
set core [$ns node]
set e2 [$ns node]
set dest [$ns node]

$ns duplex-link $s1 $e1 10Mb 5ms DropTail
$ns duplex-link $s2 $e1 10Mb 5ms DropTail
$ns simplex-link $e1 $core 10Mb 5ms dsRED/edge
$ns simplex-link $core $e1 10Mb 5ms dsRED/core
$ns simplex-link $core $e2 5Mb 5ms dsRED/core
$ns simplex-link $e2 $core 5Mb 5ms dsRED/edge
$ns duplex-link $e2 $dest 10Mb 5ms DropTail

set qE1C [[$ns link $e1 $core] queue]
set qE2C [[$ns link $e2 $core] queue]
set qCE1 [[$ns link $core $e1] queue]
set qCE2 [[$ns link  $core $e2] queue]

# SetDS RED parameters from Edge1 to Core:
$qE1C meanPktSize $packetSize
$qE1C set numQueues_ 1
$qE1C setNumPrec 2
$qE1C addPolicyEntry [$s1 id] [$dest id] TokenBucket 10
$cir0 $cbs0
$qE1C addPolicyEntry [$s2 id] [$dest id] TokenBucket 10
$cir1 $cbs1
$qE1C addPolicerEntry TokenBucket 10 11
$qE1C addPHBEntry 10 0 0
$qE1C addPHBEntry 11 0 1
$qE1C configQ 0 0 20 40 0.02
$qE1C configQ 0 1 10 20 0.10

$qE2C meanPktSize $packetSize
$qE2C set numQueues_ 1
$qE2C setNumPrec 2
$qE2C addPolicyEntry [$s1 id] [$dest id] TokenBucket 10
$cir0 $cbs0
$qE2C addPolicyEntry [$s2 id] [$dest id] TokenBucket 10
$cir1 $cbs1
$qE2C addPolicerEntry TokenBucket 10 11
$qE2C addPHBEntry 10 0 0
$qE2C addPHBEntry 11 0 1
$qE2C configQ 0 0 20 40 0.02
$qE2C configQ 0 1 10 20 0.10

# Set DS RED parameters from Core to Edge1:
$qCE1 meanPktSize $packetSize
$qCE1 set numQueues_ 1
$qCE1 setNumPrec 2
$qCE1 addPHBEntry 10 0 0
$qCE1 addPHBEntry 11 0 1
$qCE1 configQ 0 0 20 40 0.02
$qCE1 configQ 0 1 10 20 0.10


# Set DS RED parameters from Core to Edge2:
$qCE2 meanPktSize $packetSize
$qCE2 set numQueues_ 1
$qCE2 setNumPrec 2
$qCE2 addPHBEntry 10 0 0
$qCE2 addPHBEntry 11 0 1
$qCE2 configQ 0 0 20 40 0.02
$qCE2 configQ 0 1 10 20 0.10

# Set up one CBR connection between each source and the
destination:
set cbr0 [new Agent/CBR]
$ns attach-agent $s1 $cbr0
$cbr0 set packetSize_ $packetSize
$cbr0 set interval_ [expr 1.0 / [expr $rate0 / 8000.0]]
set null0 [new Agent/Null]
$ns attach-agent $dest $null0
$ns connect $cbr0 $null0
set cbr1 [new Agent/CBR]
$ns attach-agent $s2 $cbr1
$cbr1 set packetSize_ $packetSize
$cbr1 set interval_ [expr 1.0 / [expr $rate1 / 8000.0]]
set null1 [new Agent/Null]
$ns attach-agent $dest $null1
$ns connect $cbr1 $null1

proc finish {} {
global ns
exit 0
}
 
Old 09-13-2015, 07:54 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
"Segmentation fault" : Of course you cannot run the above code as a simulation.
The last section of the file is missing : The section with $ns run.

You can find the similar / real simulation files here : ns-2.xx/tcl/ex/diffserv/ds-cbr**

... All the eight ds-cbr** files are running OK with the "ns-nist-pmipv6" executable.
And with the "ns-nistmob-wimax" executable.
( The file null.tcl isn't necessarily usable.)
EDIT : null.tcl works with old ns-2.27 "ns executable`s".


-

Last edited by knudfl; 09-13-2015 at 09:36 PM.
 
Old 09-14-2015, 02:42 AM   #3
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Again segmentation fault

Dear sir
Thanks for your reply.
Now i want to implement DiffServ in my integrated network.Individual codes are simulated but combine codes generate segmentation fault. Codes are attached. Please guide.
regards
Attached Files
File Type: txt To_send.tcl.txt (12.2 KB, 19 views)
 
Old 09-15-2015, 08:53 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #3.

Not sure you can mix diffserv into a nist-mob simulation.
( Besides that, none of those are supporting NAM ,,, AFAIK.
Like several other protocols : No nam can be used.)

----

If you want to watch a complex nist simulation :
Run './ABCpref.sh' and './distance.sh' in the `script/' folder from NS-MIH-MULTI-CRITERIA
http://sourceforge.net/projects/mihnistns229/
... Both simulations are running OK with the 'ns' from ns2 + nist-mob + pmipv6.

See multiMN.tcl, umts-80211-80216.tcl : UMTS, LTE?, MIH, MIPV6, Mac802.11, Mac802.16

----
 
Old 09-24-2015, 08:18 AM   #5
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Dear sir
I want to implement DiffServ in UMTS WLAN integrated network through ns2.29 NIST module as shown in previous post. In ns2.29 i can see DiffServ folder with no of files including core and edge router. I have gone through your suggested links, but still not able to find out any solution. Please guide how i can i simulate this.
My topology is like ....CN----R0-----CORE------R1---RNC & AP (NOW R1 connected with AP and RNC both)further RNC connected to BS
Concept is R0 & R1 act as Edge router and Core as core router.
Regards

Last edited by Aabha; 09-24-2015 at 08:19 AM.
 
Old 09-24-2015, 08:41 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #5.

You can try asking here https://stackoverflow.com/questions/tagged/ns2
 
Old 03-09-2016, 09:06 AM   #7
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Dear sir
I am again asking whether ns2.29 NIST add on module can support DiffServ implementation or not as my problem not solved on https://stackoverflow.com/questions/tagged/ns2. I want to implement DiffServ in integrated network of UMTS-WLAN. Without DiffServ integrated network is working fine.
Other problem is how to attach out.res file in this forum as i have some problem with awk script and want to post awk script along with .res file for evaluation.
regards
 
Old 03-30-2016, 06:54 AM   #8
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Sir please reply..
 
Old 03-30-2016, 09:15 AM   #9
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,110
Blog Entries: 10

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Quote:
Originally Posted by Aabha View Post
Dear sir
I am again asking whether ns2.29 NIST add on module can support DiffServ implementation or not as my problem not solved on https://stackoverflow.com/questions/tagged/ns2. I want to implement DiffServ in integrated network of UMTS-WLAN. Without DiffServ integrated network is working fine.
Other problem is how to attach out.res file in this forum as i have some problem with awk script and want to post awk script along with .res file for evaluation.
regards
Please review this link: Welcome to LQ

What EXACTLY have you tried? Some details here. I see no publication of a segmentation fault at all, and it appears you've changed your question into a request for a guide to do something which you haven't even tried.

What have you tried to do in resolving this during the last 6 months?
 
Old 03-31-2016, 02:53 AM   #10
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Dear sir
During last six months i read literature related to DiffServ,UMTS,WLAN i.e. technologies i want to use in simulation. I also tried to simulate attached codes (in second post of this thread- To_send.tcl.txt) in ns2.29 NIST add on module. And even after several corrections and modifications out put of simulation remain unchanged that is segmentation fault, so why i asked my question again.

regards
 
Old 03-31-2016, 09:05 AM   #11
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,110
Blog Entries: 10

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Post the segmentation fault report which you are experiencing.

Turn on core files within your terminal, and analyze the core file using GDB.

None of that has anything to do with DiffServ,UMTS,WLAN.

Your simulator is giving you segmentation faults on any simulation, so debug that first. At the very least, you either can or cannot run the most fundamental simulation without any error. If that statement is not true, then you have incorrect built your simulator, or the simulator you're using was potentially not built for the machine on which you are running it.
 
Old 03-31-2016, 10:08 AM   #12
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Dear sir
I have attached screenshot of terminal window, showing segmentation fault. Other script based on UMTS-WLAN integration simulated without any error with same simulator.
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	7
Size:	106.6 KB
ID:	21334  
 
Old 03-31-2016, 10:16 AM   #13
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,110
Blog Entries: 10

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Quote:
Originally Posted by Aabha View Post
Dear sir
I have attached screenshot of terminal window, showing segmentation fault. Other script based on UMTS-WLAN integration simulated without any error with same simulator.
OK, well you have some options here to consider. You either can or cannot perform GDB analysis of a core file dump. You didn't have core file dumping enabled in your terminal.
Code:
$ ulimit -c unlimited
Will enable core file dumping, for the terminal in which you type this, only for that login session. But if you haven't built the simulator from source, then likely you do not have the symbols to debug with. While it may be worth trying to analyze a core file, not sure you'll get far without source symbols. At the very least it may show you the binary executable file which is experiencing the fault and then you can analyze that file in this manner by trying to rebuild it locally with symbols.

Where did you get the simulator? Was it installed as part of a package, or something you downloaded and ran?
 
Old 04-01-2016, 12:55 AM   #14
Aabha
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Dear sir
Its installed as part of a package....
 
  


Reply

Tags
nist-mob, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault mcamember Programming 7 12-18-2006 04:27 PM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 10:34 AM
Segmentation fault SocialEngineer Linux - General 0 01-07-2005 01:49 PM
Segmentation Fault (What is that?) jlacroix Fedora 6 11-17-2003 09:32 PM
Segmentation Fault redhatnoob Linux - Software 3 11-13-2003 03:11 AM


All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration