KR20060095676A - Layer structure and method for internal routing in communication system - Google Patents
Layer structure and method for internal routing in communication system Download PDFInfo
- Publication number
- KR20060095676A KR20060095676A KR1020050016464A KR20050016464A KR20060095676A KR 20060095676 A KR20060095676 A KR 20060095676A KR 1020050016464 A KR1020050016464 A KR 1020050016464A KR 20050016464 A KR20050016464 A KR 20050016464A KR 20060095676 A KR20060095676 A KR 20060095676A
- Authority
- KR
- South Korea
- Prior art keywords
- header
- packet
- ethernet
- card
- encapsulation header
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
- H04L45/04—Interdomain routing, e.g. hierarchical routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
본 발명은 특정 네트워크 시스템 내부에 네트워크 프로세서가 있는 경우, 네트워크 프로세서가 필요로 하는 정보를 리눅스(Linux)커널(kernel)에서 생성하는 방안과 라우팅이 종료된 패킷이 리눅스 커널에 도착했을 때, 이 정보를 제거하는 방안에 대한 것이다. 네트워크 프로세서가 특정 시스템 내부에서의 내부 라우팅(Internal Routing)을 수행하기 위해서 필요로 하는 정보는 인캡슐레이션 헤더(Encapsulation Header)라고 명명되는 삼성에서 제안한 패킷 헤더에 포함되며 리눅스 커널에서 생성되고 삭제된다. 패킷 포워딩 및 라우팅을 담당하는 네트워크 프로세서는 인터넷 프로토콜(Internet Protocol : 이하 IP라 함)이나 TCP/UDP(Transmission Control Protocol)/(User Datagram Protocol) 헤더를 보지 않고 인캡슐레이션 헤더만을 이용하여 시스템 내부에서의 패킷 라우팅을 수행한다.According to the present invention, when there is a network processor in a specific network system, a method for generating information required by the network kernel in the Linux kernel and when the packet whose routing is terminated arrives in the Linux kernel are provided. It is about the way to eliminate it. The information needed by the network processor to perform internal routing within a specific system is included in the packet header proposed by Samsung, called the encapsulation header, and created and deleted by the Linux kernel. The network processor responsible for packet forwarding and routing does not look at the Internet Protocol (hereinafter referred to as IP) or TCP / UDP (Transmission Control Protocol) / (User Datagram Protocol) headers. Performs packet routing.
리눅스 커널, 내부 라우팅 Linux kernel, internal routing
Description
도 1은 종래 기술에 따른 통신 시스템 내부 라우팅 시의 통신 프로토콜 헤더 포맷,1 is a communication protocol header format in a communication system internal routing according to the prior art;
도 2는 상기 도 1의 헤더를 생성하는 통신 프로토콜 계층을 도시한 도면,2 illustrates a communication protocol layer generating the header of FIG. 1;
도 3a는 본 발명의 실시 예에 따라 인캡슐레이션 헤더를 삽입한 형태의 통신 프로토콜 헤더 포맷,3A illustrates a communication protocol header format in which an encapsulation header is inserted according to an embodiment of the present invention;
도 3b는 본 발명의 실시 예에 따른 상기 인캡슐레이션 헤더 포맷,3B illustrates the encapsulation header format according to an embodiment of the present invention;
도 4는 본 발명의 실시 예에 따라 통신 장치 내부에서 인캡슐레이션 헤더를 사용하여 라우팅되는 패킷의 흐름도,4 is a flowchart of a packet routed using an encapsulation header inside a communication device according to an embodiment of the present invention;
도 5는 본 발명의 실시 예에 따라 상기 도 4의 제 1경로 상의 통신 프로토콜 스택을 도시화한 도면,5 is a diagram illustrating a communication protocol stack on the first path of FIG. 4 according to an embodiment of the present invention;
도 6은 본 발명의 실시 예에 따라 각각의 처리카드들에 구비된 리눅스 커널의 통신 프로토콜 스택 구조,6 is a communication protocol stack structure of a Linux kernel provided in each processing card according to an embodiment of the present invention;
도 7은 본 발명의 실시 예에 따른 처리카드에 구비된 리눅스 커널에서 패킷을 송신하기 위한 흐름도,7 is a flowchart for transmitting a packet in a Linux kernel provided in a processing card according to an embodiment of the present invention;
도 8은 본 발명의 실시 예에 따른 처리카드에 구비된 리눅스 커널에서 패킷을 수신하기 위한 흐름도.8 is a flowchart for receiving a packet in a Linux kernel provided in a processing card according to an embodiment of the present invention.
본 발명은 통신 장치에서 패킷을 라우팅(Routing)하기 위한 계층 구조 및 방법 그리고 그 시스템에 관한 것으로서, 특히, 통신 장치의 내부 라우팅을 위한 계층구조 및 방법 그리고 그 시스템에 관한 것이다. 일반적인 통신 시스템에서의 라우팅은 크게 인터넷 프로토콜 망을 통해 외부의 호스트와 통신하는 외부 라우팅(External routing)과 인터넷 프로토콜 망을 경유하지 않고 통신 장치 내부로 패킷을 라우팅하는 내부 라우팅(Internal routing)으로 나뉠 수 있다.The present invention relates to a hierarchy and method and system for routing packets in a communication device, and more particularly, to a hierarchy and method and a system for internal routing of a communication device. Routing in a general communication system can be largely divided into an external routing that communicates with an external host through an Internet protocol network and an internal routing that routes a packet into a communication device without passing through an Internet protocol network. have.
일반적인 통신 장치에서는 패킷을 송수신하기 위해 사용자 프로그램에서 생성한 데이터에 통신 프로토콜 헤더를 첨부하여 송신한다. 일반적인 통신 프로토콜 헤더는 인터넷 프로토콜(Internet Protocol : 이하 IP라 함)과 TCP/UDP(Transmission Control Protocol)/(User Datagram Protocol) 및 이더넷(Ethernet)헤더를 예를 들 수 있다.In a general communication apparatus, a communication protocol header is attached to data generated by a user program to transmit and receive a packet. Common communication protocol headers include Internet Protocol (hereinafter referred to as IP), TCP / UDP (Transmission Control Protocol) / (User Datagram Protocol), and Ethernet (Ethernet) headers.
개방형 상호 접속 시스템(Open Systems Interconnection : OSI) 7 계층(Layer)에서 상위 계층인 응용 프로그램(Application)은 송신할 데이터를 생성하여 하위 계층으로 전달하며, 이러한 과정은 운영 체제(Operation System : OS)에 따라 다르게 동작된다.Open Systems Interconnection (OSI) In the seventh layer, the application, the upper layer, generates data for transmission and passes it to the lower layer. This process is transmitted to the operating system (OS). It works differently.
운영 체제는 운영 컴퓨터 또는 장치를 사용 가능하게 만드는 하나 이상의 컴퓨터 프로그램이다. DOS, Windows, Mac, Unix 및 Palm 은 이러한 운영 체제의 한 종류이다.An operating system is one or more computer programs that make an operating computer or device available. DOS, Windows, Mac, Unix, and Palm are one of these operating systems.
본 발명에서는 그러한 운영 체제 중 리눅스(Linux)를 예를 들어서 설명하기로 하겠다. 리눅스는 유닉스(Unix) 운영 체제 계열의 한 종류이며, 퍼스널 컴퓨터를 포함한 각종 컴퓨터 플랫폼(platform)상에서 수행될 수 있다. 리눅스는 유닉스를 무료로, 개방형으로 구현한 것이다. 특히 리눅스 커널(Kernel)의 소스 코드는 일반에게 공개되어 있으며, 그에 따라 리눅스 커널이 점점 향상되고 수정되어지고 있다. In the present invention will be described by taking the Linux (Linux) of such an operating system as an example. Linux is a family of Unix operating systems and can run on a variety of computer platforms, including personal computers. Linux is a free, open implementation of Unix. In particular, the source code of the Linux kernel (Kernel) is open to the public, and the Linux kernel is being improved and modified accordingly.
일반적으로 리눅스를 운영체제로 사용하는 통신 장치에서 패킷을 송신하기 위해서는 최상위 계층인 사용자 프로그램에서 송신하기 위한 실제 데이터를 생성하여 하위의 통신 프로토콜 스택으로 전달하게 되며, 이에 하위의 계층에서는 해당되는 통신 프로토콜 헤더를 붙이게 된다.In general, in order to transmit a packet in a communication device using Linux as an operating system, actual data for transmission from a user program, which is a top layer, is generated and transferred to a lower communication protocol stack. Will be attached.
도 1은 일반적인 리눅스 커널에서 생성하는 프로토콜 헤더를 도시하였으며, 도 2는 상기 도 1의 헤더를 생성하는 통신 프로토콜 계층을 도시한 것이다. 페이로드(payload)(100)는 사용자 프로그램(200)이 생성한 실제 데이터이며, TCP/UDP 헤더(102)는 TCP/UDP 계층(202)에서 TCP/UDP 통신을 하기 위해 상기 데이터 앞에 붙는 헤더이다. IP헤더(104)는 IP 계층(204)에서 IP 통신을 하기 위해 상기 TCP/UDP 헤더 앞에 붙는 헤더이며, 이더넷 헤더(106)는 이더넷(MAC) 계층에서 생성한 헤더 이다.FIG. 1 illustrates a protocol header generated by a general Linux kernel, and FIG. 2 illustrates a communication protocol layer generating the header of FIG. The
그러나 이러한 헤더는 일반적으로 IP 네트워크를 통해 외부의 호스트로 전달하기 위해 사용되며, 네트워크 프로세서는 송신할 패킷의 헤더 정보에 근거하여 통신 장치의 내부로 라우팅 할 것인지 아니면 외부로 라우팅 할 것인지에 대한 결정을 해야한다. 하지만, 이때 상기 네트워크 프로세서가 모든 헤더를 일일이 참조하여 그에 대한 내부 또는 외부 라우팅을 실시하는 것은 네트워크 프로세서의 부하를 증가시키는 문제점이 있다.However, these headers are typically used to forward to an external host over an IP network, and the network processor must decide whether to route internally or externally based on the header information of the outgoing packet. do. However, at this time, if the network processor refers to all headers and performs internal or external routing thereof, there is a problem of increasing the load on the network processor.
그러한, 통신 장치 내부의 IPC(Inter Processor Communications) 경로 상에 네트워크 프로세서(Network Processor)가 있는 경우, 패킷의 흐름에 대해서 네트워크 프로세서가 능동적으로 관여할 수 있다. 능동적으로 관여한다는 의미는 해당 패킷의 헤더 내용에 따라서 패킷의 라우팅에 관련된 흐름을 제어할 수 있다는 의미이다. 하지만, 이때 상기 네트워크 프로세서가 모든 헤더를 일일이 참조하여 그에 대한 내부 또는 외부 라우팅을 실시하는 것은 네트워크 프로세서의 부하를 증가시키는 문제점이 있다.Such a network processor may actively participate in the flow of packets when there is a network processor on an Inter Processor Communications (IPC) path inside the communication device. Actively engaged means that the flow related to the routing of the packet can be controlled according to the header content of the packet. However, at this time, if the network processor refers to all headers and performs internal or external routing thereof, there is a problem of increasing the load on the network processor.
따라서, 본 발명의 목적은, 통신 장치내의 내부 라우팅 시 네트워크 프로세서의 부하를 경감시키는 계층 및 방법을 제공함에 있다. It is therefore an object of the present invention to provide a layer and a method for reducing the load on a network processor during internal routing in a communication device.
본 발명의 다른 목적은, 통신 장치내의 내부 라우팅 시 패킷 라우팅 처리 속도를 증가시키는 계층 및 방법을 제공함에 있다. Another object of the present invention is to provide a layer and a method for increasing the packet routing processing speed during internal routing in a communication device.
상술한 본 발명의 목적들을 달성하기 위한 본 발명의 계층은, 통신 장치 내부에서 패킷을 전송하기 위한 네트워크 계층구조에 있어서, 상기 통신 장치의 내부 라우팅을 수행하기 위한 정보인 인캡슐레이션 헤더(Encapsulation header)를 인터넷 프로토콜 헤더와 이더넷 헤더사이에 구성한다.In order to achieve the above object of the present invention, a layer of the present invention is an encapsulation header which is information for performing internal routing of the communication device in a network hierarchy for transmitting a packet inside a communication device. ) Between the Internet Protocol header and the Ethernet header.
상술한 본 발명의 목적들을 달성하기 위한 본 발명의 방법은, 외부 네트워크로부터 패킷을 수신하는 통신 장치에서 상기 패킷을 처리카드의 사용자 프로그램으로 전송하는 방법에 있어서, 상기 외부 네트워크로부터 수신된 패킷의 인터넷 프로토콜 헤더와 이더넷 헤더 사이에 내부 라우팅을 하기 위해 라인카드에서 인켑슐레이션 헤더를 삽입하여 먹스 카드로 전송하는 제 1과정과, 상기 먹스 카드에서는 상기 인캡슐레이션 헤더 정보를 근거로 해당되는 처리카드로 상기 패킷을 전송하는 제 2과정과, 상기 처리카드에서는 수신된 상기 패킷의 인캡슐레이션 헤더를 삭제하고 정상적인 수신 패킷 처리를 수행하는 제 3과정을 포함한다.A method of the present invention for achieving the above object of the present invention is a method for transmitting the packet to a user program of a processing card in a communication device receiving a packet from an external network, the Internet of packets received from the external network. A first process of inserting an encapsulation header from a line card and transmitting it to a mux card for internal routing between a protocol header and an ethernet header, and from the mux card to a corresponding processing card based on the encapsulation header information; A second process of transmitting the packet, and a third process of deleting the encapsulation header of the received packet from the processing card and performing normal received packet processing.
이하 본 발명의 실시 예를 첨부한 도면을 참조하여 상세히 설명하기로 하겠다. 하기에서 본 발명을 설명함에 있어, 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted.
일반적인 리눅스 커널에서 패킷의 송신 과정을 거치면 상기 도 1과 같이 어플리케이션(Application)에서 생성한 데이터를 페이로드(Payload)로 하여 TCP/UDP, IP 및 이더넷(Ethernet) 헤더가 생성되어 MAC(Medium Access Control) 디바이스를 통해서 패킷이 전송된다.When the packet is transmitted in a general Linux kernel, TCP / UDP, IP, and Ethernet headers are generated by using data generated by an application as a payload as shown in FIG. The packet is sent through the device.
따라서 본 발명에서는 시스템 내부의 IPC 경로상에 존재하는 네트워크 프로세서가 라우팅을 위해 필요로 하는 정보를 표준 헤더인 TCP/UDP, IP 혹은 이더넷 헤더가 아닌 특정하게 제안한 인캡슐레이션 헤더를 제안하도록 하겠다.Therefore, the present invention proposes a specially proposed encapsulation header instead of a standard header, TCP / UDP, IP or Ethernet header, which is required for routing by a network processor existing on an IPC path in a system.
시스템의 네트워크 프로세서가 TCP/UDP, IP, 혹은 이더넷 헤더 사이에 네트워크 프로세서가 필요로 하는 정보인 인캡슐레이션 헤더를 부가할 때의 문제점을 계층별로 살펴보면 하기와 같다.The problem when the network processor of the system adds an encapsulation header, which is information required by the network processor, between the TCP / UDP, IP, or Ethernet headers is as follows.
먼저, TCP/UDP 헤더의 상위에 두는 경우를 살펴보면, 인캡슐레이션 헤더가 TCP/UDP 입장에서는 페이로드가 되는데, 리눅스 커널 입장에서는 이 헤더를 채울 방법이 없고, 반드시 사용자 프로그램(application)에서 채워야 한다. 따라서, 이 경우의 문제점은 사용자 프로그램이 시스템 내부의 라우팅에 필요한 정보를 모두 제공해야 한다는 것인데, TCP/UDP/IP 네트워크 상에서 수행되는 일반적인 사용자 프로그램의 경우 통신 상대(상대방 IP 주소와 포트 번호)만을 알면 통신이 가능하다는 면과 비교해 볼 때, 매우 제한적인 조건이 되므로 불합리하다.First, look at the case above the TCP / UDP header. The encapsulation header is the payload for TCP / UDP. There is no way for the Linux kernel to fill this header, but it must be filled in the user application. . Therefore, the problem with this case is that the user program must provide all the information necessary for routing inside the system. For a typical user program running on a TCP / UDP / IP network, the only known communication partner (the other party's IP address and port number) Compared with the possibility of communication, it is unreasonable because it is a very limited condition.
두 번째로 TCP/UDP 헤더와 IP 헤더사이에 인캡슐레이션 헤더를 두는 경우를 살펴보면, IP 헤더가 패킷의 크기가 가변 길이이므로 TCP/UDP 헤더의 위치가 패킷마다 다르다. 따라서 네트워크 프로세서는 IP 헤더의 길이를 알아낸 이후에 그 길이에 따라서 패킷마다 다른 위치의 TCP/UDP 헤더를 살펴보아야 하는데, 이러한 동작은 패킷 포워딩(Packet Forwarding)을 고속으로 수행하는 네트워크 프로세서의 입장에서는 큰 오버헤드가 되고, 패킷 포워딩 성능을 저하시키게 된다.Secondly, the encapsulation header is placed between the TCP / UDP header and the IP header. Since the IP header has a variable size, the location of the TCP / UDP header differs from packet to packet. Therefore, after determining the length of the IP header, the network processor should look at the TCP / UDP header at different positions according to the length of the packet. This operation is performed by a network processor that performs packet forwarding at a high speed. This is a large overhead, and degrades packet forwarding performance.
따라서, 본 발명에서는 도 3a와 같이 IP 헤더(104)와 이더넷 헤더(106)사이에 인켑슐레이션 헤더(300)를 부가하는 것을 제안한다. 도 3a는 본 발명의 실시 예에 따라 특정 시스템 내부에서의 내부 라우팅(Internal Routing)을 수행하기 위해서 필요로 하는 정보인 인캡슐레이션 헤더(300)가 삽입된 프로토콜 구조를 도시한 것이다. 본 발명에서는 이더넷 프레임 포맷이라는 명칭으로 사용되기도 한다. 이더넷(Eth) 헤더(106)와 IP 헤더(104)사이의 위치에 인켑슐레이션 헤더(300)를 두게 되면, 기존의 TCP/UDP/IP 헤더를 아무 변경 없이 사용할 수 있게 되므로, 사용자 프로그램은 패킷을 수신할 상대를 확인하는 목적지 IP 주소와 포트 번호만을 이용해서 통신할 수 있다. 그리고, 네트워크 프로세서는 가변 헤더인 IP 헤더(104) 하위에 위치하는 고정 위치/고정 크기의 헤더만을 이용하여 라우팅을 수행할 수 있으므로 패킷 포워딩 속도를 향상시킬 수 있다. 여기서 상기 인캡슐레이션 헤더(300)는 네트워크 프로세서가 내부 라우팅을 수행하기 위한 특정 정보이며, 각 통신 장치내부에서만 필요한 정보이므로, IP 네트워크를 통해 외부로 라우팅 되는 패킷은 상기 인캡슐레이션 헤더(300)가 필요 없게 된다.Accordingly, the present invention proposes to add the
도 3b는 본 발명의 실시 예에 따른 상기 인캡슐레이션 헤더 포맷을 도시한 것이며, 상기 도 3b에 도시된 상기 인캡슐레이션 헤더의 각 필드 이름과 그 설명은 하기의 <표 1>에 설명되어 있다.FIG. 3B illustrates the encapsulation header format according to an embodiment of the present invention. Each field name and description of the encapsulation header shown in FIG. 3B are described in Table 1 below. .
도 4는 본 발명의 실시 예에 따라 통신 장치 내부에서 인캡슐레이션 헤더(300)를 사용하여 라우팅되는 패킷의 흐름을 살펴보기로 하겠다.4 is a flow chart of a packet routed using an
본 발명에서 통신 장치라 함은, 라우터 또는 스위칭 장치를 의미하며, IP 네트워크(402a, 402b)에 연결된 호스트(404a, 404b)는 이동 통신망에서의 기지국과 같은 장비를 의미한다. 또한, 본 발명에서 언급하는 통신 장치는 상기 IP 네트워크(402a, 402b)와 물리적으로 연결되어 외부 네트워크와 패킷을 송수신하는 라인카드(Line Card)(406a, 406b)들에는 각각 네트워크 프로세서들(408a, 408b)이 구비되어 있다. 본 발명의 실시 예에서는 두 개의 라인카드만을 도시하였지만, 실제 통신 장치에는 다수 개의 라인카드가 구비되어 있다. 스위칭 카드(410)는 상기 라인카드들에서 수신된 패킷을 스위칭하는 역할을 수행하며, 반대로 먹스(Mux) 카드(412)에서 수신된 패킷을 해당되는 라인 카드로 스위칭 하는 역할을 수행하기도 한다.In the present invention, the communication device means a router or a switching device, and the
본 발명의 실시 예에서는 도시하지 않았지만, 실제 구현된 통신 장치에서는 상기 스위칭 카드(410)와 네트워크 프로세서(NP)들이 실장된 라인카드들(406a, 406b)과 처리카드들(414, 416, 418)은 각각 하나의 보드로 구성되어 슬롯(Slot)형태로 쉘프(Shelf)에 실장되게 된다.Although not shown in the embodiment of the present invention, in the actual communication device, the
먹스 카드(412)는 상기 스위칭 카드(410)에 의해 수신된 패킷을 해당되는 각각의 처리 카드(Processing card)(414, 416, 418)들에게 분산하는 역할을 수행하며, 반대로 처리 카드(414, 416, 418)들에서 수신된 패킷을 어느 라인카드의 어느 링크로 출력할지를 결정하는 출력 경로를 결정하여 스위칭 카드(410)에게 알려주는 역할을 수행한다. 상기 먹스 카드(312)는 내부에 이더넷 스위치(412a)와 네트워크 프로세서 3(412b)를 구비하고 있으며, 상기에서 언급한 바와 같이 패킷의 출력 경로를 결정하는 것은 네트워크 프로세서3(412b)에서 수행하며, 각각의 처리 카드 및 상기 통신 장치의 내부 라우팅은 이더넷 스위치(412a)에서 하게 된다. 도 4에서 상기 처리카드들도 세 개만 도시되어 있지만, 실제로는 다수개의 처리카드들이 존재하게 된다.The
상기 도 4에 도시된 통신 장치(400)에 구비된 상기 처리카드(414, 416, 418)들은 상기 호스트(404a, 404b)들이 요청한 호 설정에 관련된 역할을 수행하기도 한다. 또한, 각 처리카드(414, 416, 418)들에는 운영체제가 구비되어 있으며, 본 발명의 실시 예에서는 리눅스를 그 예로 들어 설명하기로 하겠다. 상기 처리카드들(414, 416, 418)들에는 각각 중앙처리장치(414a, 416a, 418a)들이 구비되어 있으며, 각 중앙처리장치들(414a, 416a, 418a)은 통신 장치가 시동될 시에 해당 운영체제를 로딩하게 되는데, 본 발명의 실시 예에서는 하드웨어 관점이 아닌 통신 프로토콜 계층관점에서 설명하기로 하겠다. 또한, 각각의 처리카드들(414, 416, 418)에는 데이터 베이스(414b, 416a, 418b)들이 구비되어 있는데, 이는 본 발명의 실시 예에 따라 라우팅 테이블이 저장되어 있다.The
본 발명에서는 상기 각 처리 카드(414, 416, 418)들의 리눅스 커널에서 내부 라우팅 헤더인 인켑슐레이션 헤더(Encapsulation Header : EH)(300)를 생성하고 삭제한다. 리눅스 커널에서부터 물리계층을 통해 외부로 전송되는 패킷에 대해서는 IP 헤더(104)와 이더넷 헤더(106)사이의 고정된 위치에 16바이트 고정 크기의 인캡슐레이션 헤더(300)를 생성하는 모듈을 구비하였다. 그리고 물리계층을 통해 외부로부터 수신된 패킷에 대해서는 송신 측에서 부가한 인캡슐레이션 헤더(300)를 삭제하는 루틴을 리눅스 커널내부에 구현하였다. 이렇게 함으로써 사용자 프로그램은 인캡슐레이션 헤더(300)의 존재 여부에 무관하게 동작할 수 있으며, 네트워크 프로세서에게는 빠른 포워딩 성능을 보장할 수 있다.In the present invention, an encapsulation header (EH) 300, which is an internal routing header, is generated and deleted in the Linux kernel of the
도 5는 본 발명의 실시 예에 따라 상기 도 4의 제 1경로(420) 상의 통신 프로토콜 스택을 도시화한 것이다. FIG. 5 illustrates a communication protocol stack on the
외부 네트워크(402b)를 통해 수신된 데이터 패킷의 구조는 종래 통신 프로토콜과 같이 상기 도 1에 도시된 바와 같은 형식을 취하고 있다. 데이터(500)는 송신 측에서 생성한 실제 송신 정보이며, TCP/UDP(502), IP(504)는 상기 도 1에서 설명하한 바와 동일함으로 설명을 생략하기로 하겠다. 이더넷 헤더(Eth)(506)는 해당 라인 카드2(406b)의 실제 물리적 주소를 담고 있으며, 이더넷 헤더(506)는 최종 목적지에 도착하기까지 경유하게 될 장치의 주소를 담고 있으며, 고정적이지 않다. 라인카드2(406b)에서는 상기 네트워크(402b)에서 수신된 데이터 패킷의 TCP/UDP(502) 계층의 16비트 크기의 UDP정보를 근거로 해당되는 처리카드2(416)의 포트 번호를 확인하여 EH(508)를 만들어 IP 헤더(504)와 이더넷 헤더(510) 사이에 첨부한다. 이때 상기 라인카드 2(406b)에서는 먹스카드(412)의 물리적 주소를 이더넷 헤더(510)로 설정하게 된다. 먹스카드(412)에서는 상기 라인카드2(406b)가 생성한 EH(508)을 근거로 해당되는 처리카드의 이더넷 헤더를 생성하게 되는데, 본 발명의 실시 예에서는 처리카드2(416)가 목적지이므로, 처리카드2(416)의 물리적 주소를 이더넷 헤더(512)를 생성하여 처리카드2(416)로 전송하게 된다. 그러면, 처리카드 2(416)에서는 수신된 패킷의 이더넷 헤더(512)를 보고 자신에게 제대로 수신된 패킷임을 인지하면, 리눅스 커널에서 정상적인 패킷 수신이 이루어지도록 netif_rx() 커널 함수를 호출한다. 상기 netif-rx() 커널 함수는 상기 EH(508)를 근거로 이더넷 헤더(512)의 타입 필드(도시되지 않음)를 복원한 후 EH(514)를 제거한다. 그 이유는 인캡슐레이션 헤더(300) 내부에 이더넷 헤더의 타입(Type) 필드 값이 저장되어 있어, 상기 타입 필드 값을 원래의 이더넷 타입 값으로 치환해야만 본 발명의 실시 예에 따라 인캡슐레이션 헤더(300)가 제거되고 난 이후의 프레임 포맷이 인캡슐레이션 헤더가 삽입되기 이전의 프레임 포맷과 동일해 질 수 있기 때문이다. The structure of the data packet received via the
지금까지는 외부 네트워크 망을 통해 수신되는 패킷의 내부 라우팅을 설명하였는데, 그 반대의 경우인 처리카드에서 생성한 데이터를 라우팅 하기 위한 방법을 설명하기로 하겠다. 이의 경우도 도 4를 참조하여 설명하기로 하겠다. 상기 도 4의 제 2경로(420)가 통신 장치(400)의 처리카드 1(414)에서 생성된 데이터의 외부 라우팅 경로이다. 상기 처리카드1 (414)의 리눅스 커널에서는 사용자 프로그램이 생성한 패킷을 송신하기 위해 본 발명의 실시 예에 따라 IP 헤더와 이더넷 헤더사이에 EH를 삽입하게 되는데, 먼저, 본 발명의 실시 예에서는 통신 장치(400) 내부 프로세서간 IPC를 위한 경우와, 통신 장치(400) 내부 프로세서와 네트워크 망을 통해 외부 프로세서간의 IPC를 위한 인터페이스 이렇게 두 개를 구비한다.Up to now, the internal routing of packets received through an external network has been described. On the contrary, a method for routing data generated from a processing card will be described. This case will also be described with reference to FIG. 4. The
만일 내부 프로세서간 IPC를 위한 경우라면, 이더넷 스위치(412a)에서 상기 처리카드 1(414)의 리눅스 커널이 생성한 이더넷 헤더(106)의 정보를 근거로 목적지 처리카드로 바로 송신을 하게 된다. 반면 내부 프로세서와 외부 프로세서간의 IPC인 경우가 상기 제 2경로(422)인데, 이 경우에는 상기 처리카드 1(414)의 리눅스 커널에서 생성된 EH의 정보를 근거로 스위칭카드(410)에서 라인카드1(402a)로 출력하여 외부 네트워크로 전송되게 된다. 이때 상기 처리카드 1(414)의 리눅스 커널에서는 라우팅 테이블이 저장된 데이터 베이스(414b)를 근거로 EH를 만들게 된다.If the internal processor is for IPC, the
도 6은 본 발명의 실시 예에 따라 각각의 처리카드들(414, 416, 418)에 구비된 리눅스 커널의 통신 프로토콜 스택 구조이다. 사용자 프로그램(600)은 실제 전송할 데이터를 생성하는 부분이며, 소켓(Socket)(602)은 일반적인 리눅스 프로그래밍에서 데이터를 송신하기 위해 생성하는 부분이다. 상기 소켓(602)를 통해 상기 사용자 프로그램(600)에서 생성된 데이터는 TCP/UDP 계층(604)과 IP 계층(606)을 통과하면서, 상기 프로토콜 스택에 해당되는 헤더가 첨부되며, 본 발명의 실시 예에서 첨부된 EH 계층(610)을 거치게 된다. 이때 상기 EH 계층(610)에서는 상기 사용자 프로그램(600)이 송신할 데이터를 생성하면서, 특정 정보(전달한 내부 프로세서간 IPC 인지 내부와 외부 프로세서간의 IPC인지 또는 어느 라인카드의 어느 링크로 전달할 것인지에 대한 정보들)를 넘겨받아 EH 헤더를 작성하게 된다. 그 후 이더넷 계층(610)에서는 상위 계층에서 생성된 패킷을 전송할 장치의 물리적인 주소(MAC 주소)를 생성하고, 최하위 계층인 물리 계층(612)로 전송하여 외부로 전달하게 된다. 지금까지는 패킷을 송신하는 경우에 대해서만 살펴보았지만, 하기에서 패킷을 수신할 시의 과정에 대해서도 살펴보기로 하겠다.6 is a communication protocol stack structure of the Linux kernel provided in each of the
만일, 최하위 계층인 물리계층(612)으로 패킷이 수신된다면, 이더넷 계층(6120)에서 이더넷 헤더를 제거하고, 이 패킷이 EH를 가지는 패킷임을 알게되며, EH 계층(608)으로 전달된다. 그리고, EH 계층(608)에서는 수신된 패킷의 EH를 보고 원래의 이더넷 헤더의 타입 필드를 복원한다. 그 이유는 인캡슐레이션 헤더(EH)가 제거되고 난 이후에 원래의 이더넷 프레임 포맷을 완전히 복원해야 하기 때문이다. 송신할 때에 인캡슐레이션 헤더를 부가하는 과정에서 원래의 이더넷 타입은 인캡슐레이션 헤더에 저장하고 이더넷 타입은 EH_TYPE으로 바뀌게 된다. 정확히는 ETH_P_EH라는 값으로 바뀌게 된다. 따라서, 상기 이더넷 프레임 포맷을 수신할 때에는 EH 계층(608)에서 ETH_P_EH라는 이더넷 타입 필드 값을, 인캡슐레이션 헤더에 저장된 원래의 이더넷 타입으로 복원하는 과정을 거쳐야 한다. 여기서, 상기 ETH_P_EH는 상수 값이고 구체적으로는 16진수 070A라는 값이다.If a packet is received at the
상기 복원된 이더넷 헤더의 상위 패킷 타입(예를 들어, ETH_P_IP 혹은 ETH_P_IPV6)정보를 근거로 ARP(Address Resolution Protocol) 또는 IP 계층이나 EH 계층에서 처리해야하는지 여부를 검사한다. 여기서, 상기 ETH_P_IP 혹은 ETH_P_IPV6 값들은 리눅스에서 사용하는 단순한 상수 값이며 이더넷 헤더의 타입 필드에 포함될 수 있다. 용도는 이더넷 상위의 계층이 어떤 프로토콜인지를 표시하기 위해서 리눅스에서 사용한다. 예를 들어, 이더넷 헤더의 타입 필드가 ETH_P_IP(16진수 0800)는 이더넷 다음에 IP가 처리되어야 한다는 의미-IP 처리 루틴이 호출됨-이고, ETH_P_ARP(16진수 0806)는 이더넷 다음에 ARP가 처리되어야 한다는 의미이다. 즉, ARP 처리 루틴이 호출된다. 본 발명에서는 인캡슐레이션 헤더를 부가할 때 이 값들을 ETH_P_EH로 변화시키는데, 이는 이더넷 다음에 인캡슐레이션 헤더가 처리되어야 한다는 것을 의미한다. 즉, 인캡슐레이션 헤더 처리 루틴이 호출되도록 리눅스를 수정한 것이다. 그 후, 인캡슐레이션 헤더 처리 루틴은 인캡슐레이션 헤더를 제거하고 난 이후, 다시 IP나 ARP가 처리되도록 해 주기 위해서 인캡슐레이션 헤더에 저장되어 있는 본래의 이더넷 타입 필드 값을 복원시키게 된다.It is checked whether the ARP (Address Resolution Protocol) or the IP layer or the EH layer should be processed based on the higher packet type (eg, ETH_P_IP or ETH_P_IPV6) information of the restored Ethernet header. Here, the ETH_P_IP or ETH_P_IPV6 values are simple constant values used in Linux and may be included in the type field of the Ethernet header. Usage is used by Linux to indicate which protocol is the upper layer of Ethernet. For example, the type field in the Ethernet header is ETH_P_IP (0800 hexadecimal), which means that the IP should be processed after Ethernet—the IP processing routine is called; I mean. That is, the ARP processing routine is called. In the present invention, when adding an encapsulation header, these values are changed to ETH_P_EH, which means that the encapsulation header must be processed after Ethernet. In other words, Linux has been modified to call the encapsulation header handling routine. The encapsulation header processing routine then removes the encapsulation header and then restores the original Ethernet type field value stored in the encapsulation header to allow the IP or ARP to be processed again.
만일 ARP 나 IP 계층에서 처리해야 한다면, 종래와 같은 방식으로 수신된 패킷을 처리하지만, EH 계층에서 처리해야 한다면, 정상적인 패킷 수신처리가 이루어지도록 netif_rx() 커널 함수를 호출한다. 그 후, EH 계층(608)에서는 상기 이더넷 헤더의 복원된 상위 패킷 타입을 근거로 정상적인 커널의 패킷 수신 경로를 찾는다. 이후, IP 계층(606)과 TCP/UDP 계층(604)과 소켓 계층(602)을 거쳐 처음 송신단의 사용자 프로그램에서 생성된 패킷이 recvmsg(), recv() 혹은 recvfrom() 소켓 시스템 호출(call)을 통해서 그대로 수신단의 사용자 프로그램(600)으로 전송된다.If the ARP or IP layer has to process the packet in the same way as the conventional method, but if the EH layer has to process, the netif_rx () kernel function is called for normal packet reception. The EH
도 7은 본 발명의 실시 예에 따른 처리카드에 구비된 리눅스 커널에서 패킷을 송신하기 위한 흐름도이다.7 is a flow chart for transmitting a packet in the Linux kernel provided in the processing card according to an embodiment of the present invention.
700단계에서 사용자 프로그램(600)에서 송신할 데이터를 생성한다. 702단계에서 사용자 프로그램(600)은 sendmsg(), send(), sendto()와 같은 일반적인 리눅스 소켓 시스템(602)을 호출하여, 패킷을 하위 계층으로 전송한다. 이때 사용자 프로그램(600)은 시스템 외부의 프로세서로 상기 데이터를 송신할 경우, 소켓 시스템 호출(602)을 통하여 어떤 라인카드의 어떤 링크를 통해서 외부 네크워크로 패킷을 전송할지 여부를 커널로 넘겨주며, 이러한 정보는 인켑슐레이션 헤더(EH) 계층(608)으로도 전달된다. 704단계에서 소켓(602) 호출을 통해 TCP/UDP 계층(604)에서 TCP/UDP 헤더가 첨부되는데, 이때 RAW 소켓을 사용할 수도 있다. 그리고, 706단계에서는 IP 계층(606)에서 상기 TCP/UDP 헤더 앞에 IP 헤더가 첨부된다. 708단계에서 EH 계층(608)으로 수신된 패킷에는 상기 IP 계층(606)에서 생성된 IP 헤더의 앞부분에 16바이트 크기의 EH 공간을 마련한다. 710단계에서 EH 계층(608)에서는 전 단계에서 마련된 16바이트 크기의 인캡슐레이션 헤더(EH)공간에 대해서 인캡슐레이션의 각 필드에 라우팅에 필요한 값을 설정하는데, 그 방식은 패킷의 IP목적지 주소에 따라서, 상기 각 처리카드의 데이터 베이스(414b, 416b, 418b)에 저장된 내부 라우팅 테이블을 검색하여 인캡슐레이션 헤더의 모든 필드를 채운다. 그 후 물리 계층(610)의 디바이스 드라이버(Device Driver) 함수를 호출한다. 여기서 상기 내부 라우팅 테이블을 검색하는 키(key)값은 패킷의 목적지 IP 주소가 될 수도 있고, 상기 702단계에서 사용자 프로그램(600)이 커널로 내려준 통신 장치의 외부 인터페이스 링크에 대한 특정 정보가 될 수도 있다. 712단계에서 이더넷(MAC) 계층에서는 리눅스 커널의 ARP에 의해서 인식한 패킷의 목적지의 IP 주소에 대응되는 이더넷 주소를 이용하여 이더넷 헤더를 부가한다. 714단계에서 물리 계층(612)에서는 상기 이더넷 계층(614)에서 생성된 주소를 근거로 패킷을 송신한다.In
도 8은 본 발명의 실시 예에 따른 처리카드에 구비된 리눅스 커널에서 패킷을 수신하기 위한 흐름도이다. 800단계에서 물리 계층(612)에 패킷이 수신되면, 802단계로 진행하여, 이더넷 계층(610)에서 이더넷(Eth) 헤더를 제거한다. 이때 리눅스 커널에서는 이더넷 헤더의 상위 패킷 타입(ETH_P_EH)을 보고 이 패킷이 EH를 갖는 패킷임을 알 수 있다. 그러면, 804단계에서는 EH 계층(608)에서 수신된 패킷의 EH를 근거로 상기 이더넷 헤더의 타입 필드(Type field)를 복원한다. 그 후 806단계에서 상기 EH 계층(608)에서는 상기 EH를 제거하고, 808단계에서 정상적인 패킷 수신 처리가 이루어질 수 있도록 netif_rx() 커널 함수를 호출한다. 810단계에서 EH 계층(608)에서는 복원된 이더넷 헤더의 상위 패킷 타입(예를 들어, ETH_P_IP, ETH_P_IPV6)을 이용해서 정상적인 커널의 패킷 수신 경로를 찾는다. 812단계에서 IP 계층(606)에서는 하위 계층 즉, EH 계층(608)에서 수신된 패킷의 IP 헤더를 제거하며, 또한 ARP 요구 일 경우 해당 ARP 절차를 수행하기도 한다. 814단계에서는 TCP/UDP 계층(604)에서 상기 IP 계층(606)에서 수신된 패킷의 TCP/UDP 헤더를 삭제하고, 소켓 계층(602)으로 전송한다. 이때 생성하는 소켓은 TCP 일 경우에는 IPPROTO_TCP 이며, IP 일 경우에는 IPPROTO_UDP, RAW일 경우에는 IPPROTO_RAW이다. 816단계에서 소켓 계층(602)에서는 recvmsg(), recv() 또는 recvfrom() 소켓 시스템 호출을 통해 그대로 사용자 프로그램(600)으로 전송된다.8 is a flowchart for receiving a packet in the Linux kernel provided in the processing card according to an embodiment of the present invention. When the packet is received at the
한편 본 발명의 상세한 설명에서는 구체적인 실시 예에 관해 설명하였으나, 본 발명의 범위에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능함은 물론이다. 그러므로 본 발명의 범위는 설명된 실시 예에 국한되어 정해져서는 안되며 후술하는 특허청구의 범위뿐 아니라 이 특허청구의 범위와 균등한 것들에 의해서 정해져야 한다.Meanwhile, in the detailed description of the present invention, specific embodiments have been described, but various modifications are possible without departing from the scope of the present invention. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined not only by the scope of the following claims, but also by the equivalents of the claims.
따라서, 상술한 바와 같이 본 발명은 통신 장치내의 라우팅에 필요한 정보를 운영체제의 커널에서 생성하므로 통신 장치 내부의 네트워크 프로세서의 부담을 경감시켜 네트워크 프로세서의 패킷 포워딩(forwarding) 성능을 높일 수 있다.Therefore, as described above, the present invention generates information necessary for routing in the communication device in the kernel of the operating system, thereby reducing the burden on the network processor inside the communication device and improving the packet forwarding performance of the network processor.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020050016464A KR20060095676A (en) | 2005-02-28 | 2005-02-28 | Layer structure and method for internal routing in communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020050016464A KR20060095676A (en) | 2005-02-28 | 2005-02-28 | Layer structure and method for internal routing in communication system |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20060095676A true KR20060095676A (en) | 2006-09-01 |
Family
ID=37625246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020050016464A KR20060095676A (en) | 2005-02-28 | 2005-02-28 | Layer structure and method for internal routing in communication system |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20060095676A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023090482A1 (en) * | 2021-11-18 | 2023-05-25 | 주식회사 우리넷 | Method for transmitting/receiving protocol packet by using linux-based packet processor in distributed packet transport network |
-
2005
- 2005-02-28 KR KR1020050016464A patent/KR20060095676A/en not_active Application Discontinuation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023090482A1 (en) * | 2021-11-18 | 2023-05-25 | 주식회사 우리넷 | Method for transmitting/receiving protocol packet by using linux-based packet processor in distributed packet transport network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6714985B1 (en) | Method and apparatus for efficiently reassembling fragments received at an intermediate station in a computer network | |
US7630368B2 (en) | Virtual network interface card loopback fastpath | |
CN101217493B (en) | TCP data package transmission method | |
US7068656B2 (en) | Packet routing apparatus and a method of routing a packet | |
JP4230663B2 (en) | Packet header reduction in wireless communication networks | |
US7289509B2 (en) | Apparatus and method of splitting a data stream over multiple transport control protocol/internet protocol (TCP/IP) connections | |
EP1565826B1 (en) | Network interface and protocol supporting mappings of virtual memory locations at different processing devices | |
US7984163B2 (en) | Method and system for optimizing DNS queries | |
US20060274787A1 (en) | Adaptive cache design for MPT/MTT tables and TCP context | |
US20090238209A1 (en) | Method for transmitting fragmented packets, communication system, and tunnel equipment | |
US9445384B2 (en) | Mobile device to generate multiple maximum transfer units and data transfer method | |
WO2000054467A1 (en) | System and method for distributing packet processing in an internetworking device | |
US7269661B2 (en) | Method using receive and transmit protocol aware logic modules for confirming checksum values stored in network packet | |
CN107787570A (en) | Light weight transportation protocol | |
CN108076066B (en) | Method and device for protecting GRE (generic routing encapsulation) message | |
CN107888710A (en) | A kind of message forwarding method and device | |
CN116055586B (en) | Fragment message matching method, router and storage medium | |
US20100238930A1 (en) | Router and method of forwarding ipv6 packets | |
US20060187922A1 (en) | Packet communication device | |
KR20060095676A (en) | Layer structure and method for internal routing in communication system | |
US20070147376A1 (en) | Router-assisted DDoS protection by tunneling replicas | |
CN117376233A (en) | Data processing method, device and system | |
CN113709016B (en) | Communication system, communication method, communication apparatus, communication device, and storage medium | |
CN111314447B (en) | Proxy server and method for processing access request thereof | |
JPWO2005050935A1 (en) | Intrusion detection device and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WITN | Withdrawal due to no request for examination |