OSPF의 개요

 ㆍ링크 상태 라우팅 프로토콜, IP 패킷에서 프로토콜 넘버 89번 사용.

 ㆍSPF 알고리즘 사용하여 최적 경로 계산

 ㆍAREA 단위로 구성

     - 특정 Area 에서 발생하는 라우팅 정보가 다른 Area 로 전송되지 않는다.

 ㆍ스텁(Stub) Area 를 사용하여 라우팅 테이블의 크기를 줄일 수 있다.

 ㆍ Area 가 두 개 이상일 떄 반드시 하나는 Backbone Area가 되야 한다.

 

 

Neighbor를 맺고 Routing Table을 만드는 과정

 ㆍOSPF는 물리적으로 직접 연결된 라우터간에 Hello 패킷을 송,수신하고 Hello 패킷에 포함된 Neighbor List에 자신의 Router-id가 포함되어 있으면 그 라우터와 Neighbor 및 Adjacent Neighbor를 맺는다.

 ㆍAdjacent Neighbor 간에 라우팅 정보(LSA)를 교환하고 이를 LSDB에 저장한다.

 ㆍLSDB 정보를 SPF 알고리즘을 실행하여 목적지까지 최적 경로를 계산하고 이를 Routing Table에 저장한다.

 

 

네이버 연동 기본 설정(IOS)

router ospf 1
  router-id 1.1.1.1
  network 1.1.1.1 0.0.0.0 area 1
  network 1.1.12.1 0.0.0.0 areaa 1

 

 ㆍprocess id

    - 동일한 라우터에서 여러 개의 ospf process를 동작 시킬 때 상호 구분하기 위해 사용하며, process id는 라우터별로

      다른 값을 가져도 된다.

 

 ㆍrouter id

    - ospf가 동작 중인 각 라우터를 구분하는 용도. (다른 라우터와 중복되지 않은 유일한 값을 사용해야 한다.)

    - 변동되지 않는 IP 주소를 사용하는 것이 좋다. (Loopback address)

    - OSPF에 포함시키지 않아도 된다.

    - 지정하지 않으면 OSPF가 설정될 당시 동작중인 인터페이스의 IP 주소 중에서 자동으로 선택된다.

 

 ㆍnetwork

    - OSPF에 포함시킬 인터페이스의 ip 주소, wild mask, area를 지정한다.

    - network와 wild card의 역할은 OSPF 프로세스에 포함시킬 인터페이스를 지정하기 위함.

 

 ㆍ라우팅 테이블에 루프백 인터페이스의 서브넷 마스크는 /32로 표시되고, 원래의 서브넷 마스크 값으로 광고 하려면

      ip ospf network point-to-point 설정을 추가한다.

 

OSPF Packet

패킷 타입 패킷 종류 역할
1 Hello 네이버 구성 및 유지
2 DDP 테이터베이스의 요약 정보
3 LSR 데이터베이스의 상세 내용 요청
4 LSU 데이터베이스 업데이트
5 LSAck DDP, LSR, LSU 패킷 수신시 Ack 응답

 

→ Hello packet

 ㆍOSPF 네이버를 형성하고 유지하는데 사용.

 ㆍRouter ID, Area ID, 암호, Subnet Mask, Hello/Dead Interval, Stub area flag, Router Priority, DR/BDR, Neighbor List 정보가 들어있다.

