1. 디렉토리 생성

mkdir /opt/unetlab/addons/qemu/viosl2-adventerprisek9-m.03.2017

 

2. FTP로 생성한 폴더에 image 복사

 

3. 확장자가 이미 qcow2로 되어있으므로 컨버팅은 생략하고 파일명만 변경.
cd /opt/unetlab/addons/qemu/viosl2-adventerprisek9-m.03.2017

mv vios_l2-adventerprisek9-m.03.2017.qcow2 virtioa.qcow2
 
3. 권한 수정
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions

 

 

https://www.eve-ng.net/index.php/documentation/howtos/howto-add-cisco-vios-from-virl/

 

Cisco vIOS from VIRL -

Versions this guide is based on: EVE Image Foldername Downloaded Original Filename Version vCPUs vRAM 1. vios-adventerprisek9-m.spa.159-3 vios-adventerprisek9-m.spa.159-3.m6.qcow2 15.9.6M6 1 1024 2. viosl2-adventerprisek9-m.SSA.high_iron_20200929 vios_l2-a

www.eve-ng.net

 

1. /opt/unetlab/addons/qemu에 디렉토리 생성
mkdir /opt/unetlab/addons/qemu/vios-adventerprisek9-m.SPA.156-1.T

2. FTP로 생성한 디렉토리에 이미지 업로드


3. 디렉토리 이동
cd /opt/unetlab/addons/qemu/vios-adventerprisek9-m.SPA.156-1.T

4. 파일명 변경(.vmdk)
mv vios-adventerprisek9-m.vmdk.SPA.156-1.T vios-adventerprisek9-m.vmdk.SPA.156-1.T.vmdk

5. 파일 형식 변경(vmdk --> qcow2)
5-1
/opt/qemu/bin/qemu-img convert -f vmdk -O qcow2 vios-adventerprisek9-m.vmdk.SPA.156-1.T.vmdk virtioa.qcow2
5-2(5-1번 안될 시)
/opt/qemu/bin/qemu-img convert -O qcow2 vios-adventerprisek9-m.vmdk.SPA.156-1.T.vmdk virtioa.qcow2

6. 원본 파일 삭제
rm vios-adventerprisek9-m.vmdk.SPA.156-1.T.vmdk

7. 권한 수정
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions

 

 

0. image: nxosv-final.7.0.3.I7.4.qcow2

 

1. 폴더 생성

mkdir /opt/unetlab/addons/qemu/nxosv9k-7.0.3.I7.4

 

2. FTP로 생성한 폴더에 image 복사

 

3. image 파일명 변경

cd /opt/unetlab/addons/qemu/nxosv9k-7.0.3.I7.4/

mv nxosv-final.7.0.3.I7.4.qcow2 sataa.qcow2

 

4. 권한 수정
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions

 

 

 

 

 

 

-------------------------------------------------------------------------------

nexus9300v.10.1.2.qcow2

mkdir /opt/unetlab/addons/qemu/nxosv9k-9300v-10.1.2

cd /opt/unetlab/addons/qemu/nxosv9k-9300v-10.1.2/
mv nexus9300v.10.1.2.qcow2 sataa.qcow2

/opt/unetlab/wrappers/unl_wrapper -a fixpermissions

 

-------------------------------------------------------------------------------

nexus9300v64.10.2.5.M.qcow2

mkdir /opt/unetlab/addons/qemu/nxosv9k-9300v64-10.2.5.M
cd /opt/unetlab/addons/qemu/nxosv9k-9300v64-10.2.5.M/
mv nexus9300v64.10.2.5.M.qcow2 sataa.qcow2

/opt/unetlab/wrappers/unl_wrapper -a fixpermissions

1. rebooting

ctrl + c

ctrl + c

ctrl + c  ----------  loader mode 진입

2. loader > dir


bootflash::  
  nxos.7.0.3.I7.3.bin

 

3. loader > cmdline recoverymode=1

4. loader > boot nxos.7.0.3.I7.3.bin

