root@eve-ng:/opt/unetlab/addons/qemu/c9800cl-17.04.01# ls C9800-CL-universalk9.17.04.01.iso virtioa.qcow2 root@eve-ng:/opt/unetlab/addons/qemu/c9800cl-17.04.01# rm C9800-CL-universalk9.17.04.01.iso root@eve-ng:/opt/unetlab/addons/qemu/c9800cl-17.04.01# ls virtioa.qcow2 root@eve-ng:/opt/unetlab/addons/qemu/c9800cl-17.04.01# /opt/unetlab/wrappers/unl_wrapper -a fixpermissions
9. eve-ng를 접속 합니다.
노드를 추가합니다.
저는 인터넷도 연결하기 위해서 아래와 같이 Cloud가 추가 하여서 케이블은 연결 하였습니다
그리고 https://192.168.1.99 접속해서 GUI상에서 장비 시리얼 번호 확인하기
1. 시리얼 입력
2. non-government user 선택
3. Next 버튼을 클릭 합니다.
1. Forticloud Key키를 입력합니다. 장비 맨 윗부분에 보면 Forticloud Key를 확인 할수 있습니다.
2. Fortinet Partnet를 선택합니다.
3. 그리고 next버튼을 클릭합니다.
1. 아래 부분를 체크 합니다.
By accepting thses terms, you are activating this support contract and the entitlement period provided can not be changed, if you wish to continue, click "confirm".
2. 그리고 Confirm를 선택합니다.
그리고 등록한 장비를 FortiClud 에서 Product List에 시리얼 번호를 입력하면 검색이 가능 합니다.
Fortigate장비를 WAN포트에 인터넷을 연결하면 장비가 FortiCloud에 자동으로 등록 되면서 라이센스및 contract이 자동으로 등록 됩니다.
1. 라이센스를 등록하기전에 라이센스가 CSSM - Cisco Account에 등록 되어져 있어야 합니다.
2. CSSM서버에 통신이 가능한지 확인 합니다.
TSIWL-CSW-01#telnet smartreceiver.cisco.com 443 Trying smartreceiver.cisco.com (72.163.15.144, 443)... Open
3. 스위치에 기본 설정을 합니다
TSIWL-CSW-01(config)#license smart transport smart TSIWL-CSW-01(config)#license smart url default TSIWL-CSW-01#wr
4. CSSM 로그인후 New Token 클릭 합니다.
5. Create Token 클릭 합니다.
6. 생성된 키를 복사합니다
7. Key를 Cisco 스위치에 등록 합니다.
TSIWL-CSW-01#license smart trust idtoken <copy the token> all force
8. 라이센스 상태를 확인 합니다
Trust Code에보면 정상적으로 라이센스가 설치 된것을 확인 가능 합니다
TSIWL-CSW-01#show license status
Utility: Status: DISABLED
Smart Licensing Using Policy: Status: ENABLED
Account Information: Smart Account: **** you can see your SA account *** As of Oct 02 11:43:47 2024 UTC Virtual Account: *** the VA account also show ***
Trust Code Installed: Active: PID:C9300L-24T-4G,SN: INSTALLED on Oct 02 11:43:35 2024 UTC Standby: PID:C9300L-24T-4G,SN: INSTALLED on Oct 02 11:43:36 2024 UTC
고객사에 라우터가 인터넷 접속이 불가능 하여 offline 방식으로 라이센스를 설치해보겠습니다.
Step1 장비 버전 확인 -Smart license 지원
BDKDD02#show version Cisco IOS XE Software, Version 16.06.08
Step2 Smart license disable
BDKDD02(config)#no license smart enable
Step3 download PAK file from CSSM
시리얼번호는 보안상으로 *처리 하였습니다.
BDKDD02#license smart reservation request local Enter this request code in the Cisco Smart Software Manager portal: UDI: PID:ISR4221/K9,SN:FJC********** Request code: BC-ZISR4221/K9:FJC*********-AfSn9CzT1-76
Choice: Booting Junos in CLI recovery mode ... Verified /boot/manifest signed by PackageProductionECP256_2021 Verified /boot/loader.rc Verified /boot/support.4th Verified /boot/load-dtb.4th Verified /boot/platform.4th Verified /boot/platform-load-dtb.4th - / yymmss==[[00xx8++00xx88++00]] 33dd33bb-- boooott//oosddaattaa==ddaattaa==00xx44ffff118eexxtt==00xx5577ee337744 -- siiggnneedd bby888 || ioonnEECCPP225566__22002211 netstack/../manifest signed by PackageProductionECP256_2021 Veerriiffiieedd //ppaacckkaaggeess//sseettss//aaccttiivvee//bboooott//ooss--kkeerrnneell//kkeerrnneell Veerriiffiieedd //ppaacckkaaggeess//sseettss//aaccttiivvee//bboooott//ooss--vvmmgguueesstt//iinniitt..44tthh - ified /packages/sets/active/boot/junos-modules/init.4th \- ified /packages/sets/active/boot/junos-net-platform/../manifest signed by PackageProductionECP256_2021 Verified /packages/sets/active/boot/junos-vmguest-platform/../manifest signed by PackageProductionECP256_2021 VVeerriiffiieedd //ppaacckkaaggeess//sseettss//aaccttiivvee//bboooott//ooss--kkeerrnneell//....//mmaanniiffeesstt ssiiggnneedd bbyy PPaacckkaaggeePPrrooddu
부팅이 완료되면, 로그인 없이 바로 root> 모드입니다.
패스워드를 수정합니다. 그리고 재부팅합니다.
이유는 현재 모드는 password recovery 모드입니다.
NOTE: the 'configure' command to make any required changes. For example, NOTE: to reset the root password, type: NOTE: configure NOTE: set system root-authentication plain-text-password NOTE: (enter the new password when asked) NOTE: commit NOTE: exit NOTE: exit NOTE: When you exit the CLI, you will be in a shell. Starting CLI ...
root> configure root# set system root-authentication plain-text-password New password: error: require change of case, digits or punctuation
[edit] root# set system root-authentication plain-text-password New password: Retype new password:
[edit] root# commit commit complete
[edit] root@srx# exit Exiting configuration mode
root@srx> request system reboot Reboot the system ? [yes,no] (no) yes
Jun 23 11:12:02 shutdown 16997 - - reboot requested by root at Sun Jun 23 11:12:02 2024 Shutdown NOW! [pid 16997] Jun 23 11:12:02 shutdown 16997 - - reboot by root: Waiting (max 60 seconds) for system process `vnlru' to stop... done Waiting (max 60 seconds) for system process `syncer' to stop... Syncing disks, vnodes remaining... 0
부팅이 완료될 때까지 기다립니다.
password recovery mode에서 변경했던 패스워드로 로그인을 시도합니다.
그리고 interface ge-0/0/0 ip주소를 확인합니다.
password-recovery는 단순히 비밀번호만 수정합니다. 다른 설정값은 그대로 남아 있습니다.
login: root Password: Last login: Sun Jun 23 10:42:33 on ttyu0
--- JUNOS 21.3R1.9 Kernel 64-bit XEN JNPR-12.1-20210828.6e5b1bf_buil root@srx:~ # ci ci: Command not found. root@srx:~ # cli root@srx> show interfaces terse | match ge-0/0 ge-0/0/0 up up ge-0/0/0.0 up up inet 192.168.1.1/24 ge-0/0/1 up up ge-0/0/2 up up
지금까지 [2024][Juniper SRX #16] password recovery 글을 읽어 주셔서 감사합니다.
[edit] root# delete This will delete the entire configuration Delete everything under this level? [yes,no] (no) yes
[edit] root# set system or ^ syntax error. root# set system root-authentication plain-text-password New password: Retype new password:
[edit] root# commit commit complete
[edit] root#
ge-0/0/0 192.168.1.1/24 설정하기
root# set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24
root# run show interfaces terse | match ge-0/0 ge-0/0/0 up up ge-0/0/1 up up ge-0/0/2 up up
위에 보시면 commit를 누르지 않으면 설정값이 적용되지 않습니다.
현재 어떤 명령어가 commit를 대기 중인지 확인하는 방법
root# show | compare [edit] + interfaces { + ge-0/0/0 { + unit 0 { + family inet { + address 192.168.1.1/24; + } + } + } + }
[edit] root#
만약에 이 상태에서 exit로 밖으로 나가면 위에 설정값은 사라집니다.
root# exit The configuration has been changed but not committed Exit with uncommitted changes? [yes,no] (yes)
no를 선택합니다
commit check은 commit 하기 전에 추가적으로 설정값이 맞는지 확인합니다. 만약에 commit check 없이 바로 commit 했을 때 설정값에 문제가 있다면 error메시지가 출력되면서 commit이 실패합니다.
root# commit check configuration check succeeds
[edit] root#
commit 실행
root# commit commit complete
[edit] root# exit Exiting configuration mode
root> show interfaces terse Interface Admin Link Proto Local Remote ge-0/0/0 up up ge-0/0/0.0 up up inet 192.168.1.1/24 gr-0/0/0 up up ip-0/0/0 up up lsq-0/0/0 up up lt-0/0/0 up up mt-0/0/0 up up sp-0/0/0 up up sp-0/0/0.0 up up inet inet6 sp-0/0/0.16383 up up inet ge-0/0/1 up up ge-0/0/2 up up dsc up up fti0 up up fxp0 up up gre up up ipip up up irb up up lo0 up up lo0.16384 up up inet 127.0.0.1 --> 0/0 lo0.16385 up up inet 10.0.0.1 --> 0/0 10.0.0.16 --> 0/0 128.0.0.1 --> 0/0 128.0.0.4 --> 0/0 128.0.1.16 --> 0/0 lo0.32768 up up lsi up up mtun up up pimd up up pime up up pp0 up up ppd0 up up ppe0 up up st0 up up tap up up vlan up down
root>
재부팅합니다. juniper는 commit 하면 명령어 적용과 저장이 됩니다.
재부팅해서 설정값이 유지되는지 확인해 보겠습니다.
request system reboot
부팅이 완료될 때까지 기다립니다.
root> request system reboot Reboot the system ? [yes,no] (no) yes
*** FINAL System shutdown message from root@ ***
System going down IMMEDIATELY
Stopping cron. .
부팅이 완료되면 Interface ge-0/0/0 ip를 확인해 보면 그대로 설정 값이 남아 있습니다.
login: root Password: Last login: Sun Jun 23 09:53:36 on ttyu0
commit confirmed - hostname firewall 변경하고 commit 수행합니다. 그리고 10분 안에 commit이 다시 한번 없으면 이전 상태로 돌아갑니다.
root@srx# set system host-name firewall
[edit] root@srx# commit ? Possible completions: <[Enter]> Execute this command activate Activate a previously prepared commit and-quit Quit configuration mode if commit succeeds at Time at which to activate configuration changes check Check correctness of syntax; do not apply changes comment Message to write to commit log confirmed Automatically rollback if not confirmed peers-synchronize Synchronize commit on remote peers prepare Prepare for an upcoming commit activation | Pipe through a command [edit] root@srx# commit confirmed commit confirmed will be automatically rolled back in 10 minutes unless confirmed commit complete
# commit confirmed will be rolled back in 10 minutes [edit] root@firewall#
테스트를 위해서 10분을 기다립니다. 10분 안에 commit이 없으면 host-name은 이전 설정값은 srx로 변경됩니다.
10분안에 commit을 하지 않았기 때문에 설정값이 이전으로 rollback 되었음
Broadcast Message from root@srx (no tty) at 10:25 UTC...
Commit was not confirmed; automatic rollback complete.
[edit] root@srx#
이번에는 테스트를 위해서 commit confirmed 1으로 하고 1분 안에 commit를 수행합니다.
1분이 지나도 설정값이 rollback 되지 않습니다.
root@srx# set system host-name firewall
[edit] root@srx# commit confirmed 1 commit confirmed will be automatically rolled back in 1 minutes unless confirmed commit complete
# commit confirmed will be rolled back in 1 minute [edit] root@firewall# commit commit complete
[edit] root@firewall#
commit at를 테스트해 보겠습니다
12:00:00에 commit를 수행합니다.
[edit] root@firewall# set system host-name srxsrx
root@firewall# commit at 12:00:00 configuration check succeeds commit at will be executed at 2024-06-23 12:00:00 UTC The configuration has been changed but not committed Exiting configuration mode
root@firewall>
이번에는 Rollback에 대해서 알아보겠습니다.
설정값 원복(rollback)
설정값을 기존 설정값으로 원복수행(rollback 후 반드시 commit를 수행해야 완료됨)
설정값을 commit 할 때마다 rollback이 생성됩니다.
rollback 0 - 마지막 commit이후 변경한 설정값을 초기화
rollback 1 - 마지막 commit이전 설정값을 원복
rollback 2 - 2번째 전 commit이전 설정값으로 원복
commit 할 때마다 rollback으로 생성되는데 그 시점을 알고 싶을 때 확인 명령어
Possible completions: <revision> Rollback to given configuration revision re0-1719138399-8 2024-06-23 10:26:40 UTC by root via cli re0-1719138393-7 2024-06-23 10:26:36 UTC by root via cli commit confirmed, rollback in 1mins re0-1719138344-6 2024-06-23 10:25:47 UTC by root via other re0-1719137740-5 2024-06-23 10:15:43 UTC by root via cli commit confirmed, rollback in 10mins re0-1719137710-4 2024-06-23 10:15:13 UTC by root via cli re0-1719137288-3 2024-06-23 10:08:11 UTC by root via cli re0-1719136430-2 2024-06-23 09:54:02 UTC by root via cli re0-1719135583-1 2024-06-23 09:41:04 UTC by root via other [edit] root@firewall# rollback revision