새소식

반응형
CS 지식/네트워크

[네트워크] 18. Introduction to Network Layer

  • -
반응형

Communication at Network Layer

주소를 설정하고 경로를 설정하는 것이 핵심 기능 (addressing, routing)

 

18.1 Network Layer Services

  • Packetizing
    • (transport layer로 부터 오는 정보를)Encapsulating and decapsulating(data-link layer로부터 오는 packet을) the payload
  • Routing and Forwarding
    • Routing is applying strategies and running some protocols to create the decision-making tables for each router (경로 배정, decision making)
    • Forwarding as the action applied by each router when a packet arrives at one of its interfaces

Network Layer: Other Services

  • Error control
    • Error detection and correction
  • Flow control(압력 조절)
    • Regulating the amount of data can send without overwhelming the receiver
    • No flow control in the network layer of Internet
  • Congestion control
  • Quality of Service (QoS)
  • Security

사실 위 기능들은 network layer에서도 하긴 하지만 transport layer에서 주로 이루어지는 부분이 많다.

 

Wide Area Network and Switching Methods

  • network에 존재하는 많은 단말들(End systems)
  • ISP가 공유하는 장치들을 이용해서 적절히 그때그때 스위칭을 해서 경로를 배정하고 그 때마다 제한된 자원을 공유해 간다.
  • 인터넷에서 packet switching를 사용
  • 전화망은 circuit switching을 사용
  • IP(Internet Protocol)은 Datagram approach 사용

 

Circuit Switching

  • Create a real circuit (dedicated line) between source and destination
    • 전화를 걸고 연결이 되면 연결이 끊길 때 까지 연결이 되어 있는
    • 중요한 자원 하나하나가 할당되는 방식
  • Physical layer technology

18.2 Packet Switching: Datagram Approach

  • 인터넷에서는 정보가 다니는 단위가 packet
  • Connectionless Service(연결 X)
    • sender에서 receiver로 packet들이 독립적으로 그때그때 마다의 가장 좋은 경로로 보내진다.
  • Mostly used in the network layer
  • Routing (selecting the best route for a packet) is performed at each router
  • 어떠한 packet이 전달될 때 그 전에 전달 되었던 packet이 지나갔던 경로와 무관하게 가는 방식

  • Forwarding process in a router when used in connectionless network
    • forwarding table의 내용이 바깥 망의 상황 변화에 따라서 update되게 되면 처음에 갔던 길과도 다른 길로 갈 수 있는 것.
    • (어떻게 table이 만들어지는 지는 20장에서 배움)

  • 트래픽 상황에 따라 그 때 그 때마다 좋은 port로 가기 때문에 forwarding table의 내용은 업데이트 되는 경우가 왕왕 있을 것이다.

Q) 그러면 굳이 table이 필요한가?

 

Packet Switching: Virtual Circuit Approach

  • Connection-Oriented Service: Packets are switched along a pre-determined path from source to destination
    • 처음 보낼 당시 가장 best 경로로 미리 설정
  • Flow Label (or Virtual Circuit Identifier; VCI): To define the virtual path the packet should follow
  • Virtual-circuit packet-switched network
  • 처음에 경로를 설정하는 단계와 데이터를 모두 보내고 난 후 경로를 끊는 과정이 잇따름.
  • 해당 경로가 별로 좋지 않은 경로가 되더라도 계속 그 경로로만 보내야 함.

Three Phases in Virtual Circuit Network

  • Setup, data transfer, teardown

  • datagram 방식은 오로지 data transfer 단계만 존재

 

Forwarding Process in a Router

  • virtual circuit 방식의 경우 사전에 경로를 설정하는데 어떤 방식으로 하는가?
    • packet에 사전 setup 단계에서 만들어진 label이 붙게 된다. (flow label or virtual circuit identifier)
    • source address나 destination address를 통해 forwarding 하는 것이 아님!!!!!!!!

 

Setup Phase: Request Packet

  • Sending request packet in a virtual-circuit network

  • A -> B 라는 정보를 가진 packet이 router를 거치면서 forwarding table마다 해당 packet에 대해서 Label 값을 임의로 붙여주게 된다.
    • router가 판단하여 자기가 사용하지 않는 unique 한 값으로 설정

 

