LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2013, 09:14 PM   #31
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled

oh ok,but for post @21 also i am getting same error..
 
Old 02-22-2013, 10:59 PM   #32
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Smile

Sir thanks a lot,atlast i got it..i have to use ns-bgp then tcl script file:-)..


Sir i want to create bgp path between 2 and 13 autunomous system,how can i write ths tcl script for this(please check out below link),if possible please help me...

https://docs.google.com/file/d/0B2X6...it?usp=sharing


once again thanks a lot for your cooperation:-)....

Last edited by yashwanth58; 02-22-2013 at 11:01 PM.
 
Old 02-23-2013, 06:01 AM   #33
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 32 .

Probably edit one of the files.tcl, that already has a lookalike setup.
-
Attached Thumbnails
Click image for larger version

Name:	Network.topology.with.bottleneck.and.alternative.paths.png
Views:	35
Size:	14.3 KB
ID:	11918  

Last edited by knudfl; 02-23-2013 at 11:38 AM.
 
Old 02-23-2013, 09:39 AM   #34
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Smile

ok ok thank you very much...:-)
 
Old 02-24-2013, 11:19 PM   #35
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Smile

sir i tried for the above topology,but i am not able to do it..if possible have a look at this once

https://docs.google.com/file/d/0B2X6...it?usp=sharing

i edited in select.tcl of test folder..
i want to send packets via AS 1-3-5-7-9-12 and also other AS also should be present..

Code:
#
# new2.tcl
#

puts ""
puts "SELECT Validation Test: "
puts ""
puts " A \"triangle\" consisting of three ASes.  Each AS has one"
puts " BGP-speaking router.  Each router is connected directly to"
puts " the routers in each neighboring AS."
puts ""
puts "    AS----AS "
puts "     \\    /  "
puts "      \\  /   "
puts "       AS    "
puts ""


set nf [open new.nam w]
set ns [new Simulator]
$ns namtrace-all $nf

$ns node-config -BGP ON
set n0 [$ns node 0:10.0.0.1]
set n1 [$ns node 1:10.0.1.1]
set n2 [$ns node 2:10.0.2.1]
set n3 [$ns node 3:10.0.3.1]
set n4 [$ns node 4:10.0.4.1]
set n5 [$ns node 5:10.0.5.1]
set n6 [$ns node 6:10.0.6.1]
set n7 [$ns node 7:10.0.7.1]
set n8 [$ns node 8:10.0.8.1]
set n9 [$ns node 9:10.0.9.1]
set n10 [$ns node 10:10.0.10.1]
set n11 [$ns node 11:10.0.11.1]
set n12 [$ns node 12:10.0.12.1]
set n13 [$ns node 13:10.0.13.1]
$ns node-config -BGP OFF

$ns duplex-link $n1 $n3 1Mb 1ms DropTail
$ns duplex-link $n3 $n5 1Mb 1ms DropTail
$ns duplex-link $n5 $n7 1Mb 1ms DropTail
$ns duplex-link $n7 $n9 1Mb 1ms DropTail
$ns duplex-link $n9 $n12 1Mb 1ms DropTail

set bgp_agent1 [$n1 get-bgp-agent]
$bgp_agent1 bgp-id 10.0.1.1
$bgp_agent1 neighbor 10.0.3.1 remote-as 3

set bgp_agent3 [$n3 get-bgp-agent]
$bgp_agent3 bgp-id 10.0.3.1
$bgp_agent3 neighbor 10.0.0.1 remote-as 0
$bgp_agent3 neighbor 10.0.1.1 remote-as 1
$bgp_agent3 neighbor 10.0.2.1 remote-as 2
$bgp_agent3 neighbor 10.0.4.1 remote-as 4
$bgp_agent3 neighbor 10.0.5.1 remote-as 5
$bgp_agent3 neighbor 10.0.6.1 remote-as 6

set bgp_agent5 [$n5 get-bgp-agent]
$bgp_agent5 bgp-id 10.0.5.1
$bgp_agent5 neighbor 10.0.3.1 remote-as 3
$bgp_agent5 neighbor 10.0.4.1 remote-as 4
$bgp_agent5 neighbor 10.0.6.1 remote-as 6
$bgp_agent5 neighbor 10.0.7.1 remote-as 7

set bgp_agent7 [$n7 get-bgp-agent]
$bgp_agent7 bgp-id 10.0.7.1
$bgp_agent7 neighbor 10.0.5.1 remote-as 5
$bgp_agent7 neighbor 10.0.8.1 remote-as 8
$bgp_agent7 neighbor 10.0.9.1 remote-as 9
$bgp_agent7 neighbor 10.0.10.1 remote-as 10

