dce quagga command line

236 views
Skip to first unread message

Alexander Schmidt

unread,
Oct 7, 2013, 4:28:49 PM10/7/13
to ns-3-...@googlegroups.com
Hi,

I am a student of Telecommunication from Germany and I am using ns3 with DCE to write my MSc thesis.

The Quagga module is the think I am most interested in, but unfortunately, I have some troubles with it. I would like to change some configurations during simulation (link cost for example) collect data and analyze them.

I know how to generate start configuration, but is there any way to connect to application command line and write some command there?
I examined source code and I found that I can set input file to process as it fd0, but how to use it?

I am looking to hear from you.
Thank you in advance.

Best Regards,
Alexander Schmidt

Piotr Gawłowicz

unread,
Oct 8, 2013, 6:08:50 PM10/8/13
to ns-3-...@googlegroups.com
Hi,

I am working on similar thing. Quagga do not have cmd, you can change configuration by vty (connected by telnet).

I recompiled source code of telnet and run this in ns3 node. After few trials I managed to connect telnet to quagga via 127.0.0.1 2604. In the telnet stdout file, there is the message that it is connected, and also in quagga stdout there is information that telnet connection came.

But there is no good information:) because the rest of the telnet stdout file is filled with weird and random chars.

Do anyone has idea what is happening?

Best regards,
Piotr Gawlowicz

Hajime Tazaki

unread,
Oct 9, 2013, 8:06:49 PM10/9/13
to ns-3-...@googlegroups.com

Hi Alexander and Piotr,

If you wish to change the configuration on the fly, the way
tried by Piotr is probably smart I think.

It also would be nice if the telnet code will be some kind
of helper module (e.g., ns3::TelnetHelper) and be used not
only for quagga.

For the wired text in stdout file, I guess telnet command
generates some control characters for the console handling, etc.

-- Hajime

At Tue, 8 Oct 2013 15:08:50 -0700 (PDT),
Piotr Gawłowicz wrote:
>
> [1 <text/plain; ISO-8859-1 (7bit)>]
> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/groups/opt_out.
> [2 <text/html; ISO-8859-1 (quoted-printable)>]
>

Piotr Gawłowicz

unread,
Oct 13, 2013, 5:21:00 PM10/13/13
to ns-3-...@googlegroups.com
Hi,

After few days I spent on this problem and have no idea what to do next. I have tried to run bash from ns3 and run telnet from it but with no difference. I always get the same output like "Ñ xÇóÛ: xÇóÛ: dce-linux/source/ns-3-dce/build/lib/P` ðS ÐS " when trying to connect 127.0.0.1 2604 (ospfd deamon).  I am wondering why there is some path to dce build directory?

I compiled this telnet code http://www.gnu.org/software/inetutils/inetutils.html, there was one missing symbol and I added it by  NATIVE (_setjmp). Also, I tried some simpler telnet client http://l3net.wordpress.com/2012/12/09/a-simple-telnet-client/ with the same effect.

I thought that ospf deamon might be a problem so, I have also tried to connect to this simple echo server with telnet http://www.binarytides.com/server-client-example-c-sockets-linux/.  I modified the server code to send "test" string just after accepting connedtion and it works! it is printed to telnet stdout file! Nextly, I tried to set stdin file to telnet an schedule function to write "test" to it, but connection is closed if only the stdin file is set (even without calling write function). So there is no way to any communication with telnet:(

My first thought was that I will run bash in ns3, and inside it I will call "expect" with script file to spawn telnet and do some steps. I do not know if the basic idea is possible, but without right output from telnet it certainly can not be done.

There is also no difference with more recent kernel, I performed all things second time with 3.5.0, because I thought there might be a problem.

I can work on it and make TelnetHelper but I need some clues and help from you Hajime :) I am not an expert but only the Telecommunication student :)

Maybe the best thing will by to write short programs to connect to server and perform some steps like sending some commands?

I am looking forward to hear from you.

Best regards,
Piotr Gawłowicz
Message has been deleted

Piotr Gawłowicz

unread,
Oct 16, 2013, 4:03:21 PM10/16/13
to ns-3-...@googlegroups.com
Hi,

I managed to connect to ospf deamon via TAP device from real host. And messages form quagga are the same = rubbish characters. So could it be that quagga code is not working well?
One good information is that, that quagga reads commands properly, because when I make a connection and hit ENTER two times, it disconnects me. (The same is with real deamon). But when I put the password "zebra" I am able to hit enter more times:) It also reacts for enable, configure terminal, exit so probably it works (I enclosed printscreen).

But how to repair the responses and make them more readable for humans:)

Best regards,
Piotr Gawlowicz
zebra.png

Hajime Tazaki

unread,
Nov 5, 2013, 3:57:13 PM11/5/13
to ns-3-...@googlegroups.com

Hello Piotr,

I'm sorry for the late response.

At Wed, 16 Oct 2013 13:03:21 -0700 (PDT),
Piotr Gawłowicz wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; ISO-8859-1 (7bit)>]
the following bugfix causes the issue you pointed out:
non-readable characters on quagga vty output.
# quagga is correctly working.

https://www.nsnam.org/bugzilla/show_bug.cgi?id=1759

I uploaded the proposed fix for this issue. I will work on
merging this asap, but for the time being, please use this
patch.

hope it helps you.

-- Hajime

> Best regards,
> Piotr Gawlowicz
>
> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/groups/opt_out.
> [1.2 <text/html; ISO-8859-1 (7bit)>]
>
> [2 zebra.png <image/png (base64)>]
>

jmw...@g.rit.edu

unread,
Mar 21, 2014, 12:42:38 PM3/21/14
to ns-3-...@googlegroups.com
Piotr (or anyone who knows),

I was wondering if you could share the steps you took to get a connection to the VTY interface in Quagga. I'm looking to do a similar thing but I'm not sure what I need to do to set up such a connection.

--Jeremy

Hajime Tazaki

unread,
Mar 31, 2014, 9:58:02 AM3/31/14
to ns-3-...@googlegroups.com

Hi,

What Piotr was done with VTY (via telnet) with dce-quagga
is, using TapBridge to create tap interface on a host, and
execute telnet command connecting to a host on ns-3.

http://www.nsnam.org/docs/models/html/tap.html

after creating tap interface and an IP address on a ns-3
host is available, like 10.0.0.2, you can use telnet command
at the host (which you're executing ns-3 program) as:

telnet 10.0.0.2 2501

this should give you to connect zebra process in a ns-3
host.

hope that will help.

-- Hajime

At Fri, 21 Mar 2014 09:42:38 -0700 (PDT),
jmw...@g.rit.edu wrote:
>
> [1 <text/plain; UTF-8 (7bit)>]
> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/d/optout.
> [2 <text/html; UTF-8 (quoted-printable)>]
>
Reply all
Reply to author
Forward
0 new messages