[BGP] routing protocol
BGP 라우팅 프로토콜은 서로 다른 AS 간 정보를 주고받기 위해 사용되며,
기본 rule은 ibgp로 부터 받은 정보는 다른 ibgp에게 전달해 주지 않는다.(split horizon)
이러한 rule을 깨기 위해 사용되는 3가지 방법이 있다.
1. Full Mesh topolocy
2. 사설 AS
3. RR(Route Reflector)
1. Full Mesh 구성
위와 같은 구성도가 있다고 가정해보면,
R2,4,5간 관계를 보면, R3, R4 간 bgp 정보 전달이 없음을 확인할 수 있다.
-> ibgp로 받은 정보를 ibgp로 보내지 않기 때문으로 볼 수 있다.
*A:R2>config>router>bgp# show router route-table protocol bgp
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------- 20.1.11.0/24 Remote BGP 00h52m47s 170 10.1.12.2 0 20.1.12.0/24 Remote BGP 00h44m08s 170 10.1.13.2 0 ------------------------------------------- No. of Routes: 2 ========================= |
*A:R3# show router route-table protocol bgp
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric -------------------------------------------
No. of Routes: 0 ========================= |
*A:R4>config>router>bgp# show router route-table protocol bgp
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric -------------------------------------------
No. of Routes: 0 ========================= |
반면, R5,6,7 간 관계를 보면, R6, R7간 인터링크가 있기 때문에 정보 교환이 된 것을 확인할 수 있다.
A:R5>config>router# show router route-table protocol bgp
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------- 20.1.13.0/24 Remote BGP 00h41m04s 170 10.1.22.1 0 20.1.14.0/24 Remote BGP 00h39m30s 170 10.1.23.1 0 ------------------------------------------- No. of Routes: 2 ========================= |
*A:R6>config>router# show router route-table protocol bgp
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------- 20.1.14.0/24 Remote BGP 00h36m43s 170 10.1.24.3 0 ------------------------------------------- No. of Routes: 1 ========================= |
*A:R7>config>router# show router route-table protocol bgp
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------- 20.1.13.0/24 Remote BGP 00h37m06s 170 10.1.24.2 0 ------------------------------------------- No. of Routes: 1 ========================= |
2. 사설 AS
전체의 as는 4766이지만, 내부적으로 4767-4768-4769와 같은 as로 설정을 하였다.
R2의 bgp 정보들이 R1으로 넘어간 것을 확인할 수 있다. R2에서 bgp export 정책을 사용하지 않았음에도 불구하고, R3, R4의 20.1.대역의 정보가 넘어간 것을 확인할 수 있다
*A:R1>config>router>bgp# info ------------------------------------------- min-route-advertisement 1 ibgp-multipath export "bgp-export" next-hop-resolution use-bgp-routes exit group "Downlink" family ipv4 neighbor 2.2.2.2 local-as 4769 peer-as 4768 exit neighbor 5.5.5.5 peer-as 4766 exit exit no shutdown -------------------------------------------
autonomous-system 4766 confederation 4769 members 4766 |
*A:R2>config>router>bgp# info ------------------------------------------- min-route-advertisement 1 next-hop-resolution use-bgp-routes exit group "Uplink" family ipv4 neighbor 1.1.1.1 local-as 4768 peer-as 4769 exit exit group "Downlink" family ipv4 local-as 4768 neighbor 3.3.3.3 local-as 4768 peer-as 4767 exit neighbor 4.4.4.4 local-as 4766 peer-as 4766 exit exit no shutdown -------------------------------------------
autonomous-system 4766 confederation 4768 members 4766
|
*A:R3>config>router>bgp# info ------------------------------------------- min-route-advertisement 1 export "upper" next-hop-resolution use-bgp-routes exit group "Uplink" family ipv4 neighbor 2.2.2.2 local-as 4767 peer-as 4768 exit exit no shutdown -------------------------------------------
autonomous-system 4766 confederation 4767 members 4766 |
*A:R1>config>router# show router route-table | match "20." context all 20.1.11.0/24 Remote BGP 00h05m58s 170 10.1.11.2 0 20.1.12.0/24 Remote BGP 00h05m58s 170 10.1.11.2 0 |
*A:R2>config>router# show router route-table | match 20. context all 20.1.11.0/24 Remote BGP 00h07m07s 170 10.1.12.2 0 20.1.12.0/24 Remote BGP 00h07m07s 170 10.1.13.2 0 |
*A:R3>config>router# show router route-table | match "20." context all 20.1.11.0/24 Blackh* Static 02h44m18s 5 Black Hole 1 20.1.12.0/24 Remote BGP 00h04m57s 170 10.1.12.1 0 |
*A:R4>config>router# show router route-table | match "20." context all 20.1.11.0/24 Remote BGP 00h05m16s 170 10.1.13.3 0 20.1.12.0/24 Blackh* Static 02h35m50s 5 Black Hole 1 |
A:R1>config>router# show router route-table
==================================================== Route Table (Router: Base) ==================================================== Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------------------------------------------- 1.1.1.1/32 Local Local 02d01h35m 0 system 0 2.2.2.2/32 Remote ISIS 01d21h49m 18 10.1.11.2 10 3.3.3.3/32 Remote ISIS 01d03h33m 18 10.1.11.2 20 4.4.4.4/32 Remote ISIS 01d03h32m 18 10.1.11.2 20 5.5.5.5/32 Remote ISIS 01d10h20m 18 10.1.21.1 10 6.6.6.6/32 Remote ISIS 01d10h20m 18 10.1.21.1 20 7.7.7.7/32 Remote ISIS 01d10h20m 18 10.1.21.1 20 10.1.11.0/24 Local Local 01d21h49m 0 Te1/1/1 0 10.1.12.0/24 Remote ISIS 01d21h49m 18 10.1.11.2 20 10.1.13.0/24 Remote ISIS 01d10h31m 18 10.1.11.2 20 10.1.21.0/24 Local Local 01d21h43m 0 Te1/1/2 0 10.1.22.0/24 Remote ISIS 01d10h20m 18 10.1.21.1 20 10.1.23.0/24 Remote ISIS 01d10h20m 18 10.1.21.1 20 10.1.24.0/24 Remote ISIS 01d10h20m 18 10.1.21.1 30 20.1.11.0/24 Remote BGP 00h00m08s 170 10.1.11.2 0 20.1.12.0/24 Remote BGP 00h00m08s 170 10.1.11.2 0 ------------------------------------------------------------------------------- No. of Routes: 16 |
*A:R1>config>router# show router route-table
==================================================== Route Table (Router: Base) ==================================================== Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------------------------------------------- 1.1.1.1/32 Local Local 02d01h59m 0 system 0 2.2.2.2/32 Remote ISIS 01d22h13m 18 10.1.11.2 10 3.3.3.3/32 Remote ISIS 01d03h57m 18 10.1.11.2 20 4.4.4.4/32 Remote ISIS 01d03h56m 18 10.1.11.2 20 5.5.5.5/32 Remote ISIS 01d10h45m 18 10.1.21.1 10 6.6.6.6/32 Remote ISIS 01d10h45m 18 10.1.21.1 20 7.7.7.7/32 Remote ISIS 01d10h45m 18 10.1.21.1 20 10.1.11.0/24 Local Local 01d22h13m 0 Te1/1/1 0 10.1.12.0/24 Remote ISIS 01d22h13m 18 10.1.11.2 20 10.1.13.0/24 Remote ISIS 01d10h55m 18 10.1.11.2 20 10.1.21.0/24 Local Local 01d22h07m 0 Te1/1/2 0 10.1.22.0/24 Remote ISIS 01d10h45m 18 10.1.21.1 20 10.1.23.0/24 Remote ISIS 01d10h45m 18 10.1.21.1 20 10.1.24.0/24 Remote ISIS 01d10h45m 18 10.1.21.1 30 ------------------------------------------------------------------------------- No. of Routes: 14 |
3. RR
맨 아래인 R3,4 R6,7에서 BGP로 재분배 한 대역에 대해서 BGP는 iBGP간 받은 정보를 ibgp로 내보내지 않기 때문에 R1까지 전파되지 않는 것을 확인할 수 있다.
*A:R1>config>router# show router route-table
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------- 1.1.1.1/32 Local Local 02d02h17m 0 system 0 2.2.2.2/32 Remote ISIS 01d22h30m 18 10.1.11.2 10 3.3.3.3/32 Remote ISIS 01d04h14m 18 10.1.11.2 20 4.4.4.4/32 Remote ISIS 01d04h13m 18 10.1.11.2 20 5.5.5.5/32 Remote ISIS 01d11h02m 18 10.1.21.1 10 6.6.6.6/32 Remote ISIS 01d11h02m 18 10.1.21.1 20 7.7.7.7/32 Remote ISIS 01d11h02m 18 10.1.21.1 20 10.1.11.0/24 Local Local 01d22h30m 0 Te1/1/1 0 10.1.12.0/24 Remote ISIS 01d22h30m 18 10.1.11.2 20 10.1.13.0/24 Remote ISIS 01d11h12m 18 10.1.11.2 20 10.1.21.0/24 Local Local 01d22h24m 0 Te1/1/2 0 10.1.22.0/24 Remote ISIS 01d11h02m 18 10.1.21.1 20 10.1.23.0/24 Remote ISIS 01d11h02m 18 10.1.21.1 20 10.1.24.0/24 Remote ISIS 01d11h02m 18 10.1.21.1 30 ------------------------------------------- No. of Routes: 14 |
*A:R2>config>router# show router route-table
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------- 1.1.1.1/32 Remote ISIS 01d22h32m 18 10.1.11.1 10 2.2.2.2/32 Local Local 02d02h03m 0 system 0 3.3.3.3/32 Remote ISIS 01d04h16m 15 10.1.12.2 10 4.4.4.4/32 Remote ISIS 01d04h15m 15 10.1.13.2 10 5.5.5.5/32 Remote ISIS 01d11h03m 18 10.1.11.1 20 6.6.6.6/32 Remote ISIS 01d11h03m 18 10.1.11.1 30 7.7.7.7/32 Remote ISIS 01d11h03m 18 10.1.11.1 30 10.1.11.0/24 Local Local 02d02h02m 0 Te1/1/2 0 10.1.12.0/24 Local Local 02d00h47m 0 Te1/1/1 0 10.1.13.0/24 Local Local 01d11h13m 0 Te1/1/3 0 10.1.21.0/24 Remote ISIS 01d22h25m 18 10.1.11.1 20 10.1.22.0/24 Remote ISIS 01d11h03m 18 10.1.11.1 30 10.1.23.0/24 Remote ISIS 01d11h03m 18 10.1.11.1 30 10.1.24.0/24 Remote ISIS 01d11h03m 18 10.1.11.1 40 20.1.11.0/24 Remote BGP 00h12m19s 170 10.1.12.2 0 20.1.12.0/24 Remote BGP 00h18m46s 170 10.1.13.2 0 ------------------------------------------- No. of Routes: 16 |
A:R5# show router route-table
========================= Route Table (Router: Base) ========================= Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------- 1.1.1.1/32 Remote ISIS 01d11h04m 18 10.1.21.2 10 2.2.2.2/32 Remote ISIS 01d11h04m 18 10.1.21.2 20 3.3.3.3/32 Remote ISIS 01d04h16m 18 10.1.21.2 30 4.4.4.4/32 Remote ISIS 01d04h15m 18 10.1.21.2 30 5.5.5.5/32 Local Local 01d22h31m 0 system 0 6.6.6.6/32 Remote ISIS 01d11h04m 15 10.1.22.1 10 7.7.7.7/32 Remote ISIS 01d11h04m 15 10.1.23.1 10 10.1.11.0/24 Remote ISIS 01d11h04m 18 10.1.21.2 20 10.1.12.0/24 Remote ISIS 01d11h04m 18 10.1.21.2 30 10.1.13.0/24 Remote ISIS 01d11h04m 18 10.1.21.2 30 10.1.21.0/24 Local Local 01d11h04m 0 Te1/1/1 0 10.1.22.0/24 Local Local 01d22h23m 0 Te1/1/2 0 10.1.23.0/24 Local Local 01d11h04m 0 Te1/1/3 0 10.1.24.0/24 Remote ISIS 01d11h04m 15 10.1.22.1 20 20.1.13.0/24 Remote BGP 01d07h26m 170 10.1.22.1 0 20.1.14.0/24 Remote BGP 01d07h24m 170 10.1.23.1 0 ------------------------------------------- No. of Routes: 16 |
R2-R3,4 // R5-R6,7 이렇게 되어있는 - 발신자를 제외한 모든 피어에게 R1은 안해두댐 왜냐면 ,, 해당 정보를 준 라우터의 ip가 Originator ID
R1에게 R4,5,6,7,의 정보가 전파됨을 확인할 수 있다.
*A:R1>config>router# show router route-table
=============================================================================== Route Table (Router: Base) =============================================================================== Dest Prefix[Flags] Type Proto Age Pref Next Hop[Interface Name] Metric ------------------------------------------------------------------------------- 1.1.1.1/32 Local Local 02d03h38m 0 system 0 2.2.2.2/32 Remote ISIS 01d23h51m 18 10.1.11.2 10 3.3.3.3/32 Remote ISIS 01d05h36m 18 10.1.11.2 20 4.4.4.4/32 Remote ISIS 01d05h35m 18 10.1.11.2 20 5.5.5.5/32 Remote ISIS 01d12h23m 18 10.1.21.1 10 6.6.6.6/32 Remote ISIS 01d12h23m 18 10.1.21.1 20 7.7.7.7/32 Remote ISIS 01d12h23m 18 10.1.21.1 20 10.1.11.0/24 Local Local 01d23h51m 0 Te1/1/1 0 10.1.12.0/24 Remote ISIS 01d23h51m 18 10.1.11.2 20 10.1.13.0/24 Remote ISIS 01d12h33m 18 10.1.11.2 20 10.1.21.0/24 Local Local 01d23h46m 0 Te1/1/2 0 10.1.22.0/24 Remote ISIS 01d12h23m 18 10.1.21.1 20 10.1.23.0/24 Remote ISIS 01d12h23m 18 10.1.21.1 20 10.1.24.0/24 Remote ISIS 01d12h23m 18 10.1.21.1 30 20.1.11.0/24 Remote BGP 00h52m08s 170 10.1.11.2 0 20.1.12.0/24 Remote BGP 01h05m15s 170 10.1.11.2 0 20.1.13.0/24 Remote BGP 00h35m00s 170 10.1.21.1 0 20.1.14.0/24 Remote BGP 00h34m54s 170 10.1.21.1 0 ------------------------------------------------------------------------------- No. of Routes: 18 |
*A:R1>config>router# show router route-table | match "20.1" context all 20.1.11.0/24 Remote BGP 00h52m32s 170 10.1.11.2 0 20.1.12.0/24 Remote BGP 01h05m39s 170 10.1.11.2 0 20.1.13.0/24 Remote BGP 00h35m25s 170 10.1.21.1 0 20.1.14.0/24 Remote BGP 00h35m19s 170 10.1.21.1 0 |