sonic-net / SONiC

Landing page for Software for Open Networking in the Cloud (SONiC) - https://sonic-net.github.io/SONiC/
2.22k stars 1.12k forks source link

question: how to enable ospfd daemon(OSPF) in the latest SONiC with FRR 7.0 #442

Open mx-zheng opened 5 years ago

mx-zheng commented 5 years ago

i have run latest SONiC with FRR 7.0 on Edgecore AS-5712-54X, but ospfd is disabled by default

mx-zheng commented 5 years ago

admin@sonic:~$ vtysh

Hello, this is FRRouting (version 7.0.1-sonic). Copyright 1996-2005 Kunihiro Ishiguro, et al.

sonic#

image

mx-zheng commented 5 years ago

image

but no file called /etc/frr/daemons is in the docker container bgp now ... image

ehsnsbn commented 4 years ago

hello! just create the daemons file in the host, inside /etc/sonic/frr. then it will be mounted automatically into the fpm-frr docker: /etc/frr/daemons. however, you need to issue service frr restart inside the corresponding docker. the problem is that, on the next restart, you have to restart frr manually. this is my problem now! and i launched an issue for it.

scottlaird commented 4 years ago

This sort of works for me, but I'm seeing weird routing issues.

A <-> B (Sonic) <-> C.

From B, I can ping interface addresses or loopbacks on A or C, no problem.

From A or C I can ping anything on B, or local interface addresses on the other. But I can't ping loopbacks on the other end, or anything connected through A or C. The correct routes are being installed in the kernel on the switch (ip route show), but it's acting like OSPF-derived routes aren't being propagated to the ASIC's FIB.

I'm using a broadcom switch, but I'm not sure how to inspect the ASIC's routing information via bcmsh. Lots of options, none seem quite right.

scottlaird commented 4 years ago

Ah, I figured this out. Don't run 'service frr reload' in the bgp container to start ospfd. It'll break FRR route propagation into the switch itself. Instead, you'll need to start ospfd directly via '/usr/lib/frr/ospfd -A 127.0.0.1 -M snmp'. The issue with reloading frr is tracked in https://github.com/Azure/sonic-buildimage/issues/3194.

james-smith-za commented 4 years ago

I have run into this issue as well. How to enable ospfd that it persists? I can start it up as @scottlaird as indicated, but it doesn't persist when I reload the switch. I have the /etc/frr/daemons file in place.

mipxman commented 4 years ago

Hi Everyone ,

Thanks for your contribution. when I reload my device, I need to restart frr service(/etc/init.d frr restart) again, in bgp docker container. how I can do it automatically, when container restart ? ( also when I reboot my last frr configuration was lost and SONiC frr initial configuration was load).

Regards.

SUNSAT23 commented 1 year ago

I have run into this issue as well. How to enable ospfd that it persists? I can start it up as @scottlaird as indicated, but it doesn't persist when I reload the switch. I have the /etc/frr/daemons file in place.

I have also encountered this problem now. Have you resolved it now?

james-smith-za commented 1 year ago

I have run into this issue as well. How to enable ospfd that it persists? I can start it up as @scottlaird as indicated, but it doesn't persist when I reload the switch. I have the /etc/frr/daemons file in place.

I have also encountered this problem now. Have you resolved it now?

Sorry, I can't say that I have. In the intervening time I ended up not using SONiC, I have opted for another platform. Good luck though, I hope you find a resolution.

sammy3110 commented 1 year ago

I encountered the same problem and found an easy solution. Mentioning it here just in case.

In the 202012 & 202111 versions, frr_mgmt_framework_config in the DEVICE_METADATA section and set it to "true", otherwise the OSPF cannot work.

"DEVICE_METADATA": { "localhost": { "buffer_model": "traditional", "default_bgp_status": "up", "default_pfcwd_status": "disable", "docker_routing_config_mode": "split", "frr_mgmt_framework_config": "true", "hostname": "SW1", "hwsku": "Accton-AS7326-56X", "mac": "04:f8:f8:6a:f6:91", "platform": "x86_64-accton_as7326_56x-r0", "synchronous_mode": "enable", "type": "LeafRouter" } },

Link to doc: https://support.edge-core.com/hc/en-us/articles/900004369066--Enterprise-SONiC-OSPF-Open-Shortest-Path-First-

Jiawei202010 commented 10 months ago

I encountered the same problem and found an easy solution. Mentioning it here just in case.

In the 202012 & 202111 versions, frr_mgmt_framework_config in the DEVICE_METADATA section and set it to "true", otherwise the OSPF cannot work.

"DEVICE_METADATA": { "localhost": { "buffer_model": "traditional", "default_bgp_status": "up", "default_pfcwd_status": "disable", "docker_routing_config_mode": "split", "frr_mgmt_framework_config": "true", "hostname": "SW1", "hwsku": "Accton-AS7326-56X", "mac": "04:f8:f8:6a:f6:91", "platform": "x86_64-accton_as7326_56x-r0", "synchronous_mode": "enable", "type": "LeafRouter" } },

Link to doc: https://support.edge-core.com/hc/en-us/articles/900004369066--Enterprise-SONiC-OSPF-Open-Shortest-Path-First-

What is the path to solving this problem , and there is no path in this link file

sammy3110 commented 9 months ago

What is the path to solving this problem, there is no path in this link file

The file is at the path: /etc/sonic/config_db.json. After applying changes to the config_db.json you will have to save and reload. sudo config save -y sudo config reload