set bgp_agent9 [$n9 get-bgp-agent]
$bgp_agent9 bgp-id 10.0.9.1
$bgp_agent9 neighbor 10.0.7.1 remote-as 7
$bgp_agent9 neighbor 10.0.8.1 remote-as 8
$bgp_agent9 neighbor 10.0.10.1 remote-as 10
$bgp_agent9 neighbor 10.0.11.1 remote-as 11
$bgp_agent9 neighbor 10.0.12.1 remote-as 12
$bgp_agent9 neighbor 10.0.13.1 remote-as 13

set bgp_agent12 [$n12 get-bgp-agent]
$bgp_agent12 bgp-id 10.0.12.1
$bgp_agent12 neighbor 10.0.9.1 remote-as 9

$ns at 0.35 "puts \"\n time: 0.35 \n n1 (ip_addr 10.0.1.1) \
                       defines a network 10.0.1.0/24.\""
$ns at 0.35 "$bgp_agent1 network 10.0.1.0/24"

$ns at 0.55 "puts \"\n time: 0.55 \n n3 (ip_addr 10.0.3.1) \
                       defines a network 10.0.3.0/24.\""
$ns at 0.55 "$bgp_agent3 network 10.0.3.0/24"

$ns at 0.75 "puts \"\n time: 0.75 \n n5 (ip_addr 10.0.2.1) \
                       defines a network 10.0.5.0/24.\""
$ns at 0.75 "$bgp_agent5 network 10.0.5.0/24"

$ns at 0.95 "puts \"\n time: 0.95 \n n7 (ip_addr 10.0.7.1) \
                       defines a network 10.0.7.0/24.\""
$ns at 0.95 "$bgp_agent7 network 10.0.7.0/24"

$ns at 1.15 "puts \"\n time: 1.15 \n n9 (ip_addr 10.0.9.1) \
                       defines a network 10.0.9.0/24.\""
$ns at 1.15 "$bgp_agent9 network 10.0.9.0/24"

$ns at 1.45 "puts \"\n time: 1.45 \n n12 (ip_addr 10.0.12.1) \
                       defines a network 10.0.12.0/24.\""
$ns at 1.45 "$bgp_agent12 network 10.0.12.0/24"

$ns at 39.0 "puts \"\n time: 39 \
                    \n dump routing tables in all BGP agents: \n\""
$ns at 39.0 "$bgp_agent1 show-routes"
$ns at 39.0 "$bgp_agent3 show-routes"
$ns at 39.0 "$bgp_agent5 show-routes"
$ns at 39.0 "$bgp_agent7 show-routes"
$ns at 39.0 "$bgp_agent9 show-routes"
$ns at 39.0 "$bgp_agent12 show-routes"

$ns at 40.0 "finish"

proc finish {} {
	global ns nf
	$ns flush-trace
	close $nf
	puts "Simulation finished. Executing nam..."
	exec nam new2.nam
	exit 0
}

puts "Simulation starts..."
$ns run


but i am getting this error

yashwanth@ubuntu:~/project$ ns-bgp new2.tcl

SELECT Validation Test:

A "triangle" consisting of three ASes. Each AS has one
BGP-speaking router. Each router is connected directly to
the routers in each neighboring AS.

AS----AS
\ /
\ /
AS

Simulation starts...
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o30: no target for slot -1
_o30 type: Classifier/IPv4
content dump:
classifier _o30
0 offset
0 shift
2147483647 mask
0 slots
---------- Finished standard no-slot{} default handler ----------
yashwanth@ubuntu:~/project$

Last edited by yashwanth58; 02-24-2013 at 11:22 PM.
 
Old 02-25-2013, 12:20 PM   #36
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 35 . Looks like "node 0, 1, 2" is the maximum for bgp.

One more node added : Troubles.

Have you considered bgp++ ?
http://www.ece.gatech.edu/research/labs/MANIACS/BGP++/
http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/
http://www.ece.gatech.edu/research/l...downloads.html
http://www.ece.gatech.edu/research/l...t-10-08.tar.gz
> GTNetS-Oct-10-08.tar.gz
The application is Ubuntu specific, uses g++-4.1, libqt3-dev.
( OK with Ubuntu 8.04, 10.04 ).
... May be bgp++ can do the simulation(s) you want ?

-
 
Old 02-26-2013, 01:11 AM   #37
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Smile