Booting nxos.7.0.3.I7.3.bin 
Trying diskboot 
 Filesystem type is ext2fs, partition type 0x83
Image valid

Image Signature verification was Successful.

 

5. switch(boot)# config terminal

6. switch(boot)(config)# admin-password [xxxx]

                                      # exit

7. switch(boot)# load-nxos

 

###################################################################
                     !!!!! WARNING !!!!!
    Only authorized personnel can access this system.
The unauthorized access will be subjected to a legal penalty.
                     !!!!! WARNING !!!!!
###################################################################

login: admin
Password: 

 

                                     


● NXOS
ssh enable (default) 상태로 ssh 관련 별도 설정 없음.

다른 SW ---> NXOS SW SSH 연결이 안될 때
(Nexus 9000에 SSH를 연결할 수 없습니다. "일치하는 암호를 찾을 수 없음" 오류 수신)
 : 약한 암호(~cbc)가 비활성화되었기 때문 ---> ~cbc 암호 추가

switch(config)# run bash sudo grep -i cipher /isan/etc/dcos_sshd_config
#secure ciphers and MACs
#CSCun41202 : Disable weaker Ciphers and MACs
Ciphers aes128-ctr,aes256-ctr

feature bash-shell
ssh cipher-mode weak --- 약한 암호인 aes128-cbc,aes192-cbc,aes256-cbc를 허용

switch(config)# run bash sudo grep -i cipher /isan/etc/dcos_sshd_config
#secure ciphers and MACs
#CSCun41202 : Disable weaker Ciphers and MACs
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc

show ssh server
show users
ssh pray@1.1.12.2

 

■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■

 

● IOS
enable password anne
username pray password anne

 

SSH Key 생성

 방법 1. crypto key generate rsa general-keys label RSAKEY
 방법 2-1. ip domain-name innern
         2-2. crypto key generate rsa
ip ssh version 2

line vty 0 4
 login local
 transport input ssh

 access-class [acl name] in vrf-also (별도의 VRF 생성하여 사용 시) 

 

------------------------------------------------

show ip ssh

show crypto key mypubkey rsa
show users

 

* ssh 접속 명령어 : ssh -l admin 1.1.1.2

 

show control-plane host ...

show tcp 

 

※ "bootflash:cat4500es8-universal.SPA.03.10.02.E.152-6.E2.bin" : universal 버전은 SSH를 지원하지 않는다.

SSH를 사용하려면 "bootflash:/cat4500e-universalk9.SPA.03.10.00.E.152-6.E.bin" 버전으로 변경해야 함.

 

■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■

 

line template vty-config
 absolute-timeout 360
 access-class ingress vty-acl
 session-limit 1
 transport input ssh

vty-pool default 0 9 line-template vty-config

ipv4 access-list vty-acl
 10 permit ipv4 x.x.x.x/24 any
 20 permit ipv4 host x.x.x.x any

interface MgmtEth0/RP0/CPU0/0
 description ## mgmt ##
 vrf mgmt
 ipv4 address 192.168.1.1 255.255.255.0
!

ssh server v2
ssh server vrf mgmt
ssh server session-limit 10

#########################################

ipv4 access-list ssh
 10 permit ipv4 1.1.20.0/24 any

interface GigabitEthernet0/0/0/1
 vrf ssh
 ipv4 address 1.1.20.2 255.255.255.0
 ipv4 access-group ssh ingress

==========================

line default
 access-class ingress ssh-acl

ipv4 access-list ssh-acl
 10 deny ipv4 1.1.12.0/24 any

interface MgmtEth0/0/CPU0/0
 vrf v-ssh
 ipv4 address 1.1.12.2 255.255.255.0

==========================

line template vty-config
 access-class ingress ssh-acl
!
vty-pool default 0 9 line-template template vty-config
ipv4 access-list ssh-acl
 10 deny ipv4 1.1.12.0/24 any
!
interface MgmtEth0/0/CPU0/0
 vrf v-ssh
 ipv4 address 1.1.12.2 255.255.255.0

==========================

