Skip to content

Fixed NTP sync while using DHCP.#1035

Merged
stcheng merged 1 commit intosonic-net:masterfrom
nazarii-gnydyn:master-ntp-sync-fix
Oct 14, 2017
Merged

Fixed NTP sync while using DHCP.#1035
stcheng merged 1 commit intosonic-net:masterfrom
nazarii-gnydyn:master-ntp-sync-fix

Conversation

@nazarii-gnydyn
Copy link
Copy Markdown

- What I did

Fixed NTP sync by adding interface to listen when using DHCP.

- How I did it

interface listen eth0

- How to verify it

admin@sonic:~$ show ntp
Command: ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 107.191.112.226 .INIT.          16 -    -  512    0    0.000    0.000   0.000
 192.146.137.13  .INIT.          16 -    -  512    0    0.000    0.000   0.000
 ntp-ext.cosng.n .INIT.          16 -    -  512    0    0.000    0.000   0.000
 ntp3.ds.network .INIT.          16 -    -  512    0    0.000    0.000   0.000
admin@sonic:~$ show ntp
Command: ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
-mail.fangfufu.c 193.190.230.66   2 u   35   64    1  144.849   -3.925   3.381
*tirpitz.netzkon 213.172.96.14    2 u   96   64    1  170.649   -8.120   0.798
+services.quadra 45.79.111.114    3 u   57   64    7   15.488   -8.208   4.318
+panel1.web2.clu 85.214.59.199    3 u   58   64    3  156.818   -8.732   1.505


#only listen on localhost and eth0 ips (default is to listen on all ip addresses)
interface ignore wildcard
{% if MGMT_INTERFACE %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when will MGMT_INTERFACE be not defined? how to assume that eth0 is the one to use.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the first question, if the mgmt interface is not in the minigraph, then it will not be defined. I think we do have such cases for the default minigraph. It does not have management ip configured so dhcp is enabled.

for the second qeustion, it is a good question. but we are implicit assuming eth0 in several other places like the interface.j2. I think that is one of basic assumption here. This assumption can be relaxed later, but it is probably not related to this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stcheng the changes made here is the similar how interfaces are interpreter int system https://github.com/Azure/sonic-buildimage/blob/master/files/image_config/interfaces/interfaces.j2#L23
MGMT_INTERFACE will not be defined when user will not add corresponding section in minigraph or configDB.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the explanations!

@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Oct 13, 2017

@taoyl-ms , any concern?

@stcheng stcheng merged commit 118c2dd into sonic-net:master Oct 14, 2017
prsunny pushed a commit that referenced this pull request Apr 21, 2022
[sairedis submodule] commits:
c7cbfe8 Update SAI submodule to support python 3.7 (#1035)
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Jun 20, 2022
Related work items: #49, #58, #107, sonic-net#247, sonic-net#249, sonic-net#277, sonic-net#593, sonic-net#597, sonic-net#1035, sonic-net#2130, sonic-net#2150, sonic-net#2165, sonic-net#2169, sonic-net#2178, sonic-net#2179, sonic-net#2187, sonic-net#2188, sonic-net#2191, sonic-net#2195, sonic-net#2197, sonic-net#2198, sonic-net#2200, sonic-net#2202, sonic-net#2206, sonic-net#2209, sonic-net#2211, sonic-net#2216, sonic-net#7909, sonic-net#8927, sonic-net#9681, sonic-net#9733, sonic-net#9746, sonic-net#9850, sonic-net#9967, sonic-net#10104, sonic-net#10152, sonic-net#10168, sonic-net#10228, sonic-net#10266, sonic-net#10288, sonic-net#10294, sonic-net#10313, sonic-net#10394, sonic-net#10403, sonic-net#10404, sonic-net#10421, sonic-net#10431, sonic-net#10437, sonic-net#10445, sonic-net#10457, sonic-net#10458, sonic-net#10465, sonic-net#10467, sonic-net#10469, sonic-net#10470, sonic-net#10474, sonic-net#10477, sonic-net#10478, sonic-net#10482, sonic-net#10485, sonic-net#10488, sonic-net#10489, sonic-net#10492, sonic-net#10494, sonic-net#10498, sonic-net#10501, sonic-net#10509, sonic-net#10512, sonic-net#10514, sonic-net#10516, sonic-net#10517, sonic-net#10523, sonic-net#10525, sonic-net#10531, sonic-net#10532, sonic-net#10538, sonic-net#10555, sonic-net#10557, sonic-net#10559, sonic-net#10561, sonic-net#10565, sonic-net#10572, sonic-net#10574, sonic-net#10576, sonic-net#10578, sonic-net#10581, sonic-net#10585, sonic-net#10587, sonic-net#10599, sonic-net#10607, sonic-net#10611, sonic-net#10616, sonic-net#10618, sonic-net#10619, sonic-net#10623, sonic-net#10624, sonic-net#10633, sonic-net#10646, sonic-net#10655, sonic-net#10660, sonic-net#10664, sonic-net#10680, sonic-net#10683
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this pull request Jul 22, 2022
DavidZagury pushed a commit to DavidZagury/sonic-buildimage that referenced this pull request Apr 28, 2025
<!--
Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

** Make sure all your commits include a signature generated with `git
commit -s` **

If this is a bug fix, make sure your description includes "fixes #xxxx",
or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it

Update 
```
SDK -> 4.7.3534
FW -> 2014.3532
```

#### How I did it

#### How to verify it

Ran regression and verified on 202412

<!--
If PR needs to be backported, then the PR must be tested against the
base branch and the earliest backport release branch and provide tested
image version on these two branches. For example, if the PR is requested
for master, 202211 and 202012, then the requester needs to provide test
results on master and 202012.
-->

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211

#### Tested branch (Please provide the tested image version)

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->

<!--
Ensure to add label/tag for the feature raised. example - PR#2174 under
sonic-utilities repo. where, Generic Config and Update feature has been
labelled as GCU.
-->

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

#### A picture of a cute animal (not mandatory but encouraged)
mssonicbld added a commit that referenced this pull request Jul 15, 2025
…omatically (#23331)

#### Why I did it
src/sonic-swss-common
```
* bcfbb21 - (HEAD -> 202505, origin/202505) [schema]: Add CoPP trap capability table to state_db (#1035) (23 hours ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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

Successfully merging this pull request may close these issues.

5 participants