> For the complete documentation index, see [llms.txt](https://jncia-workbook.gitbook.io/workbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jncia-workbook.gitbook.io/workbook/junos-basics/18-basic-system-settings.md).

# 18) Basic System Settings

### Pre-Work

If you made any changes, you can quickly revert the lab using the **load\_config\_on\_nodes.py** script.

```
python3 load_config_on_nodes.py --lab_dir three-routers --config_filename basic.addressing.cfg
```

### Lab

Connect to R1, and configure the following settings:

* NTP server as `10.0.0.10`
* DNS server as `10.0.0.20`
* SNMPv2 settings:
  * Community string as `mycommstring`
  * Only allow NMS at `10.0.0.30` to poll
  * Only allow read-only access
  * Restrict polling to the loopback address
  * Location as `DC1`
* Syslog server as `10.0.0.40`
  * Send all logs of level `notice` and below (more severe)
* Send logs to all users' terminal sessions of level `critical` and below (more severe)

### Answer

<details>

<summary>Expand to reveal</summary>

```
set system ntp server 10.0.0.10

set system name-server 10.0.0.20

set snmp community mycommstring authorization read-only
set snmp community mycommstring clients 10.0.0.30/32
set snmp interface lo0.0
set snmp location "DC1"

set system syslog host 10.0.0.40 any notice
set system syslog user * any critical
```

</details>

### Explanation

<details>

<summary>Expand to reveal</summary>

This lab tests your understanding of the CLI, and how to configure these various settings. If you need any assistance with these commands, check out the links below in the *Further Reading* section.

\
NTP and DNS is quite straight-forward.

\
SNMP allows you to apply a simple ACL directly to the community string using `clients <prefix>`. This restricts polling to only NMS source addresses within this prefix. We also restrict polling to the lo0.0 address of the device with the `snmp interface` command.

\
Syslog configuration uses the syntax `set system syslog <destination> <facility> <level>`.

* **Facility** identifies the subsystem that generated the message. For example, you can limit this to `interactive-commands` (to send logs containing commands executed by users), `authorization` (to send logs generated by the AAA process), `pfe` (to send logs generated by the packet forwarding engine), etc.
  * In this lab, we simply use `any` for all facilities.
* **Levels** are the well-known syslog levels. For example, `emergency`, `alert`, `critical`, etc. The level you configure allows syslogs from that level and more severe. One thing to notice is that there is no `debugging` level, instead you would just use `any`.

</details>

### Further Reading

#### NTP

<https://www.juniper.net/documentation/us/en/software/junos/time-mgmt/topics/example/example-configure-ntp.html>

<https://community.juniper.net/discussion/ntp-difference-between-ntp-boot-server-and-ntp-server>

<https://community.juniper.net/discussion/ntp-boot-server-on-mx>

#### SNMP

<https://www.juniper.net/documentation/us/en/software/junos/network-mgmt/topics/topic-map/configure-snmp-in-junos-os.html>

<https://supportportal.juniper.net/s/article/configuration-guide-for-SNMP-v2>

<https://support.auvik.com/hc/en-us/articles/210571986-How-to-enable-SNMP-on-Juniper-SRX-firewalls>

<https://www.youtube.com/watch?v=Vz63p2IFNWI>

#### Syslog

<https://www.juniper.net/documentation/us/en/software/junos/network-mgmt/topics/topic-map/directing-system-log-messages-to-a-remote-destination.html>

<https://support.auvik.com/hc/en-us/articles/360054607571-How-to-configure-Syslog-on-Juniper-EX-Series-Switches>

<https://saidvandeklundert.net/2015-09-04-junos-and-all-things-syslog/>
