28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Solution<br />

Set up NTP authentication:<br />

[edit system ntp]<br />

aviva@router1# set authentication-key 12 type md5 value $1991poppI<br />

aviva@router1# set server 172.10.23.196 key 12<br />

aviva@router1# set trusted-key 12<br />

aviva@router1# show<br />

authentication-key 12 type md5 value "$9$G4UjHqmfT365TIEhcMW4aZGHmP5Fn/A"; ## SECRET-<br />

DATA<br />

server 172.10.23.196 key 12; ## SECRET-DATA<br />

trusted-key 12;<br />

<strong>Discussion</strong><br />

By default, your router queries time to whichever NTP servers appear to be most<br />

accurate. To ensure that routers receive time only from known and trusted sources,<br />

enable NTP authentication. The JUNOS implementation of NTP uses MD5 for<br />

authentication. You set up one or more trusted keys. Each key is identified by a number,<br />

here 12, and you establish a password for each key in the value option of the<br />

authentication-key statement. We are using a password of $1991poppI. When you<br />

configure the NTP server’s address, you also set which NTP key the local router will<br />

send in all NTP updates. Finally, you configure in the trusted-key statement which<br />

NTP keys the router accepts so that when it receives NTP updates, it can authenticate<br />

and accept them. You have to configure the same trusted keys and passwords on<br />

all the NTP server and peer routers on your network. Based on the example here,<br />

you need to configure the router 172.10.23.196 to accept trusted key 12 and you<br />

need to configure the same MD5 password ($1991poppI) so that it can exchange NTP<br />

updates with your local router.<br />

After you type the plain-text version MD5 password, when you display the configuration,<br />

you see the encrypted version of the password. You can use the encrypted<br />

version (the string that starts with $9$G) when you configure the same password on<br />

other routers, or you can also use the plain-text password. In the configuration, the<br />

JUNOS software marks all encrypted information with the string ## SECRET-DATA.<br />

You can use this additional text as a way to hide these portions of the configuration<br />

when you have to share the configuration file with an insecure source or when you<br />

want to locate and remove this information before archiving the configuration in a<br />

location that might not be secure.<br />

aviva@router1> show configuration system ntp | except SECRET-DATA<br />

server 172.10.23.196;<br />

trusted-key 123456;<br />

Notice that while the authentication-key statement is not shown at all, the server<br />

statement is shown, but you see only the server’s address. The password information<br />

is removed.<br />

188 | Chapter 6: NTP<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!