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

Add static route #1848

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add static route #1848

wants to merge 1 commit into from

Conversation

tientienle
Copy link

@tientienle tientienle commented Jul 6, 2018

I found that sonic does not have anywhere to save the static route. However I think this is a fundamental function for a router or switch. Every time I reboot or reload the switch, I need to add the static route again,

- What I did

  • Add the static route for the device through quagga. The ad number also has been added

- How I did it

  • Using the template.

- How to verify it

  • Add the static route to the config_db.json file:
    "ROUTE_TABLE": {
    "1.1.1.0/24|192.168.111.2": {
    "ad": "1"
    },
    "1.1.1.0/24|192.168.111.3": {
    "ad": "2"
    },
    "2.3.4.0/24|192.168.111.1": {
    "ad": "1"
    }
    },
  • Check any syntax: sonic-cfggen -j /etc/sonic/config_db.json --print-data
  • Reload the device: config reload -y
  • Check the route table: show ip route

@tientienle
Copy link
Author

tientienle commented Nov 23, 2018

Can anyone please review on the failure?
It would be more convenient to have static routes in our devices.
Thank you

@stcheng
Copy link
Contributor

stcheng commented Nov 24, 2018

retest this please

@batmancn
Copy link

batmancn commented Dec 6, 2018

I'm now working on this, this is my schema:

{
"STATIC_ROUTE": {
"dst_ip:10.0.0.1/24|nexthop:10.0.0.2": {},
"dst_ip:10.0.0.1/24|nexthop:10.0.0.3": {},
"dst_ip:10.0.0.1/24|nexthop:Ethernet30": {
"metric":"20"
}
}
}

  1. I think it's better to use STATIC_ROUTE instead ROUTE_TABLE, as there will be many type of route.
  2. If it's better to add "dst_ip" and "nexthop" to notice for users ?
  3. I think it's better to add code in bgpcfgd for increment config.

lguohan pushed a commit that referenced this pull request Aug 25, 2021
d29a49a [ACL] Match TCP protocol while matching TCP_FLAG (#1854)
2569ad9 Fix sFlow sampling-rate and admin-state (#1728)
8908a8f Change rif_rates.lua and port_rates.lua scripts to calculate rates correct (#1848)
b42c2fb [VS Test] Skip flaky tests (#1875)

Signed-off-by: bingwang <bingwang@microsoft.com>
judyjoseph added a commit that referenced this pull request Aug 26, 2021
88a38f7 Ignore ALREADY_EXIST error in FDB creation (#1815)
b1c23f3 Change rif_rates.lua and port_rates.lua scripts to calculate rates correct (#1848)

Update sonic-utilities submodule with

cbc25d6 [config reload] Call systemctl reset-failed for snmp,telemetry,mgmt-framework services (#1773)
04dcd07 Improve config error handling on version_info (#1760)
e567a60 Load the database global_db. (#1752)
c15fb8f [sfputil] Gracefully handle improper 'specification_compliance' field (#1741)
39350f8 [dhcp_relay] Update CLI reference document and add a new API for ip address type (#1717)
18f13c6 [sonic-package-manager] switch from poetry-semver to semantic_version due to bugs found in poetry-semver (#1710)
b16724a [voq][chassis] VOQ cli show commands implementation (#1689)
9427cd6 [debug dump util] Match Infrastructure (#1666)
d9fb39b [route_check] Filter out VNET routes (#1612)
yxieca added a commit to yxieca/sonic-buildimage that referenced this pull request Oct 2, 2021
* 647f01f 2021-09-30 | [fstrim] limit smartctl execution time to 30 seconds (sonic-net#1850) (HEAD -> 202012, github/202012) [Ying Xie]
* 371970e 2021-09-30 | [202012][show techsupport] address show techsupport return none zero code issue (sonic-net#1847) [Ying Xie]
* 81a8386 2021-09-30 | Disable pfcwd forward action config for cisco-8000. (sonic-net#1848) [Alpesh Patel]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
yxieca added a commit that referenced this pull request Oct 4, 2021
* 647f01f 2021-09-30 | [fstrim] limit smartctl execution time to 30 seconds (#1850) (HEAD -> 202012, github/202012) [Ying Xie]
* 371970e 2021-09-30 | [202012][show techsupport] address show techsupport return none zero code issue (#1847) [Ying Xie]
* 81a8386 2021-09-30 | Disable pfcwd forward action config for cisco-8000. (#1848) [Alpesh Patel]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
…rrect (sonic-net#1848)

Change rif_rates.lua and port_rates.lua scripts to calculate rates properly - rates_table_names table should be updated after each iteration and not only once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants