Basic configuration of juniper device
From Notes_Wiki
<yambe:breadcrumb>Switch_configuration_notes|Switch configuration</yambe:breadcrumb>
Basic configuration of juniper device
Juniper has very useful beginner tutorials at https://www.juniper.net/dayone in form of "Day One" series. Readers are encouraged to refer to them (esp "Exploring Junos CLI" and "Configuring Junos Basics") so that they are comfortable with material presented in this page.
Basic system configuration
A sample system configuration is:
system { host-name VLEAD-EX2200; domain-name virtual-labs.ac.in; domain-search [ virtual-labs.ac.in iiit.ac.in ]; location { country-code 0091; building Nilgiri; floor 2; } root-authentication { encrypted-password "<encrypted password>"; ## SECRET-DATA } name-server { 10.4.3.222; } login { announcement "Welcome to VLEAD Juniper switch"; message "Unauthorized access is prohibited"; user saurabh { full-name "Saurabh Barjatiya"; uid 501; class super-user; authentication { encrypted-password "<encrypted password>"; ## SECRET-DATA } } } services { ssh { root-login allow; } telnet; web-management { http; } } syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } ntp { boot-server time.iiit.ac.in; server 10.4.8.3; } }
This configuration has following information:
- System host-name, domain-name and search domains
- Switch location
- Root password
- DNS server(s)
- Login announcement and message
- System users with their privilege level and UID
- SSH, telnet and http services are enabled. Root login is enabled over SSH
- Following syslog configuration is achieved
- Message from any facility of level emergency or above will be sent to all logged in users on their terminals
- All messages from any facility of level notice or above will be logged to file named messages. Since syslog files are stored in /var/log, file /var/log/messages would receive all these messages.
- All commands typed interactively (console, SSH) will get stored in file interactive-commands.
- Switch will use ntp-server time.iiit.ac.in at boot to synchronize time and will use ntp server at 10.4.8.3 to regularly synchronize time while running