Setup Phase: Acknowledgement Packet

  • Sending acknowledgements in a virtual-circuit network

  • B에 도착하게 되면 ok 사인으로 R4에게 Label값을 설정하게 한다.
    • 이 값은 outgoing 값이 됨에 주의

 

Data Transfer Phase

  • Flow of one packet in an established virtual circuit

  • 보편적으로 사용되는 인터넷은 connectionless의 packet swiching - datagram 방식을 사용하지만 중간 인프라를 들여다보면 빠른 스위칭과 빠른 전송을 위해서 virtual circuit swiching 방식을 일부 사용하기도 한다.

 

18.3 Network Layer Performance

  • Measured in terms of Delay, Throughput, Packer loss, Congestion control
  • Delay
    • Transmission delay (Delaytr) = (packet length)/(Transmission rate)
      • 1Mbit/10Mbps = 0.1s
      • 불가피한 delay
    • Propagation delay (Delaypg) = (Distance)/(Propagation speed)
      • 불가피한 delay
    • Processing delay (Delaypr): Time required to process a packet in a router or a destination host
      • 고속의 hardware 장치로 줄일 수 있음
    • Queuing delay (Delayqu): Time a packet waits in input and output queues in a router
    • When we have n routers,
      • Total delay = (n+1) (Delaytr + Delaypg + Delaypr) + (n) (Delayqu)
        • 처음에 sender가 transmission하는 시간(1) + n번의 router delay => n+1
        • 각각의 n번의 router => queuing delay
    • delay를 줄이기 위한 지속적인 노력이 필요함(propagation delay를 줄이긴 힘듦; 속도를 빠르게 하기는 어렵기 때문)

 

Network Layer Performance: Throughput

throughput: 단면을 잘랐을 때 1초에 몇 bit가 지나가는가 -> transmission rate

  • Throughput at any point in a network is defined as the number of bits passing through the point in a second, which is actually the transmission rate of data at that point
  • Throughput = minimum {TR1, TR2, … TRn}

  • 특정 link의 throughput이 낮게 되면 해당 구간에서 bottleneck(병목 현상)현상이 일어나게 된다. -> 나쁜 throughput 야기
    • 즉, minimum TR이 throughput에 영향

 

Network Layer Performance: Throughput

  • Access network and backbone in Internet
    • access network는 비교적 느리기 때문에(동네 도로 느낌) bottleneck이 된다고 볼 수도 있지만, 고속도로(backbone)는 막히는데 동네 도로는 안 막히는 경우가 있는 것처럼
    • TR1, TR2가 100kbps일 때, 가입자(단말)의 수가 거의 100개에 다를 정도로 많다면 600kbps를 100개의 단말이 나눠 쓰는 것이기 때문에 고속도로가 더 막히는(60kbps) 현상이 발생하기도 한다.
    • 즉, backbone이 bottleneck이 될 수도 있음
  • Effect of throughput in second links

Network Layer Performance

  • Packet Loss
    • Severely affect the performance
    • Limited size of input buffer in a router: drop(버려지고) and resent(다시 보내짐)
      • 이것들이 성능을 저하 시킴
    • 그럼 언제 input queue가 꽉차게 될까?
      • 트래픽이 많아지면 -> router가 할 일이 많아짐
  • Congestion control
    • Congestion at the network layer is not explicitly addressed in the Internet model
    • Congestion at the network layer is related to two issues, throughput and delay
    • TCP protocol이 다양한 congestion control을 수행함

Congestion Control

  • Open-Loop Congestion Control
    • 스스로 판단하여 혼잡이 발생하기 전 방지(prevent)하는 정책
    • Retransmission policy, Window policy
    • Acknowledgement policy(그 때마다? 한 번에 묶어서?), Discarding policy(버리는 방식)
    • Admission policy (받아들이는 방식)
  • Closed-Loop Congestion Control
    • feedback 정보에 의해서 해결
      • 혼잡이 발생한 후 혼잡을 완화(alleviate)
    • Backpressure, Choke packet(19장에서 자세히 다룸, choke packet이 보내는 feedback을 통해 source가 보내는 데이터의 양을 줄임)
      • 혼잡이 발생했다는 사실을 Backpressure 함.
    • Implicit signaling/Explicit signaling
      • ack를 delay를 주어 보내서 혼잡한 사실을 알린다.