sir actually i got the simulation for this AS 1-3-5-7-9-12 sending packets from(1 to 12) but i need to show the other nodes(AS) also present in the network but there shouldn't be any packet flow from them..just i want to show neighbors presenting:-)
 
Old 02-26-2013, 04:22 AM   #38
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 37 .
Quote:
actually I got the simulation for this AS 1-3-5-7-9-12 sending packets from(1 to 12)
.
I want to show neighbors presenting
Right. That's why bgp++ was mentioned. Might behave different.

-
 
Old 03-19-2013, 11:43 PM   #39
tanmay288
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Rep: Reputation: Disabled
@yashwanth58 i am working on the similar project as yours on Autonomous system BGP simulation, if your problem is solved can u help me
 
Old 03-20-2013, 12:15 AM   #40
tanmay288
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 21 : Almost looks like the original "ns-2.34/tcl/bgp/test/select.tcl" ?
If it is the original file, please edit the content to the right formatting.

The original file will display this ..
Code:
$ ./ns-bgp select.tcl 

SELECT Validation Test: 

 A "triangle" consisting of three ASes.  Each AS has one
 BGP-speaking router.  Each router is connected directly to
 the routers in each neighboring AS.
                                                                                                                              
    AS----AS                                                                                                                  
     \    /                                                                                                                   
      \  /                                                                                                                    
       AS                                                                                                                     
                                                                                                                              
Simulation starts...                                                                                                          
                                                                                                                              
 time: 0.25                                                                                                                   
 n0 (ip_addr 10.0.0.1)  defines a network 10.0.0.0/24.                                                                        
                                                                                                                              
 time: 0.251736 %%  router: 10.0.1.1 received msg from peer: 10.0.0.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.0.0/24 (0)                                                                       
                                                                                                                              
 time: 0.251736 %%  router: 10.0.2.1 received msg from peer: 10.0.0.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.0.0/24 (0)                                                                       
                                                                                                                              
 time: 0.253488 %%  router: 10.0.2.1 received msg from peer: 10.0.1.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.0.0/24 (1 0)                                                                     
                                                                                                                              
 time: 0.253488 %%  router: 10.0.1.1 received msg from peer: 10.0.2.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.0.0/24 (2 0)                                                                     
                                                                                                                              
 time: 0.35                                                                                                                   
 n1 (ip_addr 10.0.1.1)  defines a network 10.0.1.0/24.                                                                        
                                                                                                                              
 time: 0.351736 %%  router: 10.0.0.1 received msg from peer: 10.0.1.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.1.0/24 (1)                                                                       
                                                                                                                              
 time: 0.45                                                                                                                   
 n2 (ip_addr 10.0.2.1)  defines a network 10.0.2.0/24.                                                                        

 time: 0.451736 %%  router: 10.0.0.1 received msg from peer: 10.0.2.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.2.0/24 (2) 

 time: 27.2518 %%  router: 10.0.1.1 received msg from peer: 10.0.0.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.2.0/24 (0 2) 

 time: 27.2518 %%  router: 10.0.2.1 received msg from peer: 10.0.0.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.1.0/24 (0 1) 

 time: 27.2535 %%  router: 10.0.2.1 received msg from peer: 10.0.1.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.1.0/24 (1) 

 time: 27.2535 %%  router: 10.0.1.1 received msg from peer: 10.0.2.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.2.0/24 (2) 

 time: 27.3029 %%  router: 10.0.2.1 received msg from peer: 10.0.1.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: 10.0.2.0/24  ads: -

 time: 27.3029 %%  router: 10.0.1.1 received msg from peer: 10.0.2.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: 10.0.1.0/24  ads: -

 time: 27.3518 %%  router: 10.0.0.1 received msg from peer: 10.0.1.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.2.0/24 (1 2) 

 time: 27.4518 %%  router: 10.0.0.1 received msg from peer: 10.0.2.1 %%  event_type: *RecvUpdate* %%  connection_state: *Established* %%  received msg: wds: -  ads: 10.0.1.0/24 (2 1) 

 time: 39  
 dump routing tables in all BGP agents: 

BGP routing table of n0
BGP table version is 4, local router ID is 10.0.0.1
Status codes: * valid, > best, i - internal.
     Network            Next Hop       Metric  LocPrf  Weight Path 
*>   10.0.0.0/24        self                  -      -      -          
*>   10.0.1.0/24        10.0.1.1/32           -      -      - 1        
*>   10.0.2.0/24        10.0.2.1/32           -      -      - 2        

BGP routing table of n1
BGP table version is 6, local router ID is 10.0.1.1
Status codes: * valid, > best, i - internal.
     Network            Next Hop       Metric  LocPrf  Weight Path 