control-plane
 management-plane
  out-of-band
   vrf v-ssh
   interface MgmtEth0/0/CPU0/0
    allow SSH peer
     address ipv4 1.1.12.1
     address ipv4 1.1.1.0/24
     address ipv4 1.1.2.0/24
     address ipv4 172.16.10.0/24

#########################################

● IOS-XR

 

(필수)

crypto key generate rsa

ssh server v2

 

(선택.1)

line template ssh
 exec-timeout 0 0
 session-limit 1

 access-class ingress ssh-acl
 transport input ssh

    !

ipv4 access-list ssh-acl
 10 deny ipv4 1.1.12.0/24 any

!

ssh server session-limit 1

 

(선택.2)
control-plane
 management-plane
  inband
   interface all
    allow SSH peer
     address ipv4 1.1.12.2
     address ipv4 192.1.12.2
    !
ssh server session-limit 1

 

#####################################################

 

● Management Traffic 전용 네트워크를 통해 Node에 접속 하는 경우 추가 설정

vrf mgmt
 address-family ipv4 unicast

!

router static
 vrf mgmt
  address-family ipv4 unicast
   0.0.0.0/0 MgmtEth0/RP0/CPU0/0 192.168.10.1

!

interface GigabitEthernet0/0/0/0
 vrf mgmt
 ipv4 address 1.1.12.2 255.255.255.0

 

----------------------------------------------------------

설정 확인

show crypto key mypubkey rsa

show ssh session details

show users

 

* ACL 구성 방법 3가지.

  1. telnet vrf default ipv4 server max-servers 5 access-list [ ]  ----  telnet 설정 시

  2. line template [ssh] 아래에 access-class ingress [ssh-acl]

  3. control-plane    -----    제어 및 관리 플레인에 대한 액세스를 제한하여 트래픽이 노드 자체로 향하도록 구성
       management-plane
         inband
          interface all
           allow SSH peer
            address ipv4 1.1.12.2
            address ipv4 192.1.12.2

 

* 일반 IOS와 달리 IOS-XR은 RSA 키를 생성하기 위해 호스트 이름과 도메인 이름이 필요하지 않음.

* (ios-xr --> ios-xr) ssh 접속 시 username 미 설정 시, 현재 내가 접속되어 있는 계정으로 접속 시도함.

  (원격 접속 하고자 하는 장비에 동일한 username이 설정되어 있어야 됨, 그렇지 않을 경우 원격접속 할 장비의 username을 지정해야 함)

* RSA 키 생성 시 name 설정 하는 경우 IOS, IOS-XE와 마찬가지로 명명된 키를 SSH 프로세스에 연결 해야 함.

 

'A' 카테고리의 다른 글

WORD  (0) 2025.04.02
[IOS] CISCO Accounting Encrypt Type  (0) 2023.06.01

(none)# show version
Cisco Nexus Operating System (NX-OS) Software

...................
Software
  BIOS:      version 07.69
  kickstart: version 14.1(2m) [build 14.1(2m)]
  system:    version 14.1(2m) [build 14.1(2m)]
  PE:        version 4.1(2m)
  BIOS compile time:       04/07/2021
  kickstart image file is: /bootflash/aci-n9000-dk9.14.1.2m.bin

(none)# 

(none)# cat /mnt/cfg/0/boot/grub/menu.lst.local

(none)# cat /mnt/cfg/1/boot/grub/menu.lst.local
boot aci-n9000-dk9.14.1.2m.bin

(none)# 
(none)# dir bootflash
CpuUsage.Log               disk_log.txt  mem_log.txt.old.gz
aci-n9000-dk9.14.1.2m.bin  libmon.logs   mts_buffer_log.log
auto-s                     lost+found    nxos.7.0.3.I7.3.bin
diag_bootup                lxc
(none)# 
(none)# dir usbslot2
System\ Volume\ Information  nxos.7.0.3.I7.3.bin  nxos.9.3.5.bin
aci-n9000-dk9.14.2.7f.bin    nxos.7.0.3.I7.7.bin  nxos.9.3.7k.bin
(none)# 
(none)# reload 
This command will reload the chassis, Proceed (y/n)? [n]: y

 