18.4 IPv4 Addresses(매우 중요)

  • The identifier used in the IP layer of the TCP/IP protocol suite to identify the connection of each device to the Internet is called the Internet address or IP address
  • An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet
  • The IP address is the address of the connection, not the host or the router
    • connection에 대한 주소이기 때문에 접속을 끊었다가 재접속을 하는 경우 다른 주소를 받게 될 것이다.
    • 현재 인터넷에 접속된 connection의 주소
      • 인터넷을 다시 접속하면 끊겼다가 새로운 주소를 다시 할당받게 됨.
  • Address Space: 232 or 4,294,967,296; 42억개 (more than four billion)

Hierarchy in Addressing

  • Divided into two pars: prefix and suffix
  • A prefix can be fixed or variable length
  • Fixed-length network prefix -> classful addressing
  • Variable-length network prefix -> classless addressing
    • 요즘에 사용하는

  • prefix는 연결된 특정 network를 나타내고
  • suffix는 network내의 연결된 단말들의 connection과 관련된 것을 나타낸다.
  • 회사를 network라고 봤을 때 회사에 대한 정보가 prefix에 들어있다면 회사 내 연결된 단말들의 connection에 대한 것은 suffix로 구분되는 것이다.

 

Classful Addressing

인터넷 초창기의 방법

  • Five classes with fixed-length prefix: A, B, C, D, and E
  • Address depletion(주소 고갈): many addresses are remaining unused in classful addressing
    • 가령, A class를 받은 경우, 사용 가능한 단말의 갯수가 24bit 만큼 엄청 많아(2^24) 사용되지 않는 부분이 발생할 것이기 때문에 손해이다.
  • To alleviate address depletion: Subnetting and supernetting (잘게 쪼개기, 합치기)

A: 00000000 ~ 01111111

B: 10000000 ~ 10111111

B: 11000000 ~ 11011111

B: 11100000 ~ 11101111

B: 11110000 ~ 11111111

 

Classless Addressing

  • With the growth of the Internet, a larger address space was needed
  • Long-term solution: IPv6
  • Short-term solution: classless addressing with IPv4
    • fix-legnth -> Variable-length blocks in classless addressing

  • Prefix length: Slash notation(/n)
  • CIDR (Classless Interdomain Routing) strategy

  • Information extraction in classless addressing

Example 18.1 & 18.2

  • Example 18.1(중요)

  • 32개를 사용 가능(64~95)
  • 마지막 5bit는 00000~11111 일 것이기 때문에 첫 주소와 마지막 주소를 알 수 있는 것이다.
  • 27bit가 prefix, 5bit가 suffix

 

  • Example 18.2: Another way "Address Mask"
    • Address: 167.199.170.82, Mask: 255.255.255.224

11111111.11111111.11111111.11100000

  • 앞의 27bit를 1로 하는 mask를 만들어서
  • NOT(mask) + 1을 하면 address의 갯수가 나온다. -> 100000(32)
  • 첫번째 주소: (address) AND (mask)
  • 마지막 주소: (address) OR (NOT mask)

 

Example 18.3

  • Address 230.8.24.56 (11100110.00001000.00011000.00111000)

/숫자 에 따라서 first address와 last address를 구할 줄 알아야 함.

주소에서 앞의 몇 bit를 masking하고 나머지를 0으로 다쓰고 1로 다 썼으면 first address와 last address가 나오고 이를 통해 block size를 쉽게 알아낼 수 있음.

  • prefix: 29 -> mask=111.... .11111000
  • address: 8 개
  • first: mask AND address -> 230.8.24.56
  • last: address OR ~mask -> 230.8.24.63

bit연산이 중요!

classless를 통해 우리가 원하는 만큼 prefix를 가변시켜 만들 수 있다.

 

