Skip to Content.

rare-dev - Re: [rare-dev] Swap Different Configuration in FreeRtr

Subject: Rare project developers

List archive


Re: [rare-dev] Swap Different Configuration in FreeRtr


Chronological Thread 
  • From: Frédéric LOUI <>
  • To:
  • Subject: Re: [rare-dev] Swap Different Configuration in FreeRtr
  • Date: Wed, 1 Dec 2021 12:19:54 +0100
  • Dkim-filter: OpenDKIM Filter v2.10.3 zmtaauth02.partage.renater.fr 9CDACA0BE0

Hi Carmen,

> @Frederic I don't have this path on the router
> "/opt/freertr/bin/hwdet-main.s"

I’m so sorry :)
I totally forgot you were using Nix image.

> By the way, I'm storing the configuration in different .txt files and then
> I just copy one of the configuration into /etc/freertr/rtr-sw.txt and then
> 'reload warm' or if it's needed reboot the switch this works to me!

Cool, but I suggest also to test mc36’s suggestion as they are pure freeRtr
command and does not require Linux access …
It is better in the long run as Linux layer should be totally hidden from the
user point of you.

(But if course we are in rare-dev mailing list so your solution applies
perfectly here ! )


> Le 1 déc. 2021 à 12:10, Carmen Misa Moreira <> a
> écrit :
>
> Hi all,
>
> @Frederic I don't have this path on the router
> "/opt/freertr/bin/hwdet-main.s"
>
> By the way, I'm storing the configuration in different .txt files and then
> I just copy one of the configuration into /etc/freertr/rtr-sw.txt and then
> 'reload warm' or if it's needed reboot the switch this works to me!
>
> Best regards,
>
> Carmen Misa
>
>
> On 26.11.21 16:57, mc36 wrote:
>> hi,
>> so we have "config reload <url>" to load from a config store or "config
>> startup" to edit locally...
>> then reload warm and it moved to the new configuration... we also have
>> "config overwrite-network <url>"
>> that operates on the running configuration but imto that one have high
>> chances to run into bugs... :)
>> anyway, as you can note, you should take a look at "config ?" maybe others
>> better fit your needs...
>> regards,
>> cs
>>
>>
>> On 11/26/21 15:57, Frédéric LOUI wrote:
>>> Hi !
>>>
>>> In p4 switch, software configuration is saved in /etc/freertr/rtr-sw.txt
>>>
>>> Then you can save multiple files:
>>> /etc/freertr/rtr-test1-sw.txt
>>> /etc/freertr/rtr-test2-sw.txt
>>> /etc/freertr/rtr-test3-sw.txt
>>> /etc/freertr/rtr-test4-sw.txt
>>> /etc/freertr/rtr-test5-sw.txt
>>>
>>> And make sure you start freertr with the right
>>> /etc/freertr/rtr-test<x>-sw.txt files
>>>
>>> In /opt/freertr/bin/hwdet-main.sh
>>>
>>> ...
>>> while (true); do
>>> cd /opt/freertr/lib
>>>
>>> stty raw < /dev/tty
>>> java -Xmx2048m -jar rtr.jar router $FREERTR_CONFIG/rtr-test<x>
>>> if [ $? -eq 4 ] ; then
>>> sync
>>> reboot -f
>>> fi
>>> stty cooked < /dev/tty
>>> sleep 1
>>> done
>>> …
>>>
>>> Note that in that case you also need to have rtr-test<x>-hw.txt
>>>
>>> But maybe mc36 have more elegant solutions in his sleeves.
>>>
>>>
>>> Hope this helps !
>>> Frederic
>>>
>>>> Le 26 nov. 2021 Ã 15:46, Carmen Misa Moreira
>>>> <> a écrit :
>>>>
>>>> Hi all,
>>>>
>>>> I was wondering if is possible to have several control plane
>>>> configurations and swap between them depending on the test that you want
>>>> to execute, for example, one configuration with 3 VLANs and 1 VRF and
>>>> the other without VLANs but with 2 VRF and then test different
>>>> behaviours in the network just by loading one of this configurations.
>>>> Two different control plane configurations with different purposes.
>>>>
>>>> Thanks for your time,
>>>>
>>>> Best regards,
>>>>
>>>> Carmen Misa
>>>>
>>>




Archive powered by MHonArc 2.6.19.

Top of Page