*>   10.0.0.0/24        10.0.0.1/32           -      -      - 0        
*>   10.0.1.0/24        self                  -      -      -          
*>   10.0.2.0/24        10.0.2.1/32           -      -      - 2        

BGP routing table of n2
BGP table version is 6, local router ID is 10.0.2.1
Status codes: * valid, > best, i - internal.
     Network            Next Hop       Metric  LocPrf  Weight Path 
*>   10.0.0.0/24        10.0.0.1/32           -      -      - 0        
*>   10.0.1.0/24        10.0.1.1/32           -      -      - 1        
*>   10.0.2.0/24        self                  -      -      -          

Simulation finished. Executing nam...
.. And nam will open OK.

-
i have run the test.tcl but my output differs from above output, am i missing something?
my output
Code:
[tanmay@Sai ns-2.34]$ ./ns b2.tcl

SELECT Validation Test: 

 A "triangle" consisting of three ASes.  Each AS has one
 BGP-speaking router.  Each router is connected directly to
 the routers in each neighboring AS.

    AS----AS 
     \    /  
      \  /   
       AS    

Simulation starts...

 time: 0.25 
 n0 (ip_addr 10.0.0.1)  defines a network 10.0.0.0/24.

 time: 0.35 
 n1 (ip_addr 10.0.1.1)  defines a network 10.0.1.0/24.

 time: 0.45 
 n2 (ip_addr 10.0.2.1)  defines a network 10.0.2.0/24.

 time: 39  
 dump routing tables in all BGP agents: 

BGP routing table of n0
BGP table version is 4, local router ID is 10.0.0.1
Status codes: * valid, > best, i - internal.
     Network            Next Hop       Metric  LocPrf  Weight Path 
*>   10.0.0.0/24        self                  -      -      -          
*>   10.0.1.0/24        10.0.1.1/32           -      -      - 1        
*>   10.0.2.0/24        10.0.2.1/32           -      -      - 2        

BGP routing table of n1
BGP table version is 6, local router ID is 10.0.1.1
Status codes: * valid, > best, i - internal.
     Network            Next Hop       Metric  LocPrf  Weight Path 
*>   10.0.0.0/24        10.0.0.1/32           -      -      - 0        
*>   10.0.1.0/24        self                  -      -      -          
*>   10.0.2.0/24        10.0.2.1/32           -      -      - 2        

BGP routing table of n2
BGP table version is 6, local router ID is 10.0.2.1
Status codes: * valid, > best, i - internal.
     Network            Next Hop       Metric  LocPrf  Weight Path 
*>   10.0.0.0/24        10.0.0.1/32           -      -      - 0        
*>   10.0.1.0/24        10.0.1.1/32           -      -      - 1        
*>   10.0.2.0/24        self                  -      -      -          

Simulation finished. Executing nam...

Last edited by tanmay288; 03-26-2013 at 01:03 AM.
 
Old 03-20-2013, 12:35 AM   #41
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 40 :

Please do not quote entire posts. A reference to post #24 will do.


No. Not easy to spot any difference.
When you have edited #40 to [/code] tags, may be ?


>>> It is [/code], not [\code] at code text end. Edit, please.

-
 
Old 04-01-2013, 01:53 AM   #42
tanmay288
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Rep: Reputation: Disabled
Sir How to recompile a modified .CC file?
 
Old 04-01-2013, 11:10 AM   #43
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 41.

'b2.tcl' looks like some of the text from select.tcl .
Not usable as is.


# 42.

Which file.cc ?

-
 
Old 04-09-2013, 01:12 AM   #44
tanmay288
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Rep: Reputation: Disabled
ns2.34/classifier/classifier.cc
 
Old 04-09-2013, 03:31 AM   #45
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
#42, #44.

1) cd ns-allinone-2.34/ns-2.34/
2) cp ns ns-bgp
3) make clean
4) make

-
 
  


Reply

Tags
bgp, bgp-ns2, bgp-rfd-mrai, ns2



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
installing leach patch in ns2.34 in ubuntu9.10 g_vaibh Ubuntu 19 04-09-2015 09:43 AM
how to installing LTE module patch in NS2.33 kiwiw Ubuntu 179 02-27-2015 03:27 AM
patch LTE module for ns2 Emna Linux - Newbie 1 03-10-2011 02:59 AM
need 802.11e patch for ns2 stud17 Linux - Software 1 03-09-2011 06:54 AM
integrating patch in ns2 MLinux Linux - Networking 2 11-30-2010 08:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:06 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
Open Source Consulting | Domain Registration