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