7-41
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 7 Adminis tering the Switch Managi ng the System Ti me and Dat e

Creating an Access Group and Assigning a Basic I P A ccess List

Beginning in privileged EXEC mode, follow these steps to control access to NTP services by using
access lists:
The ac c ess gr oup keywords a re sc an ned i n this ord er, from le ast rest ric tive to most r estr ict ive:
1. peerAllows time requests and NTP control quer ies and al lows the switch to synchronize itself to
a device whose address passes the access list criteria.
2. serveAllo ws t ime req uests and N TP contro l queries, b ut does not allo w the swi tch to syn chronize
itself to a device whose address passes the access list criteria.
3. serve-onlyAllows only time requests from a device whose address pa sses th e access list criteria.
4. query-onlyAllows only NTP control queries from a device whose address passes the access list
criteria.
Command Purpose
Step 1 configure terminal Enter globa l configurati on mode.
Step 2 ntp access-group {query-only |
serve-only | serve | peer}
access-list-number
Create an access group , and apply a basic IP access list.
The keywords have these mean ings:
query-onlyAllows only NTP contro l queri es.
serve-onlyAllows only ti me r equest s.
serveAllows time requests and NTP control queries, but does not
allow the switch to synchronize to the remote device.
peerAllows time requests and NTP control queries and allows the
switch to synchron ize to the remote device.
For access-list-number, enter a standa rd IP access list num ber from 1
to 99.
Step 3 access-list access-list- number permit
source [source-wildcard] Create th e access list.
For access-list-number, enter the number specified in Step 2.
Enter the permit keyword to permit access if the conditions are
matched.
For source, enter t he IP ad dress of th e de vi ce that is permitte d access
to the switch.
(Optional) For source-wildcard, en te r the wi ldc ard bi ts to b e ap pli ed
to the source.
Note When creating an access list, remember that, by default, the end
of the access list contains an imp licit deny statement for
everything if it did not find a match before reaching the end.
Step 4 end Return to p rivileged EXEC mode.
Step 5 show running-config Verify your e ntri es.
Step 6 copy running-config startup-config (Optiona l) Save your entries in the co nfigurati on file.