Network Address

  • Important in routing a packet to the destination network

  • 여러 개 network - 한 건물(비마관)에 존재하는 router에 묶인 여러 개의 네트워크로 생각(3층: 전통과, 4층: 컴공과 ...)
  • prefix를 제외한 나머지를 masking 시키면 first address를 알아낼 수 있다. 그래서 network address를 destination address로부터 찾아내서 알맞은 곳으로 보낸다(forwarding).
    • packet 하나 들어오면 packet header에 들어있는 목적지 주소를 통해서 network address를 찾아내고 그 address가 무엇이냐에 따라 1번으로 내보낼 지 m번으로 내보낼 지를 찾아내는 것이다.
    • packet forwarding

 

Subnetting

  • Designing subnets
    • The number of addresses(N) in each subnet should be a power of 2
      • 2N
      • 반드시 2의 거듭제곱 수만큼 주소가 할당된다.
    • Prefix length for each subnetwork : nsub = 32 - log2Nsub, where Nsub = Assigned number of address to each subnetwork
      • N=256일 때, prefix = 24bit
    • The starting address in each subnetwork should be divisible by the number of addresses in that subnetwork

 

Example 18.5

  • An organization is granted a block of addresses with the beginning address 14.24.74.0/24. The organization needs to have 3 subblocks of addresses to use in its three subnets: one subblock of 10 addresses, one subblock of 60 addresses, and one subblock of 120 addresses. Design the subblocks.
    • prefix = 24, suffix = 8
      • 0~255 -> 256개의 주소를 나눠 가질 수 있음
    • 3개의 subblock으로 나눠주고 싶음, 세 개의 subblock은 각각 10개, 60개, 120개의 주소로 구성되길 원할 때 subblock을 design 하라.

sol) 아래에서 풀이 함.

 

Example 18.5

  • There are 232– 24 = 256 addresses in this block. The first address is 14.24.74.0/24; the last address is 14.24.74.255/24. To satisfy the third requirement, we assign addresses to subblocks, starting with the largest and ending with the smallest one.(큰 것부터 작은 것 순서대로; 120 -> 60 -> 10)
    • 14.24.74.00000000 ~ 14.24.74.01111111 (0~127)
    • 이를 통해 120개의 주소가 필요한 조직에 128개의 주소(subnet)를 할당하였다.
    b. The number of addresses in the second largest subblock, which requires 60 addresses, is not a power of 2 either. We allocate 64 addresses. The subnet mask for this subnet can be found as n2 = 32 − log2 64 = 26. The first address in this block is 14.24.74.128/26; the last address is 14.24.74.191/26.
    • 14.24.74.10000000 ~ 14.24.74.10111111 (128~191)
    c. The number of addresses in the largest subblock, which requires 10 addresses, is not a power of 2. We allocate 16 addresses. The subnet mask for this subnet can be found as n3 = 32 − log2 16 = 28. The first address in this block is 14.24.74.192/28; the last address is 14.24.74.207/28.
    • 14.24.74.11000000 ~ 14.24.74.11001111 (192 ~ 207)
  • a. The number of addresses in the largest subblock, which requires 120 addresses, is not a power of 2. We allocate 128 addresses. The subnet mask for this subnet can be found as n1 = 32 − log2 128 = 25. The first address in this block is 14.24.74.0/25; the last address is 14.24.74.127/25.

Address Aggregation

  • subnetting의 반대 방식
    • 여러 개의 작은 주소를 묶는 것
  • One of the advantages of the CIDR strategy
  • Address summarization or routing summarization

64짜리(26 prefix) 4개를 묶어서 하나의 256짜리(24 prefix)로 합칠 수 있다.

  • 비마관이든 참빛관이든 옥의관이든 한울관이든 이것들은 다 광운대다 판단하여 하나로 묶는 것
  • 그래서 외부로부터 올 때 광운대의 자세한 건물의 주소가 무엇인지까지는 몰라도 되고 우선 larger block(광운대)으로 먼저 오고 그 이후에 small block 중 가야할 곳(ex. 참빛관)을 찾아서 forwarding 하는 방식이다.

 