구분 설명
Router ID OSPF 도메인내에서 유일한 값을 가지며, OSPF 라우터를 구분하는데 사용된다.
관리자는 해당 라우터가 가진 IP나 그렇지 않은 IP중 아무거나 Router ID로 설정이 가능하며미설정시에는 논리적 또는 물리적 IP중 높은 IP가 자동으로 Router ID로 설정된다.
Area ID OSPF가 설정된 인터페이스가 소속된 OSPF 에어리어 번호를 표시한다. OSPF에 포함된 인터페이스는 한 개의 AREA에 포함될 수 있으며Neighbor로 설정된 링크 간에는 동일한 AREA에 포함되어야 한다.
Authentication OSPF 라우팅 정보를 송ㆍ수신하면서 인증을 하는 경우에 사용.
네이버 간 반드시 같은 인증 방식과 암호로 인증해야 한다. Neighbor 인증과 Area 인증이 있다.
Network Mask IP Subnet mask 정보로 Subnet mask는 Neighbor 간 동일해야 한다. (다른 경우 ping 이 될 수 있지만 neighbor는 맺지 못한다)
Hello interval Hello Packet을 송신하는 주기이다. 네트워크 타입에 따라 10(point-to-point/Broadcast) 또는 30초이다.
Stub Area Flag LSDB의 간소화를 위해 존재하는 Stub Flag는 해당 Area에 포함된 모든 OSPF 라우터 상에서 동일하게 설정되어야 한다.
Router Priority 멀티 엑세스 네트워크에서 DR/BDR 선출 시 사용되며, 0~255 사이의 값으로 시스코 장비의 기본값은 ‘1’이다이는 라우터 단위가 아닌 인터페이스(네트워크) 단위로 운영된다.
Dead interval 이 기간동안 헬로 패킷을 수신하지 못하면 해당 네이버가 다운된 것으로 간주하는 시간이다.
Hello interval
 4배이며, Hello 패킷을 수신하면 40초 또는 120초 이다. Hello interval 변경 시 자동으로 4배로 변경되지만 Dead interval만 개별로 변경이 가능하며이때는 Hello interval에는 영향이 없지만 네이버 간 동일하게 설정해야만 한다.
DR 멀티 액세스(Broadcast, NBMA) 환경에서 OSPF 라우팅 정보의 불필요한 재 업데이트를 막기 위해 사용되며, DR 라우터의 라우터 ID가 표시된다.
BDR DR에 대한 백업으로 평상시에는 아무런 역할이 없다. DR 다운시 DR의 역할을 이어받는 BDR의 라우터 ID.
Neighbor List 헬로 패킷을 송신한 라우터가 네이버라고 여기는 라우터의 라우터 ID들의 리스트이다.
MTU Maximum Transmit Unit의 약자로 한 번에 전송 가능한 최대 패킷 사이즈이다. 네이버 간 동일해야 한다. 이더넷의 경우 별도의 tag가 붙지 않는다면 일반적으로 1500byte 의 크기이다. 'ip mtu [ ]' 명령어로 MTU 사이즈를 변경할 수 있다.

 

DDP(database description packet)

 ㆍOSPF는 자신이 만든 LSA 및 Neighbor에게서 수신한 LSA를 모두 LSDB에 저장한다.

 ㆍOSPF 라우터의 LSDB에 있는 LSA들을 요약한 정보를 알려주는 패킷이다.

 ㆍOSPF 네이버 라우터 간에 LSA(full routing table)를 교환하기 전에 자신의 LSDB에 있는 LSA 목록(summary 정보)은 상대 라우터에게 알려주기 위해서 사용한다.

 

LSR

 ㆍ상대 라우터가 보낸 DDP를 보고 자신에게 없는 네트워크 정보(LSA)가 있으면 상세한 네트워크 정보를 요청할 때 사용한다.

 

LSU

 ㆍ상대 라우터로 부터 LSR을 받거나 네트워크 상태가 변했을 때 해당 라우팅 정보를 전송하기 위해 사용하는 패킷이다. 즉 LSA를 실어 나를 사용.

 

LSAck

 ㆍOSPF 패킷(DDP, LSR, LSU)을 정상적으로 수신했음을 알려줄 때 사용.

 

 

OSPF 동작 방식

1. OSPF Neighbor

 ㆍHello Packet을 이용해 인접 라우터와 물리적으로 직접 연결된 인터페이스를 통해 Neighbor 구성 o Hello Packet 전송 시 목적지 주소

    - Point-to-Point / Broadcast NW : 224.0.0.5

    - Non-Broadcast NW : 상대방 IP주소

 

