Routing - Interdomain

임승섭·2023년 6월 1일
0

Computer Network

목록 보기
19/27

BGP

Flat vs. Hierarchical

인터넷이 어떻게 생겼는가

  • Flat
    • No hierarchy
    • Not scalable
  • Hierarchical
    • Network divided into "areas"
    • Scalable

인터넷은 hierarchical하다

Automonous System (AS)

  • 같은 routing policy를 갖는 network의 모음
  • Single routing protocol
  • Single administrative control

Hierarchical Structure

  • Tiers (Provider - Customer)
    • Tier1 AS : global reachability
    • Tier2 AS : regional / country
    • Tire3 AS : local
    • Customer가 Provider한테 돈 줘
  • Peers
    • 서로 사이즈가 비슷한 애들 (SKT, KT)
    • mutual cooperation
  • Multi-homing
    • 여러 provider들과 계약하는 것.
    • An AS may have multiple providers

BGP

  • Routing between border routers
    • border(=gateway) router : 다른 AS와 연결된 router
  • eBGP (external BGP)
    • 다른 domain의 border router들 사이의 routing
  • iBGP (internal BGP)
    • 같은 domain의 border router들 사이의 routing

BGP routing

  • Distance vector에서 발전된 형태 (Path vector routing)
  • BGP routing table

    PrefixOrigin ASPath
    128.32.0.0/1612314 56 123
    12334 101 203 123
    128.32.101.0/241550 15
  • table 설명
    • Prefix(128.32.0.0/16)
      • 128.32.0.0 ~ 128.32.255.255가 destination IP address이면,
        걔네들은 123번 AS에 있는 애들이다.
        걔까지 가려면 14번, 56번, 123번 or 34번 101번 203번 123번
        경로를 여러 개 만들어 둘 수 있다.
    • Prefix(128.32.101.0/24)
    • 위에도 속하지만, 더 구체적으로 범위를 잡아서
      여기에 있는 애들은 이걸로 적용해라.
  • BGP router들은 다른 BGP router들에게 route advertisements를 보내준다
    • distance vector routing과 동일
    • path를 전부 적어둬야 한다는 점만 다르다
  • Path information(누구를 지나서 가는지)을 사용하기 때문에 장점이 있다
    • 아래 그림에서 AS500이 AS100에게 정보를 줄 때,
      destination이 180.10.0.0/16인 route는 보내줄 필요가 없다
    • 또한, 특정 AS에게 정보를 줄 때,
      그 AS를 지나가는 route는 보내주지 않는다 (detect loop)

iBGP

  • eBGP와 동일하다
  • 하나의 domain 안에 여러 개의 gateway router가 존재하는데,
    걔네들 사이에서의 routing을 iBGP라고 한다

  • R3
    • R1, R2에게 나를 거쳐서 R4로 가라고 한다
    • R4에게 나를 거쳐서 R1, R2로 가라고 한다
    • R2에게 받은 정보를 R1으로 보내주지 않는다
      • 그림이 좀 헷갈리게 그려졌는데, R1과 R2도 반드시 연결되어있다.
      • R2 must directly hear routes from R1
      • iBGP routers must be fully connected

Policy

  • BGP에는 돈 문제가 걸려 있다 (Providet - Customer)
    • shortes path is often NOT the best path
  • Path는 policy를 기반으로 선택된다
  • Policies on transit traffic
    • Transit traffic : 내 customer로 가지 않는 traffic (지나가는 traffic)
    • Provider는 transit traffic을 받는다
    • Customer와 Peer는 transit traffic을 받지 않는다

  • Green : Valid route
  • Red : Invalid route
  • Summary : traffics go up and then down

Route advertisement

  • 애초에 내 routing table을 advertise할 때, 알려주는 범위가 다르다
  • To customer link (내 customer로 가는 link)
    • 다 알려준다
    • Advertise all routes
  • To provider link (내 provider로 가는 link)
    • 내 customer에게만 알려준다
    • Advertise customers only
  • To peer link (내 peer로 가는 link)
    • 내 customer에게만 알려준다
    • Advertise customers only

Local Preference

Multi-homed AS

  • 여러 개의 provider가 있는 경우,
    어떤 provider를 사용할 지 preference(우선순위)가 있다
  • 둘 다 AS100으로 갈 수 있는데, 하나는 500 하나는 800

Multi-Exit Discriminator (MED)

  • 여러 개의 gateway가 하나의 AS와 연결되어 있다
  • AS201 : 어떤 이유에 의해, AS200에서 오는 애들은 B쪽으로 왔으면 좋겠다
  • B advertise smaller MED compared to A
    (C한테 보낼 때)

1개의 댓글

comment-user-thumbnail
2025년 10월 1일

Managing interdomain routing can be complex, and having reliable routing software is essential to ensure efficient data flow and minimize errors. It helps optimize paths, monitor traffic, and improve overall network performance. More details here: https://www.cleveroad.com/blog/route-optimization-software/

답글 달기