Special Address

  • This-host address: 0.0.0.0/32
    • source address가 자신의 주소를 모를 때
  • Limited-broadcast address: 255.255.255.255/32
    • 32bit를 전부 1 -> broadcast, 특정 범위 안에 있는 모두에게 보내는 address
    • 전세계에 다 보내는 것은 아니다 보니 Limited가 붙음
  • Loopback address: 127.0.0.0/8
    • 내가 바깥으로 나가는 지를 확인하기 위해서 자기 자신한테 다시 돌아오는 것
  • Private address: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16
    • 사설 주소, 주소가 고갈 됐을 때 단말을 붙이는(?),
  • Multicast address: 224.0.0.0/4
    • classful addressing에서 D class addressing
    • 여러 명의 수신자가 있는 경우we

 

IPv4 주소의 한계가 보여 인터넷 주소를 좀 더 효율적으로 쓰는 방안을 찾아냄 -> DHCP, NAT

어떻게 해야 늘어나는 단말에 한정적인 IPv4 주소를 효과적으로 할당할 지

DHCP

  • Dynamic Host Configuration Protocol
  • Address assignment can be done automatically using DHCP
  • Application-layer protocol, using the client-server paradigm
  • 예전에는 컴퓨터를 한 번 사면 IP가 계속 고정적으로 할당됨
    • 앞으로도 그 IP만 사용해야 하는 것
  • 필요한 단말에게만 동적으로 IP를 할당함

DHCP Operation

  • 어떤 클라이언트가 인터넷에 접속하고 싶으면 해당 IP주소가 필요함.
  • 자기는 IP주소가 없으므로 DHCPDISCOVER라는 packet을 자기 domain 내에 쭉 뿌린다.(broadcast)
  • 예를 들어, 참빛관 7층에 DHCP access point 등에 들어왔을 때 이를 받은 server는 DHCPOFFER를 보낸다.
    • 이 때 주소를 새로 할당하여 보내주는데 이를 broadcast로 보내서 요청을 보낸 단말 뿐 아니라 범위 내의 모든 DHCP server에게도 전달되어 할당된 주소의 알림 역할도 한다.
  • 주소를 할당 받은 단말은 해당 주소를 사용하겠다고 다시 DHCPREQUEST를 보내어 모두에게 해당 IP를 받았다는 사실을 알린다.
    • 이 때, 전달 받은 주소를 사용하여 source address를 자기가 할당 받은 주소를 사용한다.
  • 마지막으로 server가 OK 사인(DHCPACK)을 보내면서 마무리된다.

 

FSM for DHCP Client

  • client 관점에서의 DHCP FSM(순서도)
    1. DHCPDISCOVER
    2. DHCPOFFER
      • offer가 여러 단말에게서 온 경우 offer를 select 한다.
    3. Select Offer/DHCPREQUEST
    4. DHCPACK가 오면 BOUND 상태가 됨
      • BOUND -> 그 IP 주소를 사용하게 되었다.
      • 기본적으로 lease time 동안 사용 가능 (이 예제에서는 3600초, 1시간)
    5. 3600초(Lease time)의 절반이 지나면 다시 DHCPREQUEST를 보냄(refresh)
    6. 그런데 어떠한 이유로 절반 이상(87.5%)이 지나도록 응답이 없으면 다시 DHCPREQUEST를 한다.
      • 그 후 ACK를 받으면 Bounding이 되고 그 이후로도 계속 절반이 지날 때마다 Renewing 과정을 진행해 나간다.
    7. 그런데 87.5%가 지났는데도 응답(ACK)이 없으면 Lease time을 초과하게 되고 DHCP NACK(binding을 끊는)
  • HDCP server 입장에서는 IP주소가 주기적으로 refresh가 안되면 해당 컴퓨터에 문제(정전, power off)가 있거나 더이상 쓰지 않는다고 판단하고 할당된 해당 IP를 회수해 와야 하는 것(그래야 다른 사람이 쓰니까)
    • 다른 사람이 또 써야 하기 때문에!!(한정된 IPv4)

 

Network Address Translation (NAT)