2. DR, BDR, DROther

 ㆍDR(Designated Router) : LSA 중계 역할 라우터

    - DR이 수신하는 업데이트 패킷 목적지 주소 : 224.0.0.6

    - DR이 송신하는 업데이트 패킷 목적지 주소 : 224.0.0.5 (DROther 수신)

 

 ㆍBDR(Backup DR) : DR 장애 시 DR역할을 하는 라우터

    - BDR이 수신하는 업데이트 패킷 목적지 주소: 224.0.0.6

 

 ㆍDROther : DR/BDR이 아닌 라우터

    - DROther가 수신하는 업데이트 패킷 목적지 주소: 224.0.0.5

    - DROther가 송신하는 업데이트 패킷 목적지 주소: 224.0.0.6 (DR/BDR 수신)

 

 ㆍOSPF NW 상에서의 불필요한 트래픽 부하를 줄이기 위해 DR/BDR에게만 LSA를 전송하고 DR이 DROther에게 중계

 ㆍBroadcast, Non-Broadcast NW에서만 사용 (Point-to-Point NW에서는 DR/BDR 없음)

 

3. OSPF Adjacency

 ㆍAdjacent Neighbor : OSPF 라우팅 정보(LAS)를 주고받는 Neighbor ◦ DR ↔ BDR/DROther

 ㆍBDR ↔ DR/DROther

 ㆍPoint-to-Point NW로 연결된 두 라우터

 ㆍPoint-to-Multi-Point NW로 연결된 라우터들 ◦ Virtual-Link로 연결된 두 라우터

※ Adjacency Neighbor는 LSA 정보를 직접 상호교환하며, 단순 Neighbor는 정보 공유와는 상관없이 OSPF Hello Packet으로 발견된 모든 OSPF 라우터들이다.

 

4. OSPF Neighbor State

1) OSPF Neighbor의 Adjacency 관계 형성 과정

 

 ㆍNeighbor 단계

[ Hello Packet을 이용해 OSPF Neighbor를 맺는 과정]
구분 설명
Down OSPF가 설정되고, Hello 패킷을 전송했지만 아직 다른 라우터로부터 Hello 패킷을 받지 못한 상태, full 상태에서 Dead 주기 동안 Hello packet을 못 받은 상태
Attempt (Non-Broadcast Multi Access 네트워크에서만 적용) Neighbor 명령어 설정 후 네이버에게서 헬로 패킷을 수신하지 못한 상태를 의미.
Init 네이버에게서 Hello 패킷을 받았으나 상대 라우터는 아직 나의 Hello 패킷을 수신하지 못한 상태, 상대방이 보낸 Hello 패킷의 Neighbor list에 나의 Router-id가 없다.
2-Way 네이버와 양방향 통신이 이루어진 상태이다. , 상대 라우터가 보낸 헬로 패킷의 Neighbor list 에 나의 Router-id 포함된 경우이다. 멀티 액세스 네트워크에서는 이 단계에서 DRBDR을 선출한다.

DROTHER 라우터끼리는 라우팅 정보를 교환하지 않으므로 어드제이션시를 맺지 못하고 네이버 상태는 2-Way 상태이다. 브로드캐스트, 논브로드캐스트 네트워크에서는 2-Way 상태에서 바로 DR/BDR을 선출하지 않고 모든 네이버에게 공정하게 DR/BDR로 선출되는 기회를 부여하기 위하여 Wait 시간 만큼 기다린다. Wait 시간은 Dead 주기와 동일하다.

 

 ㆍAdjacency Neighbor 단계

[ NeighborLSA를 교환하고, DB를 동기화하는 과정]
구분 설명
ExStart Neighbor DB 동기화를 위해 DBD 패킷을 사용해 Master/Slave 라우터를 선출한다. 라우터 ID가 높은 라우터가 마스터가 되며, 다음 단계에서 DDP 패킷 교환시 사용하는 DDP 패킷의 순서 번호를 결정한다.
ExChange 각 라우터 자신의 LSDB저장된 LSA의 Header만을 DDP 패킷에 담아 상대방에게 전송한다. DDP 패킷을 수신한 라우터는 자신의 LSDB의 내용과 비교해 보고, 자신에게 없거나 자신의 정보가 더 오래된 것이면 상대방에게 상세한 정보를 요청하기 위해 LSR List에 기록해 둔다.
상대로부터의 DDP 수신이 끝난 후 LSR List에 기록해 둔 것이 없으면, 바로 Full 상태가 된다.
Loading 상대로부터 DDP 수신이 끝난 후 LSR List에 기록해 둔 것이 있으면, LSR을 보내어 특정 LSA의 상세 정보를 보내줄 것을 요청하고, 이 요청을 받은 라우터는 특정 LSA 전체 정보를 LSU에 담아 전송한다.
Full Adjacency 라우터들 간에 라우팅 정보교환이 끝난 상태로, Adjacency 라우터들의 LSDB 내용이 모두 일치하는 상태이다. 라우팅 정보가 요약된 DDP와 라우팅 정보(LSA)가 들어있는 LSU 패킷을 모두 수신하면 상대 라우터와 동일한 라우팅 정보를 가지게 되고, Full 상태가 된다.

 

 

