Консоль можно подключить как через COM-порт, так и через mini-USB, используя драйвера:
juniper_windows_7_10_64bit.zip
juniper_windows_xp_7_32bit.zip
root@host# load factory-default root@host# set system root-authentication plain-text-password New password: Retype new password:
Это может пригодиться в случае если забыли пароль рута.
loader>boot -s
System watchdog timer disabled. Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: recovery
user@host# set system root-authentication plain-text-password commit
request system reboot
Причину alarm можно посмотреть через команду:
show system alarms
Часто висит ошибка:
Major Host 0 fxp0 : Ethernet Link Down
Ошибка о том, что management interface в дауне.
Она лечится через:
set chassis alarm management-ethernet link-down ignore
Обновление Junos Software и откат(Rollback)
set system host-name jun100
set system time-zone GMT-3
set routing-options static route 0.0.0.0/0 next-hop 46.28.95.129
Заведём пользователя с правами администратора.
set system login user user_name full-name user_full_name set system login user user_name class super-user set system login user user_name authentication plain-text-password
После последней команды система запросит пароль.
Поскольку теперь у нас уже есть пользователь админ, лучше отключить root, т.к. возможен подбор пароля из-вне.
set system services ssh root-login deny
set system ntp boot-server 0.ru.pool.ntp.org
set system ntp server 79.111.152.13
set system ntp server 213.141.154.170
set system ntp server 37.139.41.250
set system ntp server 185.22.60.71
Проверка:
show ntp associations
root@jun100> show ntp associations remote refid st t when poll reach delay offset jitter ============================================================================== *ip-79-111-152-1 .GPS. 1 - 57 64 37 31.755 4.949 8.577 +lan.forstwoof.r 89.109.251.21 2 - 58 64 37 3.646 4.033 8.260 +meerix.ru 130.149.17.8 2 - 57 64 37 11.950 5.081 7.965 +nag.aleksdem.co 131.188.3.220 2 - 56 64 37 11.999 7.692 8.521
show ntp status
root@jun100> show ntp status status=0684 leap_none, sync_ntp, 8 events, event_peer/strat_chg, version="ntpd 4.2.0-a Fri May 6 05:45:14 UTC 2011 (1)", processor="octeon", system="JUNOS10.4R4.5", leap=00, stratum=2, precision=-17, rootdelay=31.755, rootdispersion=6.450, peer=19564, refid=79.111.152.13, reftime=de422cd1.fc9c0be4 Thu, Mar 1 2018 10:40:01.986, poll=6, clock=de422ce9.7896c17c Thu, Mar 1 2018 10:40:25.471, state=3, offset=0.000, frequency=0.000, jitter=10.360, stability=0.000
show system uptime
root@jun100> show system uptime Current time: 2018-03-01 10:40:52 GMT-3 System booted: 2018-03-01 09:55:12 GMT-3 (00:45:40 ago) Protocols started: 2018-03-01 09:57:47 GMT-3 (00:43:05 ago) Last configured: 2018-03-01 10:43:15 GMT-3 (00:-2:-23 ago) by root 10:40AM up 46 mins, 1 user, load averages: 0.04, 0.08, 0.11
show log messages | match ntp
root@jun100> show log messages | match ntp Mar 1 10:43:12 jun100 init: ntp (PID 3572) started
snmp {
description JUN100;
location Moscow;
contact Vladimir;
community public {
authorization read-write;
clients {
192.168.2.49/32;
192.168.0.0/16;
}
}
}
Здесь Public = Comunity.
SNMP должно подхватываться через PRTG, SNMP Traffic.
Рассмотрим случай, когда на интерфейсах VLAN у нас будут висеть адреса:
vlan.100 up down inet 10.0.100.1/24
vlan.200 up up inet 10.0.200.1/24
Тогда настройки DHCP для обоих VLAN будут:
[edit system services dhcp] root@jun100# show traceoptions { file dhcp.dbg; flag all; } pool 10.0.100.0/24 { address-range low 10.0.100.50 high 10.0.100.254; domain-name example.net; name-server { 8.8.8.8; } router { 10.0.100.1; } } pool 10.0.200.0/24 { address-range low 10.0.200.50 high 10.0.200.254; domain-name example.net; name-server { 8.8.8.8; } router { 10.0.200.1; } } [edit system services dhcp]
static binding
set system services dhcp static-binding 50:3E:AA:0C:2D:BE fixed-address 10.2.3.199 set system services dhcp static-binding AC:22:0B:CC:9A:3E fixed-address 10.2.3.88 set system services dhcp static-binding 74:86:E2:09:35:B2 fixed-address 10.2.3.200
Проверка
show system services dhcp pool show system services dhcp binding show system services dhcp statistics show system services dhcp conflict
user@host# set system services dhcp traceoptions file dhcp.dbg
user@host# set system services dhcp traceoptions flag all
[edit system syslog] root@jun100# show archive size 100k files 3; user * { any emergency; } file messages { any critical; authorization info; } file interactive-commands { interactive-commands error; } file interface-logs { any any; match ifOperStatus; } file temp_all { any any; } Здесь: - критические сообщения валятся в файл /var/log/messages - interface status в /var/log/interface-logs - временно всё валится в /var/log/temp_all Работа с файлами: - file list /var/log/ detail - show log messages - show log temp_all - monitor start temp_all - monitor stop