Re: BIRD: MPBGP & problems debugging
Hello!
My project is based in BGP. I have to implement the capability of transporting MPLS labels over BGP messages, or, in other words, implement MP-BGP in a BGP open source daemon. And that's the reason I'm writing to this list!
Good news!
Usually I test the changes I make in a virtual network done with User Mode Linux (UML) (I don't know if you have heard about that?).
I heard, but never used that myself (mainly because when I was working on BIRD, UML didn't exist yet :) ).
1.- Diving in the web and looking for documentation and information of BIRD, I have seen that MBGP support is one of the future objectives of the daemon, and I would like to know if there is any improvement being developed at the moment in this area, or if somebody could give me the contact of any working group interested in MBGP for BIRD.
So far nothing. Feela, did anybody at Cesnet think about that?
2.- Another problem I have founded is that when I try to configure BIRD with the --enable-debug option, BIRD can't find my bird.conf, and consecuently it can't run.
If I remember correctly, the debug mode causes BIRD to search for everything (config, birdc sockets etc.) in the current directory. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth A sine curve goes off to infinity or at least the end of the blackboard.
If I remember correctly, the debug mode causes BIRD to search for everything (config, birdc sockets etc.) in the current directory.
Martin, thanks for your quick response, If I have understood you well, I have to copy my config file (bird.conf) into the directory where I am running bird. Ok, bird find it. But the birdc socket is created ONCE I have executed bird, so I can`t copy it before calling bird, and continue without finding it, and consecuently without being able to run birdc :(. Another question: What else does bird need to find in the current directory, apart from the bird.conf file and the bird.ctl socket? It's very important to for my proyect be able to see de debugging messages, because I need to know what is happening inside bird! Thank you very much for your time. Best regards, Jorge -jorge1981@gmail.com- 2006/8/1, Martin Mares <mj@ucw.cz>:
Hello!
My project is based in BGP. I have to implement the capability of transporting MPLS labels over BGP messages, or, in other words, implement MP-BGP in a BGP open source daemon. And that's the reason I'm writing to this list!
Good news!
Usually I test the changes I make in a virtual network done with User Mode Linux (UML) (I don't know if you have heard about that?).
I heard, but never used that myself (mainly because when I was working on BIRD, UML didn't exist yet :) ).
1.- Diving in the web and looking for documentation and information of BIRD, I have seen that MBGP support is one of the future objectives of the daemon, and I would like to know if there is any improvement being developed at the moment in this area, or if somebody could give me the contact of any working group interested in MBGP for BIRD.
So far nothing. Feela, did anybody at Cesnet think about that?
2.- Another problem I have founded is that when I try to configure BIRD with the --enable-debug option, BIRD can't find my bird.conf, and consecuently it can't run.
If I remember correctly, the debug mode causes BIRD to search for everything (config, birdc sockets etc.) in the current directory.
Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth A sine curve goes off to infinity or at least the end of the blackboard.
I've just discovered the way it works. That's what I have done: After having configure BIRD with the --enable-debug option, I have opened a shell, and in the bird.conf directory, I have executed bird. . Then, in opened another shell and I have executed birdc -s /"bird.confdirectory", and finally I got birdc in my screen. But... What I originally wanted was to get <DBG> messages in my log file, and it continue without them. I don't know where is my error;I thnik I have activated all the "debug" options...Here is my configuration file: debug protocols all; log "/log_bird" all; protocol kernel { persist; scan time 5; export all; } protocol device { scan time 10; } protocol static { route 11.0.0.0/24 reject;#via "tap0"; #route 172.29.16.0/22 reject; } protocol bgp bgp2 { local as 65005; neighbor 13.0.0.2 as 65002; import all; export where source=RTS_STATIC;; source address 13.0.0.1; } Any idea?? Best regards, Jorge -jorge1981@gmail.com- 2006/8/2, Jorge Gomez <jorge1981@gmail.com>:
If I remember correctly, the debug mode causes BIRD to search for everything (config, birdc sockets etc.) in the current directory.
Martin, thanks for your quick response,
If I have understood you well, I have to copy my config file (bird.conf) into the directory where I am running bird. Ok, bird find it. But the birdc socket is created ONCE I have executed bird, so I can`t copy it before calling bird, and continue without finding it, and consecuently without being able to run birdc :(. Another question: What else does bird need to find in the current directory, apart from the bird.conf file and the bird.ctl socket?
It's very important to for my proyect be able to see de debugging messages, because I need to know what is happening inside bird!
Thank you very much for your time.
Best regards,
Jorge -jorge1981@gmail.com-
2006/8/1, Martin Mares <mj@ucw.cz>:
Hello!
My project is based in BGP. I have to implement the capability of transporting MPLS labels over BGP messages, or, in other words, implement MP-BGP in a BGP open source daemon. And that's the reason I'm writing to this list!
Good news!
Usually I test the changes I make in a virtual network done with User Mode Linux (UML) (I don't know if you have heard about that?).
I heard, but never used that myself (mainly because when I was working on BIRD, UML didn't exist yet :) ).
1.- Diving in the web and looking for documentation and information of BIRD, I have seen that MBGP support is one of the future objectives of the daemon, and I would like to know if there is any improvement being developed at the moment in this area, or if somebody could give me the contact of any working group interested in MBGP for BIRD.
So far nothing. Feela, did anybody at Cesnet think about that?
2.- Another problem I have founded is that when I try to configure BIRD with the --enable-debug option, BIRD can't find my bird.conf, and consecuently it can't run.
If I remember correctly, the debug mode causes BIRD to search for everything (config, birdc sockets etc.) in the current directory.
Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/<http://atrey.karlin.mff.cuni.cz/%7Emj/> Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth A sine curve goes off to infinity or at least the end of the blackboard.
Hi!
What I originally wanted was to get <DBG> messages in my log file, and it continue without them. I don't know where is my error;I thnik I have activated all the "debug" options...Here is my configuration file:
debug protocols all; log "/log_bird" all;
Protocol debugging actually produces <TRACE> messages, not <DBG>. The <DBG> class is used very rarely. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth War doesn't determine who's right. It determines who's left.
Protocol debugging actually produces <TRACE> messages, not <DBG>. The <DBG> class is used very rarely.
Hi Martin, Yes, that's what I mostly got in my log file. But the <DBG> messages show a lot of information very intersting for me about the internal procedures of BIRD. Is there any way of getting them in my log file? or is it completely impossible? I would like to get messages with values of variables while running, or at least, messages in the log file to know if the program enters into a certain switch-case, and that kind of things. I tried with the BGP_TRACE(D_PACKETS, "hello") function in attrs.c (the file which i am mostly working on), but it crash when I execute "make". It seems like if it is not declared, or something like that. Can you tell me where is the BGP_TRACE declaration, in order to undertand it? Thank you very much Martin! Jorge -jorge1981@gmai.com- 2006/8/3, Martin Mares <mj@ucw.cz>:
Hi!
What I originally wanted was to get <DBG> messages in my log file, and it continue without them. I don't know where is my error;I thnik I have activated all the "debug" options...Here is my configuration file:
debug protocols all; log "/log_bird" all;
Protocol debugging actually produces <TRACE> messages, not <DBG>. The <DBG> class is used very rarely.
Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/<http://atrey.karlin.mff.cuni.cz/%7Emj/> Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth War doesn't determine who's right. It determines who's left.
Hi!
Yes, that's what I mostly got in my log file. But the <DBG> messages show a lot of information very intersting for me about the internal procedures of BIRD. Is there any way of getting them in my log file? or is it completely impossible?
Do you mean the log messages with class <DBG> or just messages logged through the debug() function? The former should be a part of the log file, the latter can be directed into any file you like by the -D switch.
I would like to get messages with values of variables while running, or at least, messages in the log file to know if the program enters into a certain switch-case, and that kind of things. I tried with the BGP_TRACE(D_PACKETS, "hello") function in attrs.c (the file which i am mostly working on), but it crash when I execute "make". It seems like if it is not declared, or something like that. Can you tell me where is the BGP_TRACE declaration, in order to undertand it?
It's defined in proto/bgp/bgp.h. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth Noli tangere fila metalica, ne in solum incasa quidem.
Hi Martin! How are you? Here in Madrid very, very hot! we need more swimming pools :)!
Do you mean the log messages with class <DBG> or just messages logged through the debug() function?
Any of them. The only thing I need is to know what is happening inside the program (for example, if the program is parsing attributes, which attribute is being encoding, or if the program is entering in a determined switch-case, etc) at running time. The log messages with class <DBG> would be perfect because it offers practically all the information I need. But I can't see them. You said that the <DBG> class is used very rarely. Does it mean that they can't be forced to appears in the log file? How can I see them? The debug() function, which I didn't discovered:-), would be also OK, but if I simply use it in attrs.c (the file I am working on), bird returns me a syntaxt error when making. What do I need to include in attrs.c in order to make debug() works? perhaps birdlib.h, where it is declared? or copy it definition from sysdep/unix/log.c? In sysdep/unix/log.c I have also discovered the log_msg() function. I think it works in a very similar way to the debug() function, but I have the same questions for that. About the BGP_TRACE() function, I was analycing it code, and I realise that the problem when using it in the bgp_encode_attrs() function is that BGP_TRACE() needs that the function from you are calling it, have "sock *sk" as argument, in order to get from sk the struct bgp_proto *p by: struct bgp_conn *conn = sk->data; struct bgp_proto *p = conn->bgp; As the bgp_encode_attrs() function doesn't have "sock *sk" as argument, I can't use BGP_TRACE inside it :(. I considered adding this argument to bgp_encode_attrs, and try to work in this way, but I think is more complicated that using the other option I explained above. What do you think about that? I feel I'm founding too many problems only whith getting the information messages... Thanks a lot Martin. Best regards, Jorge <jorge1981@gmail.com> 2006/8/7, Martin Mares <mj@ucw.cz>:
Hi!
Yes, that's what I mostly got in my log file. But the <DBG> messages show a lot of information very intersting for me about the internal procedures of BIRD. Is there any way of getting them in my log file? or is it completely impossible?
Do you mean the log messages with class <DBG> or just messages logged through the debug() function?
The former should be a part of the log file, the latter can be directed into any file you like by the -D switch.
I would like to get messages with values of variables while running, or at least, messages in the log file to know if the program enters into a certain switch-case, and that kind of things. I tried with the BGP_TRACE(D_PACKETS, "hello") function in attrs.c (the file which i am mostly working on), but it crash when I execute "make". It seems like if it is not declared, or something like that. Can you tell me where is the BGP_TRACE declaration, in order to undertand it?
It's defined in proto/bgp/bgp.h.
Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Noli tangere fila metalica, ne in solum incasa quidem.
-- Un saludo, Jorge.
Hello!
If I have understood you well, I have to copy my config file (bird.conf) into the directory where I am running bird. Ok, bird find it. But the birdc socket is created ONCE I have executed bird, so I can`t copy it before calling bird, and continue without finding it, and consecuently without being able to run birdc :(.
You should run birdc in the same directory as you run bird.
Another question: What else does bird need to find in the current directory, apart from the bird.conf file and the bird.ctl socket?
Nothing else comes to my mind. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth "This quote has been selected randomly. Really." -- M. Ulrichs
participants (2)
-
Jorge Gomez -
Martin Mares