OSPF Cost

OSPF의 메트릭을 Cost라고 부르며, 출발지부터 목적지까지의 각 인터페이스에서 기준 대역폭(reference bandwidth)을 실제 대역폭으로 나눈 값의 합계이다.

 

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

[OSPF] Default Route  (0) 2025.03.26
[OSPF] 네트워크 축약(Summary)  (0) 2025.03.26
[OSPF] 타이머(Timer)  (0) 2025.03.26
[OSPF] passive interface  (0) 2025.03.26
[OSPF] 개념 2  (0) 2025.03.24

 

 

Initial   시작 시 상태입니다. 구성이 변경된 후 또는 인터페이스가 처음 시작될 때의 상태입니다.
Listen   라우터가 가상 IP 주소를 알고 있습니다. 다른 라우터에서 hello 메시지를 수신합니다.
Speak   라우터가 사전 hello 메시지를 보내고 활성 또는 대기 라우터 선거에 적극적으로 참여합니다.
Standby   라우터가 다음 활성 라우터가 될 후보이며 주기적 hello 메시지를 보냅니다.
Active   라우터가 현재 그룹 가상 MAC 주소로 전송되는 패킷을 전달합니다. 라우터가 주기적 hello 메시지를 보냅니다.

 

 

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

[NXOS] Nexus HSRP  (0) 2023.03.22

1. USB에서 Switch의 bootflash에 image copy

switch# dir usb1:

switch# dir bootflash:

switch# copy usb1:aci-n9000-dk9.14.2.7f.bin bootflash:

 

2. NXOS 모드를 끄고, 지정한 ACI image를 사용하여 booting 하도록 설정 후  reload 

switch(config)# no boot nxos

switch(config)# boot aci bootflash:///aci-n9000-dk9.14.2.7f.bin

switch(config)# copy r s

switch(config)# reload

  * username admin password xxxx (계정이 없는 경우 설정)

  * reload 후 Loder 모드로 진입함.

 

3. ACI image로 booting

loader > dir

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

 

5. image 확인

(none)# copy usb/usb1/aci-n9000-dk9.14.2.7f.bin bootflash

(none)# show version

.........

  kickstart: version 14.2(7f) [build 14.2(7f)]
.........
  kickstart image file is: /bootflash/aci-n9000-dk9.14.2.7f.bin

(none)# dir bootflash

 

6. ACI 모드의 bootflash에 새 image가 있는지 확인
(none)# cat /mnt/cfg/0/boot/grub/menu.lst.local
(none)# cat /mnt/cfg/1/boot/grub/menu.lst.local

 

7. ACI 모드의 bootflash에 사용하고자 하는 image로 변경

(none)# setup-bootvars.sh aci-n9000-dk9.14.2.7f.bin

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

ACI OS USB install (ACI --> ACI)  (0) 2023.06.11
[NXOS] Nexus OS install (ICAM serivce 관련)  (0) 2023.02.03
[NXOS] Nexus C93180YC-EX - OS install (USB)  (0) 2023.02.02

● running-config와 startup-config 구성 간의 차이를 출력,

*** (별) 로 시작하는 섹션은 Startup-config, --- (대시) 아래의 섹션은 Running-config

switch# sh run dif
*** Startup-config
--- Running-config
***************
*** 288,298 ****
  
  interface mgmt0
    vrf member management
  
  interface loopback0
!   ip address 1.1.1.1/24
  line console
  line vty
  

--- 287,297 ----
  
  interface mgmt0
    vrf member management
  
  interface loopback0
!   ip address 2.2.2.2/24
  line console
  line vty

 

● match 되는 행의 앞,뒤에 표시 할 행 수를 지정하여 running-config를 필터링하여 출력