"PORT"

  • Mapping between the private and universal(public) addresses
    • private 한 address를 쓰되 바깥망에 나갈 때는 NAT를 지원하는 router를 통해 universal(unique)한 address로 나가도록 mapping 해 주는 것
  • To use a set of private addresses for internal communication and a set of global Internet addresses (at least one) for communication with the rest of the world.
  • network 주소를 private과 universal 사이를 통역을 해 주는 역할을 하는 것이 NAT의 기능이다.

Address Translation

  • NAT를 지원하는 router 안에는 translation table이 존재하여 private address와 universal address를 각각 mapping 해 줌.
  • 그런데 만약에 universal IP주소가 하나밖에 없다면 집에 있는 수 많은 단말이 각자의 IP주소를 가질 것인데 밖으로 나갈 때는 하나의 IP주소만을 사용해야 하기 때문에 여러 개 단말이 동시에 외부로 나가는 경우 하나의 단말밖에 사용하지 못하는 것이다.

 

Translation Table

  • Using one IP address

  • Using a pool of IP addresses(외부로 나가는 IP 주소의 개수가 정해져 있는 pool을 사용)
  • Using both IP addresses and port addresses
    • 우편 배달망에 비유하자면 IP address는 집 주소, port address는 받는 사람이다.

  • 외부로 나갈 때 같은 주소로 나갈 수 있는데 port number를 달리하여 나가게 된다.
  • 외부로부터 응답이 왔을 때 port number를 봐서 어떤 private address에 해당하는 지 구분할 수 있게 된다.
  • 단점(한계)
    • NAT violates(손상) the basic IP model. Thousands of machines can be represented by one IP address
      • IP model 개념을 손상
        • 단말마다 unique하게 갖는 IP의 의미가 사라짐
    • NAT breaks end-to-end connectivity mode of Internet
      • Since mapping in NAT is set up by outgoing packets, incoming packets cannot be accepted until after outgoing ones
      • mapping table이 만들어지기 위해서는 먼저, 바깥으로 나가는 outgoing이 setup되지만 packet이 outgoing이 되지 않으면 반대로 자발적으로 바깥에서 들어오는 것이 되지 않는다.
        • outgoing 되는 단말이 없으면 incoming이 스스로 디바이스로 바로 들어오는 것은 안됨.

Q) 그럼 사실상 port랑 엮으면 무한대로 쓸 수 있는 거 아닌가?

 

18.5 Forwarding of IP Packets

  • Forwarding means to place the packet in its route to its destination
  • When a host has a packet to send or when a router has received a packet to be forwarded, it looks at the forwarding table to find the next hop to deliver the packet
  • Based on destination address

Example 18.7

  • 노란 영역이 광운대의 각각의 건물이라고 하면 각각의 알맞은 건물로 forwarding 해야 하는데 목적지 주소가 광운대가 아닐 수도 있다.
    • 그런 경우 m0, m1, m2, m3가 모두 아닐 때는 무조건 바깥으로 나가도록 설정한다. 이는 default 값으로 외부망과 연결하면 된다.
    • 그 때 그러기 위해서는 먼저 m2로 내보내야 하고 그 이후에는 스위치를 거쳐 바깥으로 나갈 것이다.
  • 시험문제: 위와 같은 네트워크 그림을 주고 R1의 table을 만들어 보아라

  • Forwarding table for R1 : in case of 180.70.65.140(destination address)

 

  • 두 번째 network address를 보면 /25이기 때문에 7bit의 suffix를 갖으므로 IP address의 마지막 부분이 128~255까지 사용할 수 있다.
    • 따라서 destination address의 마지막은 140이기 때문에 이에 해당하게 된다.
  • 180.70.65.140/25 를 masking 하면
    • 10001100 AND 10000000 -> 이는 128이므로 m0 interface에 딱 걸리게 된다.

 

Address Aggregation

  • address aggregation
    • 광운대의 4개의 건물이 있을 때,
    • 140.24.7.0/24 -> 광운대 건물 a,b,c,d 하나하나가 있는 것이 아니라 광운대 전체가 된다.
    • 그래서 routing table R2에다가 4개를 모두 넣을 필요없이 140.24.7.0/24 를 하나만 넣어주면 된다.
      • 무슨 건물이든 m0로 나가야 하기 때문
      • 시간을 아낄 수 있음(개별적으로 찾아야 하는 시간이 없어지기 때문에 )
    • R1에서는 /26으로 그제서야 세부적인 건물의 주소를 보고 나누어 져서 가면 된다.
    • R2를 보면 알 수 있지만 광운대 쪽으로 가는 것이 아니라면 0.0.0.0 (바깥 망; by default)으로 나가도록

 