ctrl + c

ctrl + c

ctrl + c


###################### 1차 booting ######################

loader > dir                                                                   

usb1::  

 aci-n9000-dk9.14.2.7f.bin

bootflash::  

  aci-n9000-dk9.14.1.2m.bin -----> aci-n9000-dk9.14.2.7f.bin 으로 버전 변경

 

...................                                                                    

loader > boot usb1:aci-n9000-dk9.14.2.7f.bin

Security Lock
Booting usb1:aci-n9000-dk9.14.2.7f.bin 

Image Signature verification was Successful.

Boot Time: 6/7/2023  15:7:58

...................

 

###################### 2차 booting ######################

loader > dir                                                                   

usb1::  

 aci-n9000-dk9.14.2.7f.bin

bootflash::  

  aci-n9000-dk9.14.2.7f.bin <----- 변경된 버전 확인

loader > boot aci-n9000-dk9.14.2.7f.bin <----- 2번째 bootflash boot

Security Lock
Booting aci-n9000-dk9.14.2.7f.bin 
Trying diskboot 
 Filesystem type is ext2fs, partition type 0x83
Image valid


Image Signature verification was Successful.

Boot Time: 6/7/2023  15:19:4

#############################################

(none)# dir bootflash
CpuUsage.Log                     diag_bootup   lxc
aci-n9000-dk9.14.2.7f.bin        disk_log.txt  mts_buffer_log.log
auto-s                           libmon.logs   nxos.7.0.3.I7.3.bin
bios_bootup_scratch_not_cleared  lost+found
(none)# 
(none)# 
(none)# show version
Cisco Nexus Operating System (NX-OS) Software

...................

Software
  BIOS:      version 07.69
  kickstart: version 14.2(7f) [build 14.2(7f)]
  system:    version 14.2(7f) [build 14.2(7f)]
  PE:        version 4.2(7f)
  BIOS compile time:       04/07/2021
  kickstart image file is: /bootflash/aci-n9000-dk9.14.2.7f.bin

(none)# 
(none)# cat /mnt/cfg/0/boot/grub/menu.lst.local -----> 해당 경로에 버전 확인
boot aci-n9000-dk9.14.1.2m.bin
(none)# 
(none)# setup-bootvars.sh aci-n9000-dk9.14.2.7f.bin
In progress
In progress
...................
Done
(none)# 
(none)# cat /mnt/cfg/0/boot/grub/menu.lst.local -----> 버전 변경 확인
boot aci-n9000-dk9.14.2.7f.bin
(none)# 

username test1 algorithm-type scrypt secret anne123!@#
username test1 secret 9 $9$WKHeic4OtMDrcY$t6vVck3vGkKuOp/b4A/I64KdmHrqOW3C50pXi1hjnYY

username test2 algorithm-type sha256 secret anne123!@#
username test2 secret 8 $8$TN.Dm6E1BEIehI$.V1Eb.T.NM8RzSRwNT2EmEEDhJil56sn53EbVRJsjt2

username test3 secret anne123!@#
username test3 secret 5 $1$keyI$2Gv3K5qMt2NOq70gvs4RR/

username test4 password anne123
username test4 password 0 anne123
  - service password-encryption
  - username test4 password 7 1108170B1243595F

'A' 카테고리의 다른 글

WORD  (0) 2025.04.02
SSH Configuration (IOS, IOS-XR, NXOS)  (0) 2023.06.28

IOS-XR eBGP 구성시 RPL을 만들고, RPL을 eBGP neighbor 구성 아래의 route-policy에 생성한 RPL을 in/out에 추가한다.
그리고 eBGP경로를 import, export 하기 위해 BGP 프로세스 루트 아래와 neighbor 세션에 대해 address-family를 설정해야 한다.

 

 

1. NX-OS <--> IOS-XR (iBGP/eBGP)