N5k-UP# show running-config | grep prev 1 next 2 Firewall
interface Ethernet1/1
description Firewall – LAN
interface Ethernet1/2
--
interface Ethernet1/4
description Firewall - WAN
interface Ethernet1/5

 

● 한 번의 명령으로 여러개의 명령어 실행

NXOS-1# sh clo ; sh switchname ; sh license host-id
13:25:46.280 UTC Fri Feb 09 2024
Time source is NTP
NXOS-1 
License hostid: VDH=9BAZ0R47J6O
NXOS-1#

 

● 10진수 ↔ 16진수 변환

switch# hex 255
0xff
switch# dec 0xff
255

 

● 명령어 실행 지연

NXOS-1# sh clo ; sleep 5 ; sh clo
13:29:00.744 UTC Fri Feb 09 2024
Time source is NTP
13:29:05.761 UTC Fri Feb 09 2024
Time source is NTP

 

running-config 구성을 bootflash로 Redirect

NXOS-1# show running-config > backup_$(SWITCHNAME)_$(TIMESTAMP)
NXOS-1# 
NXOS-1# dir bootflash:
	.....
       4254    May 11 11:54:20 2024  backup_NXOS-1_2024-05-11-11.54.20

 

● configuration 스냅샷 및 rollback

NXOS-1# checkpoint ANNE
.Done
NXOS-1# sh checkpoint summary 
1) ANNE:
Created by admin
Created at Fri, 13:34:43 09 Feb 2024
Size is 22,658 bytes
User Checkpoint Summary
--------------------------------------------------------------------------------
Description: None

NXOS-1# 
NXOS-1# conf
Enter configuration commands, one per line. End with CNTL/Z.
NXOS-1(config)# host ANNE_TEST
ANNE_TEST(config)# end
NXOS-1# 
ANNE_TEST# sh diff rollback-patch checkpoint ANNE running-config 
Collecting Running-Config
Generating Rollback Patch
!!                                                                  
hostname ANNE_TEST

vdc ANNE_TEST id 1

ANNE_TEST#
ANNE_TEST#
ANNE_TEST# rollback running-config checkpoint ANNE 
ADVISORY: Rollback operation started...
Modifying running configuration from another VSH terminal in parallel
is not recommended, as this may lead to Rollback failure.

Collecting Running-Config
Generating Rollback patch for switch profile
Rollback Patch is Empty
Collecting Running-Config
Generating Rollback Patch
Executing Rollback Patch 
During CR operation,will retain L3 configuration
when vrf member change on interface
Generating Running-config for verification
Generating Rollback Patch

Rollback completed successfully.

NXOS-1# 
NXOS-1#

 

● CLI variables를 사용하여 TAC 정보를 압축된 .gz 파일로 특정 위치에 저장

NXOS-1# show cli variables
VSH Variable List (* = session vars)
-----------------
SWITCHNAME="NXOS-1"
TIMESTAMP="2024-02-11-11.16.29"
NXOS-1# 
NXOS-1# 
NXOS-1# tac-pac bootflash:$(SWITCHNAME)_$(TIMESTAMP)-show-tech-all.gz
Show tech detail can take more than 5 minutes to complete. Please Wait ...
2024 Feb 11 11:17:43 NXOS-1 %$ VDC-1 %$ %SECURITYD-2-FEATURE_ENABLE_DISABLE: User  has enabled the feature bash-shell
2024 Feb 11 11:17:44 NXOS-1 %$ VDC-1 %$ %SECURITYD-2-FEATURE_ENABLE_DISABLE: User  has disabled the feature bash-shell
NXOS-1# 
NXOS-1# 
NXOS-1# dir bootflash:
   .....
    6586243    Feb 11 11:19:46 2024  NXOS-1_2024-02-11-11.16.54-show-tech-all.gz
    7568071    Feb 11 12:46:32 2024  show_tech_out.gz
   .....
Usage for bootflash://sup-local
   .....
  copy bootflash://sup-local/backup.2024-03-07-11.48.22 tftp:1.1.1.1 vrf management

 

● 대소문자를 구분하지 않고 matching ( -i )

NXOS-2# sh int des | include -i test
Eth1/1        eth    10G     ## test-1 ##
Eth1/2        eth    10G     ## Test-2 ##


NXOS-2# sh int des | grep -i test
Eth1/1        eth    10G     ## test-1 ##
Eth1/2        eth    10G     ## Test-2 ##

 

