Enabling and Disabling NTP Per Interface
Problem
You want to control NTP services on a per-interface basis.
Solution
Depending on the level of access control required, you can use the ntp disable command to prevent the router from providing NTP services on a particular interface:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#interfaceRouter(config-if)#Serial0/1ntp disableRouter(config-if)#endRouter#
You can also prevent the router from providing NTP services on an individual interface with access control lists:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#access-list107deny udp any eq 123 any eq 123Router(config)#access-list107permit ip any anyRouter(config)#interfaceRouter(config-if)#Serial0/1ip access-group107inRouter(config-if)#endRouter#
Both examples above effectively disable the router from
providing NTP services through the interface Serial0/1, although the inbound access-list
provides more flexibility.
Discussion
By default, when you enable NTP services on a Cisco router, it automatically becomes an NTP server and provides time services on all interfaces. However, you may want to disable NTP services on one or more of the router’s interfaces. For instance, you may want to prevent your router from providing NTP services to devices outside of your organization. You could accomplish this by disabling NTP on router interfaces that connect to these external ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access