#################### NXOS-1 ####################
!
route-map redi-conn permit 10
!
interface Ethernet1/1
  no switchport
  ip address 1.1.12.1/24
  ip ospf network point-to-point
  ip router ospf 100 area 0.0.0.0
  no shutdown
!
interface loopback0
  ip address 1.1.1.1/24
!
router ospf 100
  router-id 1.1.1.1
  redistribute direct route-map redi-conn
!         
router bgp 100
  router-id 1.1.1.1
  address-family ipv4 unicast
    redistribute direct route-map redi-conn
  neighbor 2.2.1.1
    remote-as 100
    update-source loopback0
    address-family ipv4 unicast
!
#################### XR-1 ####################
!
interface Loopback0
 ipv4 address 2.2.1.1 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 1.1.12.2 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 1.1.23.2 255.255.255.0
!
route-policy PASS
  pass
end-policy
!
router ospf 100
 router-id 2.2.1.1
 redistribute connected
 area 0
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
router bgp 100
 bgp router-id 2.2.1.1
 address-family ipv4 unicast
  network 2.2.1.0/24
 !
 neighbor 1.1.1.1
  remote-as 100
  update-source Loopback0
  address-family ipv4 unicast
  !
 !
 neighbor 1.1.23.3
  remote-as 200
  address-family ipv4 unicast
   route-policy PASS in
   route-policy PASS out
  !
 !
!
end
#################### NXOS-2 ####################
!
interface Ethernet1/2
  no switchport
  ip address 1.1.23.3/24
  no shutdown
!
interface Loopback0
 ip address 3.3.1.1 255.255.255.0
!
router bgp 200
  router-id 3.3.1.1
  address-family ipv4 unicast
    network 3.3.1.0/24
  neighbor 1.1.23.2
    remote-as 100
    address-family ipv4 unicast
!
cs

 

 

 

 

 

 

 

 

 

 

 

 

2. IOS <--> IOS-XR (iBGP/eBGP)

 
#################### IOS-1 ####################
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface GigabitEthernet1/1
 no switchport
 ip address 1.1.12.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf 100 area 0
!
router ospf 100
  router-id 1.1.1.1
  redistribute direct route-map redi-conn
!         
router bgp 100
  router-id 1.1.1.1
  address-family ipv4 unicast
    redistribute direct route-map redi-conn
  neighbor 2.2.1.1
    remote-as 100
    update-source loopback0
    address-family ipv4 unicast
!
#################### XR-1 ####################
!
interface Loopback0
 ipv4 address 2.2.1.1 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 1.1.12.2 255.255.255.0
!
interface GigabitEthernet0/0/0/2
 ipv4 address 1.1.23.2 255.255.255.0
!
route-policy PASS
  pass
end-policy
!
!
router ospf 100
 router-id 2.2.1.1
 redistribute connected
 address-family ipv4 unicast
 area 0
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
 !
!
router bgp 100
 bgp router-id 2.2.1.1
 address-family ipv4 unicast
  network 2.2.1.0/24
 !
 neighbor 1.1.1.1
  remote-as 100
  update-source Loopback0
  address-family ipv4 unicast
  !
 !
 neighbor 1.1.23.3
  remote-as 200
  address-family ipv4 unicast
   route-policy PASS in
   route-policy PASS out
  !
 !
!
end
#################### IOS-2 ####################
!
interface Loopback0
 ip address 3.3.1.1 255.255.255.0
!
interface GigabitEthernet1/2
 no switchport
 ip address 1.1.23.3 255.255.255.0
!
router bgp 200
 bgp router-id 3.3.1.1
 bgp log-neighbor-changes
 network 3.3.1.0 mask 255.255.255.0
 neighbor 1.1.23.2 remote-as 100
!
cs
 

 

'네트워크 > BGP' 카테고리의 다른 글

[BGP] 개요  (0) 2025.04.12
[BGP] BGP 테이블 2  (0) 2025.04.11
[BGP] BGP 테이블 1  (0) 2025.04.11
[BGP] eBGP, iBGP 기본 설정  (0) 2025.04.10
[IOS-XR] eBGP - basic config  (0) 2023.05.31

+ Recent posts