Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in interface lo0 of Node router imunes does not assign IP to loopback lo0 #112

Open
jromero17 opened this issue Aug 8, 2023 · 10 comments

Comments

@jromero17
Copy link

Greetings on FreeBSD 13.0 and FreeBSD 13.2, the router node when doing an ifconfig generates the interfaces lo0 and eth0, the problem is that in the loopback interface is not assigned the ip 127.0.0.1.

This prevents pinging to the IP 127.0.0.1 thus affecting other services that may be running on the router node.

On the pc and host nodes if the IP 127.0.0.1 is assigned to the lo0 loopback interface.

What could be happening?

How to correct this problem or error?

problema_loopback_node_router2

In FreeBSD 12.2 the IP 127.0.0.1 is assigned to the lo0 loopback interface.

So the problem occurs in FreeBSD 13.0 and FreeBSD 13.2 where the tests have been done.

@denisSal
Copy link
Member

Hi!

I updated my fresh FreeBSD 13.1 to 13.2 and this does not happen - all my router interfaces have IP addresses, including the lo0. I'm not sure what might be your problem, but can you paste your /out.log and /boot.conf (or /custom.conf if you're using Custom config) from your router1 node?

Denis

@jromero17
Copy link
Author

Thank you for answering my friend Denis.

I am sending you the information you requested from out.log and boot.conf that are generated for router1.

If I ping 127.0.0.1 on router1 it does not work.

I will do a clean install from the repository and try again.

Thanks for replying.

I am doing some upgrades to support dark themes and support for .svg images and icons for IMUNES.

I also added support for changing different languages (russian, german, french, portuguese, croatian, hungarian, italian and spanish) via language button in the top menu.

problema_loopback_node_router1-1

@denisSal
Copy link
Member