Longest Mask Matching

예제 18.7을 살짝 변형

  • 한 건물(연구관)만 따로 떨어져 있는 경우를 생각해 보자.

  • 연구관이 아니라면 /24로 바로 보낸다.
    • 그것도 아니라면 바깥으로 보냄
  • 그래서 가장 긴 것부터 순서대로 해야 함.(첫번째에서 결정되면 두번째는 확인하지 않는다.)
    • 140.24.7.200 is arrived at R2
      • R2 table의 첫번째에서 바로 filtering 되어 연구관으로 가게 된다.
        • 140.24.7.192/26 -> 192~255이므로 200인 address는 바로 mapping
    • If 140.24.7.0/24 is located the first line of the forwarding table, what happen?(근데 순서가 바뀌면?)
      • 140.24.7.0/24 -> 0~255 이므로 200인 address가 여기서도 걸려버리는 문제가 생긴다.
    • 따라서 forwarding table은 순서가 있기 때문에 만약 /24가 맨위로 간다면 R2(연구관)로 들어오는 데이터 조차도 곧바로 광운대 캠퍼스로 보내버리게 되는 문제가 있다.

 

Hierarchical Routing

  • 계층적 구조를 갖는 것이 routing table의 size를 대폭 줄일 수 있는 이점이 있기 때문에 대부분의 라우터들이 주소를 할당할 때 계층적 구조를 갖는다.
  • 중계동 하계동의 주소만 갖고 있으면 각 동의 세세한 주소가 필요없이 /20만 가지고 해당 동 전체는 다 Regional ISP에서 그 동으로 가게 한다.
    • 각각의 router들의 routing entry의 숫자가 계층적 구조를 갖게되면 훨씬 더 짧게 된다.
    • 성능을 계산하는 데 결정적인 역할을 함.
    • address aggregation 개념의 계층적 구조를 갖도록 주소 체계를 관리하고 있음.

 

Forwarding Based on Label

  • In a connection-oriented network (virtual-circuit approach), a switch forwards a packet based on the label attached to the packet
  • Routing is normally based on searching the contents of a table; switching can be done by accessing a table using an index
  • Forwarding based on destination address

  • 인터넷의 중심망에서는 굉장히 많은 packet이 존재하기 때문에 이런식으로 처리한다면 시간을 소비하여 비효율적이기 때문에 datagram 방식이 아닌 connection oriented network(Virtual-circuit) 방식을 사용한다.

 

Forwarding Based on Label

  • A simple example of using a label to access a switching table

  • label value를 가지고 switching table에 접근하기 때문에 순차적인 것이 아니라 즉각적으로 반응한다.(hardware 처리에 용이)
  • traffic이 많은 고속도로와 같은 곳에서 하나하나 routing table을 찾아가서 순차적으로 확인하여 mapping 하는 방식은 매우 비효율적이다.
    • 그래서 virtual circuit 방식의 label 기반으로 하면 빠른 성능을 가져올 수 있다.

 

Multi-Protocol Label Switching (MPLS)

  • When behaving like a router, MPLS can forward the packet based on the destination address
  • When behaving like a switch, it can forward a packet based on the label
  • MPLS header made of s stack of labels

  • MLPS header에는 바로 위 그림과 같은 구조체가 붙게 된다.
    • setup 과정을 통해 label이 붙고
    • Exp: 실험적인 과정
    • TTL: time to leave(packet's life cycle)
      • 몇 개의 route까지 거칠 수 있는지?
  • label이 계층적 구조를 가질 수 있도록 stack에 저장된다.
  • multi stack을 통해 여러 개의 label을 통해서 hierarchy route와 같은 hierarchical switching도 가능하도록 설계가 되어있다고 이해하면 된다.
반응형
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.