● diff 인수를 사용하여 인터페이스 카운트 차이 확인

NXOS# show int eth1/10 | inc unicast | diff
2c2
< 175430277381 unicast packets 1264463 multicast packets 177 broadcast packets
---
> 175432920374 unicast packets 1264481 multicast packets 177 broadcast packets

 

● command history 확인

NXOS-1# show cli history config-mode 
 2  11:12:30     line con 
 3  11:12:33       ex 0
 4  11:12:34     exi
 5  11:12:38     no ip domain-lookup 
 6  11:12:47     host NXOS-1
 8  11:13:21     !CMD: PASSWORD statement not printed
26  11:24:24     feature bash-shell 
47  11:42:51     int eth1/1
48  11:42:59       des ## eth1/1 ##

 

● L3 설정을 유지한채 vrf member 설정

system vrf-member-change retain-l3-config

NXOS-1# ping 1.1.12.2 vr anNE count 20 interval 1
PING 1.1.12.2 (1.1.12.2): 56 data bytes
Request 0 timed out
64 bytes from 1.1.12.2: icmp_seq=1 ttl=254 time=3.158 ms
64 bytes from 1.1.12.2: icmp_seq=2 ttl=254 time=2.509 ms
Request 8 timed out
Request 9 timed out
64 bytes from 1.1.12.2: icmp_seq=10 ttl=254 time=3.811 ms
64 bytes from 1.1.12.2: icmp_seq=11 ttl=254 time=3.92 ms
^C
--- 1.1.12.2 ping statistics ---
14 packets transmitted, 11 packets received, 21.43% packet loss
round-trip min/avg/max = 2.197/3.478/4.87 ms

 

● CPU 사용량 2초 마다 출력

NXOS-1# show system internal processes cpu 2 | no-more

 

show running-config 후 --More-- 상태에서 ' / ' 입력하여 출력을 필터링한 다음 원하는 패턴을 검색

switch# show running-config 

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

/line
...skipping
line console
line vty

 

 

show interface brief | sort

 

● CRC count만 보는 명령어

show int | i is up|CRC

 

● 인터페이스에서 inpit error count만 보는 방법

show interface | section input error

show interface | include input_error

show interface | i up, line protocol is up|input error

show interface | inc FastEthernet|input error

show interface | inc line | CRC

(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)# 

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

 

 

 

RP/0/0/CPU0:R-1#sh run
!
route-policy PASS
  pass
end-policy
!
router bgp 1
 bgp router-id 1.1.1.1
 address-family ipv4 unicast
  redistribute connected
 !
 neighbor 1.1.12.2
  remote-as 2
  address-family ipv4 unicast
   route-policy PASS in
   route-policy PASS out
  !
 !
!
####################################################
 
RP/0/0/CPU0:R-2#sh run
!
route-policy PASS
  pass
end-policy
!
router bgp 2
 bgp router-id 2.2.1.1
 address-family ipv4 unicast
  redistribute connected
 !
 neighbor 1.1.12.1
  remote-as 1
  address-family ipv4 unicast
   route-policy PASS in
   route-policy PASS out
  !
 !
!
####################################################
 
RP/0/0/CPU0:R-1#sh ip rou
Wed May 31 13:35:58.004 UTC
 
Gateway of last resort is not set
 
C    1.1.1.0/24 is directly connected, 00:17:32, Loopback0
L    1.1.1.1/32 is directly connected, 00:17:32, Loopback0
C    1.1.12.0/24 is directly connected, 00:17:32, GigabitEthernet0/0/0/0
L    1.1.12.1/32 is directly connected, 00:17:32, GigabitEthernet0/0/0/0
B    2.2.1.0/24 [20/0] via 1.1.12.200:16:25
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#sh bgp ipv4 uni
Wed May 31 13:36:09.183 UTC
BGP router identifier 1.1.1.1local AS number 1
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000   RD version: 7
BGP main routing table version 7
BGP NSR Initial initsync version 3 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
 
Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24         0.0.0.0                  0         32768 ?
*> 1.1.12.0/24        0.0.0.0                  0         32768 ?
*                     1.1.12.2                 0             0 2 ?
*> 2.2.1.0/24         1.1.12.2                 0             0 2 ?
 
Processed 3 prefixes, 4 paths
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#sh bgp ipv4 uni su
Wed May 31 13:36:11.893 UTC
BGP router identifier 1.1.1.1local AS number 1
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000000   RD version: 7
BGP main routing table version 7
BGP NSR Initial initsync version 3 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
 
BGP is operating in STANDALONE mode.
 
 
Process       RcvTblVer   bRIB/RIB   LabelVer  ImportVer  SendTblVer  StandbyVer
Speaker               7          7          7          7           7           0
 
Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
1.1.12.2          0     2      21      21        7    0    0 00:17:39          2
 
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#sh ip bgp 1.1.12.2
Wed May 31 13:37:17.668 UTC
BGP routing table entry for 1.1.12.0/24
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker                  5           5
Last Modified: May 31 13:19:31.932 for 00:17:45
Paths: (2 available, best #1)
  Advertised to peers (in unique update groups):
    1.1.12.2        
  Path #1: Received by speaker 0
  Advertised to peers (in unique update groups):
    1.1.12.2        
  Local
    0.0.0.0 from 0.0.0.0 (1.1.1.1)
      Origin incomplete, metric 0, localpref 100, weight 32768, valid, redistributed, best, group-best
      Received Path ID 0, Local Path ID 0, version 5
  Path #2: Received by speaker 0
  Not advertised to any peer
  2
    1.1.12.2 from 1.1.12.2 (2.2.1.1)
      Origin incomplete, metric 0, localpref 100, valid, external, group-best
      Received Path ID 0, Local Path ID 0, version 0
      Origin-AS validity: not-found
RP/0/0/CPU0:R-1#
RP/0/0/CPU0:R-1#sh ip bgp 2.2.1.1 
Wed May 31 13:37:40.697 UTC
BGP routing table entry for 2.2.1.0/24
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker                  7           7
Last Modified: May 31 13:19:32.932 for 00:18:07
Paths: (1 available, best #1)
  Not advertised to any peer
  Path #1: Received by speaker 0
  Not advertised to any peer
  2
    1.1.12.2 from 1.1.12.2 (2.2.1.1)
      Origin incomplete, metric 0, localpref 100, valid, external, best, group-best
      Received Path ID 0, Local Path ID 0, version 7
      Origin-AS validity: not-found
RP/0/0/CPU0:R-1#
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
[BGP] iBGP, eBGP 구성  (0) 2023.06.01

● Trunk 구성

switch(config)# feature lacp
switch(config-if)# interface ethernet 1/1-2
switch(config-if-range)# switchport mode trunk
switch(config-if-range)# channel-group 100

 

● Access 구성

switch(config)# feature lacp
switch(config-if)# interface ethernet 1/1-2
switch(config-if-range)# switchport access vlan 100
switch(config-if-range)# channel-group 100

 

● L3 구성

switch(config)# feature lacp
switch(config)# interface ethernet 1/1-2
switch(config-if-range)# channel-group 1 mode active
switch(config)# interface port-channel 1

switch(config-if)# no switchport --------------> routed(admin down)

switch(config-if)# ip address 10.1.1.1/24

or

switch(config)# interface eth1/1-2
switch(config-if-range)# no switchport --------------> access(up) >> routed(admin down)

switch(config-if-range)# channel-group 1 mode active

switch(config)# interface port-channel1
switch(config-if)# ip address 10.1.1.1/24

 

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

 

** L3(routed mode) 설정된 port-channel에 물리 인터페이스(access mode)를 할당 하는 경우, 'port not compatible' Error 메시지 발생

   물리 인터페이스를 port-channel 인터페이스와 Mode를 맞춰야 함.

   no switchport 후 channel-group 설정 또는 channel-group 1 force mode active 적용.

    

switch(config)# int po9
switch(config-if)# no swi
switch(config-if)# ip add 1.1.12.1/30

switch(config)# int eth1/1-2
switch(config-if-range)# ch 9 mo ac
command failed: port not compatible [Ethernet Layer] 
** You can use force option to override the port's parameters 
** (e.g. "channel-group X force") 
** Use "show port-channel compatibility-parameters" to get more information on failure

 

※ L3(routed mode) 설정된 port-channel에 물리 인터페이스를 할당하는 2가지 방법

1. switch(config-if)# channel-group 9 force mode active (force 옵션 사용)

2. switch(config-if)# no switchport 후 channel-group 설정

 

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

 

 * IOS

interface range gigabitEthernet 1/1-2
  channel-group 1 mode active

  no shutdown

interface Port-channel1
  no switchport
  ip address 1.1.12.2 255.255.255.252

 

● LACP 구성 확인

switch# show port-channel summary
Flags:  D - Down        P - Up in port-channel (members)
        I - Individual  H - Hot-standby (LACP only)
        s - Suspended   r - Module-removed
        b - BFD Session Wait
        S - Switched    R - Routed
        U - Up (port-channel)
        p - Up in delay-lacp mode (member)
        M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port-       Type     Protocol  Member Ports
      Channel
--------------------------------------------------------------------------------
1     Po1(SD)     Eth      LACP      Eth1/1(D)
2     Po2(SU)     Eth      LACP      Eth1/2(P)
999   Po999(SD)   Eth      LACP      Eth1/5(s)    Eth1/6(s)

 

Port-channel(SD) : 현재 port-channel 상태가 Down 된 경우 / Eth1/1(D)는 해당 인터페이스 Down을 의미

Port-channel(SU) : 현재 port-channel 상태가 UP으로 Port-channel이 정상적으로 구성이 된 상태 / Eth1/2(P)는 해당 인터페이스 UP을 의미

Port-channel(SD) : 현재 port-channel 상태가 Donw 된 경우 / Eth1/5(s)는 대기중으로 대국의 장비 인터페이스 UP 상태이기는 하나 LACP

                               구성이 안되었을 경우 발생 

 

switch# show port-channel database interface port-channel 1
port-channel1
    Last membership update is successful
    2 ports in total, 2 ports up
    First operational port is Ethernet1/1
    Age of the port-channel is 0d:00h:38m:20s
    Time since last bundle is 0d:00h:35m:05s
    Last bundled member is Ethernet1/2
    Ports:   Ethernet1/1     [active ] [up] *
                 Ethernet1/2     [active ] [up]

 

switch# show lacp neighbor interface port-channel 1
Flags:  S - Device is sending Slow LACPDUs F - Device is sending Fast LACPDUs
            A - Device is in Active mode       P - Device is in Passive mode
port-channel1 neighbors
Partner's information
                 Partner                       Partner                               Partner
Port          System ID                   Port Number       Age         Flags
Eth1/1      32768,50-0-0-2-0-7     0x101                 2004        SA

                LACP Partner              Partner                               Partner
                Port Priority                 Oper Key                            Port State
                32768                          0x8000                               0x3d

Partner's information
                 Partner                       Partner                               Partner
Port          System ID                   Port Number       Age         Flags
Eth1/1      32768,50-0-0-2-0-7     0x102                 2004        FA

                LACP Partner              Partner                               Partner
                Port Priority                 Oper Key                            Port State
                32768                          0x8000                               0x3f

 

SW-1# show lacp counters interface port-channel 1
NOTE: Clear lacp counters to get accurate statistics
------------------------------------------------------------------------------
                             LACPDUs                      Markers/Resp LACPDUs
Port                        Sent                Recv                  Recv Sent  Pkts Err
------------------------------------------------------------------------------
port-channel1
Ethernet1/1             86                    73                     0      0    0      
Ethernet1/2             308                  81                     0      0    0 

 

SW-2show lacp counters interface port-channel 1
NOTE: Clear lacp counters to get accurate statistics
------------------------------------------------------------------------------
                             LACPDUs                      Markers/Resp LACPDUs
Port                        Sent                Recv                  Recv Sent  Pkts Err
------------------------------------------------------------------------------
port-channel1
Ethernet1/1             74                    76                     0      0    0      
Ethernet1/2             85                    297                     0      0    0 

 

switch# show vlan brief

 : interface를 port-channel에 할당하면 VLAN에서 해당 interface는 보이지 않음

 

 

 출처

https://blog.naver.com/91nomatter/222606525000

 

 

 

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

LAG(LACP) - 개념  (0) 2023.04.29
[IOS-XR] NCS6008 LAG(Link Aggregation)  (0) 2023.03.21

+ Recent posts