It seems to me that FRR doesn't allow setting the 127.0.0.1 addresses inside the configuration. There is an option to disable this allow-reserved-ranges, but it won't work until frr9 (per FRRouting/frr#13060).

I haven't noticed at first, but my installation of IMUNES uses Quagga instead of FRR. Quagga was undeprecated since the end of last year and now can be installed in FreeBSD 13.2 so that's why it's working for me.

Here's a couple of possible solutions for you:

  1. reinstall IMUNES vroot with quagga instead of FRR,
  2. patch the IMUNES TCL code to set loopback interfaces on routers in a different way (without quaggaboot.sh),
  3. add ifconfig lo0 127.0.0.1 at the end of your /var/imunes/vroot/usr/local/bin/quaggaboot.sh file - dirty hack,
  4. do ifconfig lo0 127.0.0.1 for every router on experiment start using an outside script - not really a solution,
  5. compile your own new version of frr, install it in IMUNES VROOT and enable the above feature,
  6. wait for the official frr9, install it in IMUNES VROOT and enable the above feature.

I'm not yet sure when we'll upgrade to FRR, but when we do, I'm going to need to figure all this out. For now solution 1. seems like the safest one, while Quagga is still alive.

If you want to contribute your translations and GUI updates, please create a new pull request so I can review and merge the changes.

Cheers,
Denis

@jromero17
Copy link
Author

Ok, I will get to it and once I have the modifications and updates I will send you the pull requests.

One thing, I change the icons .gif by .svg

I hope there is no problem with that change.

The solution you sent worked.

Use at the end of the file /var/imunes/vroot/usr/local/bin/quaggaboot.sh

the command

/sbin/ifconfig lo0 127.0.0.1

It also works with

ifconfig lo0 127.0.0.1

Greetings,
José Manuel

@jromero17
Copy link
Author

jromero17 commented Aug 11, 2023

To clarify a bit about allow-reserved-ranges, it is disabled by default in frr9.1, which is the version I have installed on FreeBSD 13.2 for IMUNES.

allow-reserved-ranges
Allow using IPv4 reserved (Class E) IP ranges for daemons. E.g.: setting IPv4 addresses for interfaces or allowing reserved ranges in BGP next-hops.

If you need multiple FRR instances (or FRR + any other daemon) running in a single router and peering via 127.0.0.0/8, it’s also possible to use this knob if turned on.

Default: off.

Greetings,
José Manuel

@denisSal
Copy link
Member

denisSal commented Aug 11, 2023

Ok, I will get to it and once I have the modifications and updates I will send you the pull requests.

One thing, I change the icons .gif by .svg

I hope there is no problem with that change.

Great, no problem.

ifconfig lo0 127.0.0.1

Actually, ifconfig (or /sbin/ifconfig) lo0 127.0.0.1/8 is the proper command.

But if you have frr9, can you try putting allow-reserved-ranges after conf term inside quaggaboot.sh and reporting if it works like that?

Denis

@jromero17
Copy link
Author

jromero17 commented Aug 12, 2023

Good evening friend Denis, I was a little late because the compilation of the frr was failing me for lack of a library.

I compiled with --enable-allow-reserved-ranges as shown in the image. This fixes the error and placing the allow-reserved-ranges parameter as Denis indicated in the quaggaboot.sh file.

Then, the error was generated by frr without having "allow-reserved-ranges" enabled.

In the image you can see how the /usr/local/bin/quaggaboot.sh file looks like.

You can also see in the image how I compiled frr from github.
Downloading as follows.

#git clone https://github.com/frrouting/frr.git frr

Also shown is the version of frr which is frr9.1

Brother Denis, I am from Venezuela.

I'm going to be a little late with the imunes update we talked about, because right now I'm building a network management training platform based on snmp+quagga+frr+IMUNES+FreeBSD13.2, using Nagios and Zabbix.

After I finish setting up the machine in virtualbox, the .ova file, then I will update to make you the pull request.

problema_loopback_node_router4-1

En Español:

Buenas noche amigo Denis, me tarde un poco porque la compilación del frr me estaba fallando por falta de una librería.

Yo compilé con --enable-allow-reserved-ranges como se muestra en la imagen. Con esto se corrige el error y colocando el parámetro allow-reserved-ranges como Denis indicó en el archivo quaggaboot.sh

Entonces, el error lo generaba frr sin tener habilitada "allow-reserved-ranges"

En la imagen se observa como quedó el archivo /usr/local/bin/quaggaboot.sh

También se observa en la imagen como compilé frr desde github.
Descargando de la siguiente manera.

#git clone https://github.com/frrouting/frr.git frr

También se muestra la versión de frr la cual es frr9.1

Hermano Denis, soy de Venezuela.

Voy a tardarme un poco con la actualización de imunes que hablamos, porque ahorita estoy construyendo una plataforma de entrenamiento de gestión en redes basada en snmp+quagga+frr+IMUNES+FreeBSD13.2, usando Nagios y Zabbix.

Después que termine de armar la maquina en virtualbox, el archivo .ova, entonces me pondré a actualizar para hacerte la pull request

@jromero17
Copy link
Author

Denis friend after those tests, I was working with snmp with frr and net-snmp + agentx.

The detail is that when I enter the router in vtysh mode there are many problems.

The router mode is blocked.

Before entering quagga mode, which in this case is frr, I have to

  1. kill any zebra process.
    killall -9 zebra
  2. raise zebra
    zebra -d
  3. Raise the routing protocol:
    ospfd -d
  4. Enter router mode with vtysh
    vtysh
  5. Here I can execute command.

But after

configure terminal
agentx says that the command is unknown for ZEBRA.

Please could you tell me the version of quagga you are using on your FreeBSD 13.2.

I have a lot of problems with frr and I am thinking to use quagga if it has no problems in its compilation with snmp and the routing protocols ospf and bgp.

En ESPAÑOL

Amigo Denis despues de esas pruebas, estuve trabajando con snmp con frr y net-snmp + agentx.

EL detalle es que cuando entro al router en modo vtysh existen muchos problemas

El modo router se queda bloqueado.

Tengo que antes de entrar en modo quagga que para este caso es frr, debo

  1. tumbar cualquier proceso zebra.
    killall -9 zebra
  2. levantar zebra
    zebra -d
  3. Levantar el protocolo de enrutamiento:
    ospfd -d
  4. Entrar en modo router con vtysh
    vtysh
  5. Aqui puedo ejecutar comando.

Pero después de

configure terminal
agentx dice que el comando es desconocido para ZEBRA.

Por favor podria indicarme la version de quagga que usas en tu FreeBSD 13.2

Tengo muchos problemas con frr y estoy pensando usar quagga si no tiene problemas en su compilación con snmp y los protocolos de enrutamiendo ospf y bgp.

@denisSal
Copy link
Member

I'm sorry, I haven't used net-snmp + agentx so I'm not sure what exactly your problem is and how to solve it.

Anyways, I have quagga 1.2.4_11 installed on my machine (installed with pkg install quagga).

Denis

@jromero17
Copy link
Author

jromero17 commented Aug 15, 2023

Greetings Denis. As I am a university professor I use imunes to teach IP networks, servers in networks and network management, for this I use the snmp protocol to monitor imunes virtual hosts (pc, host, router) and the services that may be running on them.

I also monitor external computers.

In freeBSD I install Nagios or Zabbix which are NMS (Network Management System) to monitor the status of the internal hosts in IMUNES and external computers like windows, linux and cisco (routers, switch), tplink or ubiquiti, as long as they work with snmp protocol.

To be able to monitor the virtual machines (nodes) of imunes, it is necessary that quagga has snmp support, and through the agentx of quagga I can communicate with the agent snmp of the net-snmp library that are also installed in IMUNES and FreeBSD.

I already installed a new system with FreeBSD 13.2 and quagga 1.2.4_11 but compiled to support SNMP.

There I sent you an image of how it works and how I can execute snmp commands to monitor router1 from pc1.

By the way a detail.

It would be good to apply a pkg update before running the installation of the freebsd packages in /var/imunes/vroot.

This is to have updated packages and libraries for the version of FreeBSD you are using.

I don't know where to put (pkg update) so that what is installed in imunes is up to date.

The py37-scapy library does not exist in FreeBSD 13.2, but py39-scapy does.

I no longer have problems because I went back to quagga.

I had read that quagga version 1.2.4_8 at that time had stopped working in FreeBSD 13, so I migrated to frr7 and although things worked for me, the little knowledge I have of frr made me make very little progress.

but I have no more problems, I went back to quagga, version 1.2.4_11

practica1_snmp_comados

En español

Saludo Denis. Yo como soy profesor universitario utilizo imunes para enseñar redes IP, servidores en redes y gestión en redes, para ello utilizo el protocolo snmp para monitoriar los host (pc, host, router ) virtuales de imunes y los servicios que puedan estar ejecutándose en ellos.

También monitoriar equipos externos.

En freeBSD instalo Nagios o Zabbix que son NMS (Sistema de gestión de red) para monitoriar el estado de los host internos en IMUNES y equipos externos como computadores con windows, linux y equipos marca cisco (routers, switch), tplink o ubiquiti, simpre y cuando trabajen con el protocolo snmp.

Para poder monitorizar los equipos virtuales (nodos) de imunes, se necesita que quagga tenga soporte snmp, y mediante el agentx de quagga puedo comunicarme con el agent snmp de la libreria net-snmp que tambien estan instalada en IMUNES y en FreeBSD.

Ya instale un nuevo sistema con FreeBSD 13.2 y quagga 1.2.4_11 pero compilado para dar soporte a SNMP.

Alli te envió una imagen de como esta funcionado y como puedo ejecutar comandos snmp para monitorizar el router1 desde pc1.

Por cierto un detalle.

Seria bueno aplicar un pkg update antes de ejecutar las instalación de los paquetes de freebsd en /var/imunes/vroot

Esto para contar con paquetes y librerías actualizadas para la versión de FreeBSD que se este utilizando.

No se en que parte podría poner (pkg update) para que lo que se instale en imunes este actualizado.

La libreria py37-scapy no existe en FreeBSD 13.2, pero si aparece py39-scapy

Ya no tengo problemas porque volví a quagga.

Había leído que quagga la versión de ese momento 1.2.4_8 había dejado de funcionar en FreeBSD 13, por ello migre a frr7 y aunque me funcionaron cosas, el poco conocimiento que tengo de frr me hizo avanzar muy poco.

pero ya no tengo problemas, volví a quagga, versión 1.2.4_11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants