[go: up one dir, main page]

JP2001189729A - Layer three switch - Google Patents

Layer three switch

Info

Publication number
JP2001189729A
JP2001189729A JP37208499A JP37208499A JP2001189729A JP 2001189729 A JP2001189729 A JP 2001189729A JP 37208499 A JP37208499 A JP 37208499A JP 37208499 A JP37208499 A JP 37208499A JP 2001189729 A JP2001189729 A JP 2001189729A
Authority
JP
Japan
Prior art keywords
packet
unit
cpu
switch
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP37208499A
Other languages
Japanese (ja)
Other versions
JP3508057B2 (en
Inventor
Masateru Hayashida
正輝 林田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Engineering Ltd
Original Assignee
NEC Engineering Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP37208499A priority Critical patent/JP3508057B2/en
Publication of JP2001189729A publication Critical patent/JP2001189729A/en
Application granted granted Critical
Publication of JP3508057B2 publication Critical patent/JP3508057B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce useless data transfer by dividing an interrupt into two according to processing factors and controlling a data transfer size in the case of transferring packet data to a main memory so as to be processed by a CPU. SOLUTION: This switch consists of a PHY 500, a MAC 510, an address solving part 520, a search memory 530, a switch engine 540, a packet memory 550, the CPU 560 and a main memory 570. The part 520 includes a DMA transferring part 524 and a receiving buffer 525 in addition to a packet controlling part 521, an address retrieving part 522 and a CPU interrupting part 523.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はレイヤ3スイッチ、
特にネットワーク分野におけるレイヤ3スイッチの制御
方式の改良に関する。
TECHNICAL FIELD The present invention relates to a layer 3 switch,
In particular, the present invention relates to improvement of a control method of a layer 3 switch in a network field.

【0002】[0002]

【従来の技術】最初に、レイヤ3スイッチの概要につい
て説明する。図3に、一般的なレイヤ3スイッチの構成
図を示す。レイヤ3スイッチとは、IP(Internet Pr
otocol)パケットおよびIPX(Internetwork Packet
Exchange)パケット等のレイヤ3(ネットワーク層)
のアドレスを持つパケット(図4のパケットフォーマッ
ト参照)を、高速にスイッ チングし、サブネット(例
えばサブネットAおよびサブネットB)間を中継するネ
ットワーク中継装置である。レイヤ3スイッチが開発さ
れる以前におけるレイヤ3パケットのスイッチングは、
ルータ内のソフトウェア処理により行われていた。これ
に対し、レイヤ3スイッチは、ルータと同等の機能を持
ち、更にスイッチング処理を専用ASICによりハードウ
ェア化することにより、スイッチング動作を高速に行う
ことを可能とする。
2. Description of the Related Art First, an outline of a layer 3 switch will be described. FIG. 3 shows a configuration diagram of a general layer 3 switch. Layer 3 switch means IP (Internet Pr
otocol) and IPX (Internetwork Packet)
Exchange) Layer 3 (network layer) of packets etc.
Is a network relay device that switches a packet having an address (see the packet format in FIG. 4) at a high speed and relays it between subnets (for example, subnet A and subnet B). Before the development of the layer 3 switch, the switching of the layer 3 packet is as follows.
This was done by software processing in the router. On the other hand, the layer 3 switch has a function equivalent to that of a router, and furthermore, realizes a high-speed switching operation by realizing switching processing by hardware using a dedicated ASIC.

【0003】パケットのフォーマットを図4に示す。MA
C(Media Access Control:媒体アクセス制御)アドレ
スとは、Ethernetにおけるデータリンク層のアドレスの
ことである。IPアドレスとは、TCP/IPプロトコ
ルで通信を行うためのユニークなアドレスである。ARP
(Address Resolution Protocol:アドレス解決プロ
トコル)とは、宛先IPアドレスから宛先MACアドレス
を見つけ出すプロトコルである。
FIG. 4 shows the format of a packet. MA
The C (Media Access Control) address is an address of a data link layer in Ethernet. The IP address is a unique address for performing communication using the TCP / IP protocol. ARP
(Address Resolution Protocol) is a protocol for finding a destination MAC address from a destination IP address.

【0004】従来技術の構成を図5のブロック図を参照
しながら説明する。この従来技術は、PHY(Physical L
ayer Protocol:物理層プロトコル)300、MAC31
0、アドレス解決部320、サーチメモリ330、スイ
ッチエンジン340、パケットメモリ350、CPU36
0およびメインメモリ370より構成される。ここで、
アドレス解決部320は、パケット制御部321、アド
レス検索部322、CPU割込部323および割込要因レ
ジスタ324を含んでいる。スイッチエンジン340
は、スイッチ制御部341およびパケットメモリ制御部
342を含んでいる。また、CPU360は、処理装置3
61、割込検出部362およびDMA(DirectMemory Acc
ess)転送部363を含んでいる。メインメモリ370
には、パケット格納エリア371がある。更に、パケッ
ト制御部321、パケットメモリ制御部342、DMA転
送部363、処理装置361およびパケット格納エリア
371は、CPUインタフェース380により相互接続さ
れている。CPU割込部323および割込検出部362も
相互接続されている。また、パケット制御部321およ
びスイッチ制御部341は、スイッチインタフェース3
90により接続され、ネットワークから送られてきたパ
ケットのスイッチング処理を行う。サーチメモリ330
は、アドレス検索部322に接続されている。パケット
メモリ350は、パケット制御部342に接続されてい
る。
The configuration of the prior art will be described with reference to the block diagram of FIG. This conventional technology uses a PHY (Physical L
ayer Protocol: physical layer protocol) 300, MAC 31
0, address resolution unit 320, search memory 330, switch engine 340, packet memory 350, CPU 36
0 and a main memory 370. here,
The address resolution unit 320 includes a packet control unit 321, an address search unit 322, a CPU interrupt unit 323, and an interrupt factor register 324. Switch engine 340
Includes a switch control unit 341 and a packet memory control unit 342. Further, the CPU 360 includes the processing device 3
61, an interrupt detection unit 362 and a DMA (DirectMemory Acc
ess) The transfer unit 363 is included. Main memory 370
Has a packet storage area 371. Further, the packet controller 321, the packet memory controller 342, the DMA transfer unit 363, the processing device 361, and the packet storage area 371 are interconnected by a CPU interface 380. The CPU interrupt unit 323 and the interrupt detection unit 362 are also interconnected. Also, the packet control unit 321 and the switch control unit 341
90, and performs switching processing of packets sent from the network. Search memory 330
Are connected to the address search unit 322. The packet memory 350 is connected to the packet control unit 342.

【0005】PHY300は、ネットワークからパケット
を受信した場合に、パケットをシリアルデータからパラ
レルデータへ変換する。また、送信の場合には、パラレ
ルデータからシリアルデータへ変換してネットワークへ
送信する。MAC310は、パケットデータのエラーチェ
ック等を行う。アドレス解決部320において、パケッ
ト制御部321は、MAC310とのインタフェース制
御、スイッチインタフェース制御、アドレス検索指示お
よびCPU割込指示を行う。アドレス検索部322は、サ
ーチメモリ330のアドレス検索を行う。CPU割込部3
23は、アドレス解決部320において検出するCPU
宛パケット、宛先不明パケット等の割込要因をCPU36
0へ送る。割込要因レジスタ324には、割込要因が格
納されている。
[0005] When receiving a packet from the network, the PHY 300 converts the packet from serial data to parallel data. In the case of transmission, the data is converted from parallel data to serial data and transmitted to the network. The MAC 310 performs packet data error checking and the like. In the address resolution unit 320, the packet control unit 321 performs interface control with the MAC 310, switch interface control, an address search instruction, and a CPU interrupt instruction. The address search unit 322 performs an address search of the search memory 330. CPU interrupt unit 3
23 is a CPU detected by the address resolution unit 320
CPU 36 determines the cause of interrupts such as packets addressed to
Send to 0. The interrupt factor register 324 stores an interrupt factor.

【0006】スイッチエンジン340において、スイッ
チ制御部341は、スイッチインタフェース制御、CPU
インタフェース制御およびスイッチ制御を行う。パケッ
ト制御部342は、パケットメモリ350の制御を行
う。このパケットメモリ350には、受信したパケット
が格納されている。CPU360において、処理装置36
1はCPUインタフェースの制御およびDMA転送指示を行
う。割込検出部362は、CPU360に対する割込を検
出する。DMA転送部363は、パケットメモリ330お
よびメインメモリ370間のDMA転送を行う。
[0006] In the switch engine 340, the switch control unit 341 includes a switch interface control and a CPU.
Performs interface control and switch control. The packet control unit 342 controls the packet memory 350. The packet memory 350 stores received packets. In the CPU 360, the processing device 36
1 controls the CPU interface and issues a DMA transfer instruction. The interrupt detection unit 362 detects an interrupt to the CPU 360. The DMA transfer unit 363 performs a DMA transfer between the packet memory 330 and the main memory 370.

【0007】従来技術の動作を、図5のブロック図およ
び図6のフローチャートを参照して説明する。ネットワ
ークからパケットを受信すると(ステップ400)、PH
Y300からMAC310を介して、アドレス解決部320
のパケット制御部321が受信する(ステップ401)。
アドレス解決部320のパケット制御部321をスイッ
チインタフェース390を介してスイッチエンジン34
0に転送する。このスイッチエンジン340に送られた
パケットは、スイッチ制御部341に送られ、パケット
メモリ制御部342によりパケットメモリ350に格納
される(ステップ402)。これと同時に、パケット制
御部321は、受信したパケットの宛先IPアドレスがサ
ーチメモリ330に登録されているか検索させるために
アドレス検索部322に指示する。そこで、アドレス検
索部322は、サーチメモリ330に宛先IPアドレスが
既に登録されているか否か検索する(ステップ40
3)。
The operation of the prior art will be described with reference to the block diagram of FIG. 5 and the flowchart of FIG. Upon receiving a packet from the network (step 400), PH
Address resolution unit 320 from Y 300 via MAC 310
Received by the packet control unit 321 (step 401).
The packet control unit 321 of the address resolution unit 320 is connected to the switch engine 34 via the switch interface 390.
Transfer to 0. The packet sent to the switch engine 340 is sent to the switch control unit 341 and stored in the packet memory 350 by the packet memory control unit 342 (step 402). At the same time, the packet control unit 321 instructs the address search unit 322 to search whether the destination IP address of the received packet is registered in the search memory 330. Therefore, the address search unit 322 searches whether the destination IP address is already registered in the search memory 330 (Step 40).
3).

【0008】サーチメモリ330の検索の結果、宛先I
Pアドレスが検出されるとステップ413で装置宛のパ
ケット(RIP、OSPF等のルータ間でやりとりされ
るプロトコルパケット)であるか、「CPU宛パケット」
(以下、「CPU宛パケット」という)か判断する。また
検索結果がサーチメモリ330には登録されていない場
合には、アドレス検索部322は「宛先不明パケット検
出」(以下、「宛先不明パケット」という)としてパケ
ット制御部321に通知する(ステップ404)。パケ
ット制御部321は、CPU割込部323に対してCPU割込
を要求する。CPU割込部323は、CPU360に割込を発
生させる(ステップ405)。
As a result of the search in search memory 330, destination I
If the P address is detected, it is determined in step 413 whether the packet is a packet addressed to the device (a protocol packet such as RIP or OSPF exchanged between routers) or a “packet addressed to the CPU”.
(Hereinafter, referred to as “packet addressed to CPU”). If the search result is not registered in the search memory 330, the address search unit 322 notifies the packet control unit 321 as "unknown destination packet detection" (hereinafter, "unknown destination packet") (step 404). . The packet control unit 321 requests the CPU interruption unit 323 for a CPU interruption. The CPU interrupt unit 323 causes the CPU 360 to generate an interrupt (Step 405).

【0009】CPU360内の割込検出部362は、この
割込を認識すると、処理装置361に通知する。処理装
置361は、DMA転送部363に対してパケットメモリ
350に格納されているパケットを、メインメモリ37
0内のパケット格納エリア371に格納するために、DM
A転送を起動し実行させる(ステップ406)。DMA転送
が完了するとDMA転送部363は、処理装置361に完
了通知する。次に、処理装置361は、アドレス解決部
320の割込要因レジスタ324を読み出し(リード)
して、受信パケットが「CPU宛パケット」であるか「宛
先不明パケット」であるかを調べる(ステップ407、
408)。
When the interrupt detection unit 362 in the CPU 360 recognizes this interrupt, it notifies the processing unit 361. The processing device 361 transfers the packet stored in the packet memory 350 to the DMA transfer unit 363,
0 to be stored in the packet storage area 371 in the
A transfer is activated and executed (step 406). When the DMA transfer is completed, the DMA transfer unit 363 notifies the processing device 361 of the completion. Next, the processing device 361 reads (reads) the interrupt factor register 324 of the address resolution unit 320.
Then, it is determined whether the received packet is a “packet addressed to the CPU” or a “destination unknown packet” (step 407,
408).

【0010】アドレス解決部320で「宛先不明パケッ
ト」と判定された場合には、CPU360は、ARP処理を行
い宛先IPアドレスに対応する宛先MACアドレスを入手す
る(ステップ409)。パケット格納エリア371内に
ある宛先MACアドレス、発信元MACアドレスの書き換えを
行う(ステップ410)。書き換え後、CPU360は、
パケットをパケットメモリ350に転送して格納する
(ステップ411)。そして、パケットメモリ350か
ら該当する送信ポートに対してパケットを出力する(ス
テップ412)。
When the address resolution unit 320 determines that the packet is an unknown destination packet, the CPU 360 performs ARP processing to obtain a destination MAC address corresponding to the destination IP address (step 409). The destination MAC address and the source MAC address in the packet storage area 371 are rewritten (step 410). After rewriting, the CPU 360
The packet is transferred to and stored in the packet memory 350 (step 411). Then, the packet is output from the packet memory 350 to the corresponding transmission port (step 412).

【0011】[0011]

【発明が解決しようとする課題】従来の技術において、
CPUへの割込は、「宛先IPアドレスがルータ自身のも
の。即ちCPU処理を必要とするパケット(CPU宛パケッ
ト)」の場合と、「アドレス検索を行い該当する宛先IP
アドレスがなく、CPU360にARP処理を依頼する(宛先
不明パケット)」為に割込を行う場合の2種類に大別さ
れる。受信パケットが、「CPU宛パケット」の場合に
は、パケットの全てのデータをメインメモリ370に転
送する必要があるのに対して、「宛先不明パケット」場
合には、受信パケットの全てのデータを転送する必要は
なく、ヘッダ部分の64Byteがあれば十分である。しか
し、従来技術では、CPU割込要因に関係なく全てのパケ
ットをメインメモリ370に転送していた。
SUMMARY OF THE INVENTION In the prior art,
The interruption to the CPU is performed when the destination IP address is that of the router itself, that is, a packet that requires CPU processing (a packet addressed to the CPU).
An interrupt is performed for requesting an ARP process to the CPU 360 without an address (destination unknown packet). When the received packet is a “packet addressed to the CPU”, all the data of the packet needs to be transferred to the main memory 370. On the other hand, when the received packet is “unknown destination packet”, all the data of the received packet are transferred. There is no need to transfer, and it is enough if there is 64 bytes in the header part. However, in the related art, all the packets are transferred to the main memory 370 regardless of the CPU interrupt factor.

【0012】CPU割込で処理される殆どのパケットは、
「宛先不明パケット」であり、「CPU宛パケット」の発
生頻度と比較して非常に高い。その為、パケットの全デ
ータをメインメモリ370に転送する時間が無駄になる
問題が発生する。また、レイヤ3スイッチの性能指標の
1つである「アドレス学習性能(1秒間に何件の新規ア
ドレスを学習できるかを示す性能)」を著しく低下させ
る要因ともなっていた。また、メインメモリへの不必要
なデータ転送のために、パケットメモリ350のアクセ
ス回数を増加させ、ひいてはレイヤ3スイッチング性能
を低下させる要因となっていた。
Most packets processed by the CPU interrupt are:
This is "unknown destination packet", which is extremely high compared to the frequency of occurrence of "packet addressed to CPU". Therefore, there is a problem in that the time required to transfer all data of the packet to the main memory 370 is wasted. Also, this is one of the factors that significantly lowers "address learning performance (performance indicating how many new addresses can be learned per second)" which is one of the performance indexes of the layer 3 switch. In addition, unnecessary data transfer to the main memory increases the number of accesses to the packet memory 350, which in turn causes a reduction in layer 3 switching performance.

【0013】[0013]

【発明の目的】従って、本発明の主な目的は、受信した
パケットがアドレス検索により登録されていない宛先IP
パケット、即ち「宛先不明パケット」を受信した場合に
は、アドレス書き換えに必要なデータのみをメインメモ
リに転送することにより無駄なデータ転送を削減し、ア
ドレス学習性能向上を図るレイヤ3スイッチを提供する
ことである。
SUMMARY OF THE INVENTION Accordingly, a main object of the present invention is to provide a destination IP address for which a received packet is not registered by an address search.
When a packet, that is, a "destination unknown packet" is received, only a data necessary for address rewriting is transferred to the main memory, thereby reducing unnecessary data transfer and providing a layer 3 switch for improving address learning performance. That is.

【0014】[0014]

【課題を解決するための手段】本発明は、複数のPHY、
複数のMAC、アドレス解決部、サーチメモリ、スイッチ
エンジン、パケットメモリ、メインメモリおよびこれら
とCPUインタフェースを介して相互接続されたCPUで構成
され、アドレス解決部は、パケット制御部、サーチメモ
リに接続されたアドレス検索部およびCPUに割込をかけ
るCPU割込部を含むレイヤ3スイッチであって、アドレ
ス解決部は、パケット制御部に接続され且つ受信パケッ
トのヘッダ部を格納する受信バッファと、パケット制御
部およびCPUインタフェース間に接続され、受信バッフ
ァからのパケットデータをメインメモリへDMA転送するD
MA転送部を含む。
The present invention comprises a plurality of PHYs,
It is composed of a plurality of MACs, an address resolution unit, a search memory, a switch engine, a packet memory, a main memory and a CPU interconnected with these via a CPU interface.The address resolution unit is connected to a packet control unit and a search memory. A Layer 3 switch including an address search unit and a CPU interrupt unit for interrupting the CPU, wherein the address resolution unit is connected to the packet control unit and stores a header of the received packet; D that is connected between the unit and the CPU interface and that performs DMA transfer of packet data from the receive buffer to main memory
Including MA transfer unit.

【0015】本発明の好適実施形態例によると、受信バ
ッファは、受信パケットのヘッダ部分の64Byteを格納
する。CPUは、処理部と、アドレス解決部のCPU割込部に
接続された割込検出部と、この割込検出部から転送され
たパケットのIPアドレスを調べる割込検査部とを含む。
また、メインメモリは、パケット格納エリアに加えて、
パケット判定エリアを有し、パケット格納エリアに格納
されたパケットがCPU宛パケットか宛先不明パケットか
を表示する。更に、スイッチエンジンは、スイッチイン
タフェースを介してアドレス解決部のパケット制御部に
接続されたスイッチ制御部と、パケットメモリに接続さ
れたパケットメモリ制御部とを含む。
According to the preferred embodiment of the present invention, the receiving buffer stores 64 bytes of the header portion of the received packet. The CPU includes a processing unit, an interruption detection unit connected to the CPU interruption unit of the address resolution unit, and an interruption inspection unit for examining an IP address of a packet transferred from the interruption detection unit.
In addition to the packet storage area, the main memory
It has a packet determination area, and indicates whether a packet stored in the packet storage area is a packet addressed to the CPU or a packet whose destination is unknown. Further, the switch engine includes a switch control unit connected to a packet control unit of the address resolution unit via a switch interface, and a packet memory control unit connected to a packet memory.

【0016】[0016]

【発明の実施の形態】次に、本発明の上述したおよびそ
の他の目的、特徴および利点を明確にすべく、添付図を
参照して、本発明によるレイヤ3スイッチの好適実施形
態例を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to clarify the above and other objects, features and advantages of the present invention, preferred embodiments of a layer 3 switch according to the present invention will be described in detail with reference to the accompanying drawings. explain.

【0017】先ず、図1は、本発明によるレイヤ3スイ
ッチの好適実施形態例の構成図を示す。このレイヤ3ス
イッチは、PHY500、MAC510、アドレス解決部52
0、サーチメモリ530、スイッチエンジン540、パ
ケットメモリ550、CPU560およびメインメモリ5
70により構成されている。アドレス解決部520は、
パケット制御部521、アドレス検索部522、CPU割
込部523、DMA転送部524および受信バッファ52
5を含んでいる。スイッチエンジン540は、スイッチ
制御部541およびパケットメモリ制御部542を含ん
でいる。CPU560は、処理部561、割込検出部56
2および割込データ検査部563を含んでいる。また、
メインメモリ570は、パケット格納エリア571およ
びパケット判別エリア572を含んでいる。パケット制
御部521、DMA転送部524、スイッチ制御部54
1、処理部561、割込データ検出部562およびメイ
ンメモリ570は、CPUインタフェース580により相
互接続されている。また、パケット制御部521および
スイッチ制御部541は、スイッチインタフェース59
0に接続されている。更に、サーチメモリ530はアド
レス検索部522に接続され、パケットメモリ550は
パケットメモリ制御部542に接続されている。また、
CPU割込部523は、割込検出部562に接続されてい
る。
FIG. 1 is a block diagram showing a preferred embodiment of a layer 3 switch according to the present invention. The layer 3 switch includes a PHY 500, a MAC 510, an address resolution unit 52
0, search memory 530, switch engine 540, packet memory 550, CPU 560, and main memory 5
70. The address resolution unit 520
Packet control unit 521, address search unit 522, CPU interrupt unit 523, DMA transfer unit 524, and reception buffer 52
5 is included. The switch engine 540 includes a switch control unit 541 and a packet memory control unit 542. The CPU 560 includes a processing unit 561, an interrupt detection unit 56
2 and an interrupt data inspection unit 563. Also,
The main memory 570 includes a packet storage area 571 and a packet discrimination area 572. Packet control unit 521, DMA transfer unit 524, switch control unit 54
1. The processing unit 561, the interrupt data detection unit 562, and the main memory 570 are interconnected by a CPU interface 580. Further, the packet control unit 521 and the switch control unit 541
Connected to 0. Further, the search memory 530 is connected to the address search unit 522, and the packet memory 550 is connected to the packet memory control unit 542. Also,
The CPU interrupt unit 523 is connected to the interrupt detection unit 562.

【0018】CPUインタフェース580は、これに接続
されているアドレス解決部520、スイッチエンジン5
40、CPU560およびメインメモリ570を、CPU56
0が処理するためのインタフェースである。スイッチイ
ンタフェース590は、これに接続されるアドレス解決
部520およびスイッチエンジン540によって、ネッ
トワークから送られてきたパケットのスイッチング処理
を行うためのインタフェースである。
The CPU interface 580 includes an address resolution unit 520 and a switch engine 5 connected thereto.
40, CPU 560 and main memory 570
0 is an interface for processing. The switch interface 590 is an interface for performing switching processing of a packet sent from the network by the address resolution unit 520 and the switch engine 540 connected thereto.

【0019】次に、図1の各構成要素の機能を説明す
る。PHY500は、ネットワークからのパケットを受信
した場合には、このパケットをシリアルデータからパラ
レルデータに変換する。一方、送信の場合には、パラレ
ルデータからシリアルデータへ変換してネットワーク上
に送信する。MAC510は、パケットデータのエラーチ
ェック等を行う。
Next, the function of each component in FIG. 1 will be described. When receiving a packet from the network, the PHY 500 converts the packet from serial data to parallel data. On the other hand, in the case of transmission, parallel data is converted to serial data and transmitted over a network. The MAC 510 performs an error check and the like of the packet data.

【0020】アドレス解決部520において、パケット
制御部521は、MAC510からのパケットとのインタ
フェースの制御、アドレス検索部522へのアドレス検
索の指示およびアドレス検索部522からのアドレス検
索の結果で「宛先不明アドレス」であるか「CPU宛パケ
ット」であるかのDMA転送部524への通知を行う。ア
ドレス検索部522は、サーチメモリ530を制御し、
受信パケットの宛先IPアドレスの検索を行い、検索結果
をパケット制御部521に通知する。CPU割込部523
は、CPU560へ割込を行う。DMA転送部524は、受信
パケットが「CPU宛パケット」の場合にはパケットメモ
リ550から、「宛先不明パケット」の場合には受信バ
ッファ525からパケットデータをメインメモリ570
へDMA転送する。受信バッファ525は、受信パケット
のヘッダ部分の64Byteを格納するバッファである。
In the address resolution unit 520, the packet control unit 521 controls the interface with the packet from the MAC 510, issues an address search instruction to the address search unit 522, and displays “address unknown” in the address search result from the address search unit 522. A notification is sent to the DMA transfer unit 524 as to whether the packet is an “address” or a “packet addressed to the CPU”. The address search unit 522 controls the search memory 530,
It searches for the destination IP address of the received packet and notifies the packet control unit 521 of the search result. CPU interrupt unit 523
Interrupts the CPU 560. The DMA transfer unit 524 transfers packet data from the packet memory 550 when the received packet is a “packet addressed to the CPU”, and from the reception buffer 525 when the received packet is “unknown destination packet”.
DMA transfer to The reception buffer 525 is a buffer that stores 64 bytes of the header portion of the reception packet.

【0021】次に、スイッチエンジン540において、
スイッチ制御部541は、スイッチインタフェース59
0の制御、パケットのスイッチング制御およびCPUイン
タフェース580の制御を行う。パケットメモリ制御部
542は、パケットメモリ550の制御を行う。パケッ
トメモリ550は、受信したパケットが一時格納されて
いる領域である。
Next, in the switch engine 540,
The switch control unit 541 includes the switch interface 59
0, packet switching control, and CPU interface 580 control. The packet memory control unit 542 controls the packet memory 550. The packet memory 550 is an area where received packets are temporarily stored.

【0022】CPU560において、処理部561は、CPU
インタフェース580の制御、ARP処理およびアドレス
の書き換えを行う。割込検出部562は、アドレス解決
部520からの割込を検出し、割込データ検査部563
に検査を指示する。割込データ検査部563 は、割込
検出部562から指示され転送されたパケットの宛先IP
アドレスがアドレス解決によりサーチメモリ530に登
録されていなかった場合又はCPU560宛の宛先IPアド
レスのパケットであるか否かを調べる。また、メインメ
モリ570において、パケット格納エリア571は、CP
U560で処理が必要なパケットが格納されているエリ
アである。パケット判別エリア572は、パケット格納
エリア571に格納されたパケットが「CPU宛パケッ
ト」であるか「宛先不明パケット」であるかを表示す
る。
In the CPU 560, the processing unit 561 includes a CPU
It controls the interface 580, performs ARP processing, and rewrites addresses. The interrupt detection unit 562 detects an interrupt from the address resolution unit 520, and outputs an interrupt data check unit 563.
Instruct the inspection. The interrupt data inspection unit 563 is configured to output the destination IP address of the packet specified and transferred from the interrupt detection unit 562.
It is checked whether the address is not registered in the search memory 530 due to the address resolution or whether the address is a packet of the destination IP address addressed to the CPU 560. In the main memory 570, the packet storage area 571 is
This area stores packets that need to be processed in U560. The packet discrimination area 572 indicates whether the packet stored in the packet storage area 571 is a “packet addressed to CPU” or a “packet with unknown destination”.

【0023】次に、図1に示すレイヤ3スイッチの好適
実施形態例の動作を、図2のフローチャートを参照して
説明する。ネットワークからパケットを受信すると(ス
テップ600)、このパケットは、PHY500からMAC5
10を介しアドレス解決部520に送られる(ステップ
601)。そこで、パケット制御部521は、パケット
のヘッダ部分の64Byteを受信バッファ525に格納す
る(ステップ602)。次に、受信パケットの宛先IP
アドレスのアドレス検索をアドレス検索部522に指示
する。同時に、パケットはスイッチインタフェース59
0を介してスイッチ制御部541に転送される。スイッ
チ制御部541に渡されたパケットは、パケットメモリ
制御部542によりパケットメモリ550に格納される
(ステップ603)。アドレス検索部522によるサー
チメモリ530の検索の結果をパケット制御部521に
通知する(ステップ604)。この検索の結果、宛先I
Pアドレスがサーチメモリ530に登録されていない、
即ち「宛先不明のパケット」の場合(ステップ605)
には、パケット制御部521はDMA転送部524を起動
する。そこで、DMA転送部524は、受信バッファ52
5格納されているパケットヘッダの64Byteをメインメ
モリ570のパケット格納エリア571に転送する(ス
テップ606)。
Next, the operation of the preferred embodiment of the layer 3 switch shown in FIG. 1 will be described with reference to the flowchart of FIG. When a packet is received from the network (step 600), the packet is transmitted from PHY 500 to MAC5.
The address is sent to the address resolution unit 520 via 10 (step 601). Therefore, the packet control unit 521 stores 64 bytes of the header portion of the packet in the reception buffer 525 (Step 602). Next, the destination IP of the received packet
It instructs the address search unit 522 to search for an address. At the same time, the packet is
0 to the switch control unit 541. The packet passed to the switch control unit 541 is stored in the packet memory 550 by the packet memory control unit 542 (Step 603). The search result of the search memory 530 by the address search unit 522 is notified to the packet control unit 521 (step 604). As a result of this search, destination I
The P address is not registered in the search memory 530,
That is, in the case of "unknown destination packet" (step 605).
First, the packet control unit 521 activates the DMA transfer unit 524. Therefore, the DMA transfer unit 524
5 is transferred to the packet storage area 571 of the main memory 570 (step 606).

【0024】次に、ステップ605でアドレス検索が一
致し且つこの宛先IPアドレスが装置宛(ステップ61
4)の場合には、パケットメモリ550に格納されてい
るパケットをメインメモリ570内のパケット格納エリ
ア571にDMA転送する(ステップ615)。この転送
が終了すると、DMA転送部524は、パケット制御部5
21に完了割込をする。パケット制御部521は、メイ
ンメモリ570のパケット判別エリア572に割込要因
を格納して、CPU割込部523にCPU560への割込を指
示する。CPU割込部523は、CPU560の割込検出部5
62へ割込を行う(ステップ607)。割込を検出した
割込検出部562は、割込データ検査部563にDMA転
送されたデータが「宛先不明パケット」か「CPU宛パケ
ット」であるかを調べるように指示する(ステップ60
8)。
Next, in step 605, the address search matches and the destination IP address is addressed to the device (step 61).
In the case of 4), the packet stored in the packet memory 550 is DMA-transferred to the packet storage area 571 in the main memory 570 (step 615). When this transfer ends, the DMA transfer unit 524 sends the packet control unit 5
Then, a completion interrupt is made to 21. The packet control unit 521 stores the interrupt factor in the packet determination area 572 of the main memory 570, and instructs the CPU interrupt unit 523 to interrupt the CPU 560. The CPU interrupt unit 523 is an interrupt detection unit 5 of the CPU 560.
An interrupt is made to 62 (step 607). The interrupt detecting unit 562 that has detected the interrupt instructs the interrupt data checking unit 563 to check whether the data transferred by DMA is a “destination unknown packet” or a “CPU packet” (step 60).
8).

【0025】「宛先不明パケット」の場合(ステップ6
09)には、CPU560の処理部561は、ARP処理を行
う(ステップ610)。このARP処理後、CPU560は、
ARPによって入手した宛先MACアドレスおよび発信元MAC
アドレスに基づきパケット格納エリア571のヘッダ部
分の宛先MACアドレスおよび発信元MACアドレスの書き換
えを行う(ステップ611)。書き換え後、このパケッ
トヘッダ64Byteをパケットメモリ550に格納されて
いるパケットのヘッダ64Byteに上書きする。スイッチ
制御部541は、64Byteのパケットをパケットメモリ
制御部542に渡し、パケットメモリ550に格納され
る(ステップ612)。スイッチ制御部541は、パケ
ットメモリ550に格納されているパケットを、宛先IP
アドレスがつながっている該当ポートに送信する(ステ
ップ613)。
In the case of "unknown destination packet" (step 6)
In step 09), the processing unit 561 of the CPU 560 performs an ARP process (step 610). After this ARP processing, the CPU 560
Destination MAC address and source MAC obtained by ARP
Based on the address, the destination MAC address and the source MAC address in the header portion of the packet storage area 571 are rewritten (step 611). After rewriting, the packet header 64 Byte is overwritten on the packet header 64 Byte stored in the packet memory 550. The switch control unit 541 passes the 64-byte packet to the packet memory control unit 542, and the packet is stored in the packet memory 550 (Step 612). The switch control unit 541 converts the packet stored in the packet memory 550 into the destination IP address.
The address is transmitted to the corresponding port (step 613).

【0026】以上、本発明によるレイヤ3スイッチの好
適実施形態例の構成および動作を詳述した。しかし、斯
かる実施形態例は、本発明の単なる例示に過ぎず、何ら
本発明を限定するものではないことに留意されたい。本
発明の要旨を逸脱することなく種々の変形変更が可能で
あること、当業者には容易に理解できよう。
The configuration and operation of the preferred embodiment of the layer 3 switch according to the present invention have been described above in detail. However, it should be noted that such exemplary embodiments are merely examples of the present invention and do not limit the present invention in any way. It will be readily apparent to those skilled in the art that various modifications can be made without departing from the spirit of the invention.

【0027】[0027]

【発明の効果】以上説明した如く、本発明のレイヤ3ス
イッチによれば、次の如き実用上の顕著な効果が得られ
る。受信したパケットの宛先IPアドレスがアドレス解決
により、サーチメモリに登録されていない(「宛先不明
パケット」)場合には、ルーティング処理のためにアド
レスの書き換えするため、メインメモリにパケットデー
タを転送する場合、アドレス解決部の内のDMA転送機能
により、ルーティングを行うために、MACアドレスの書
き換えに必要なバイト数のパケットデータをCPUを介さ
ずメインメモリに直接転送することを可能とする。従っ
て、無駄なデータ転送をなくすことができ、アドレス学
習性能が向上し且つ無駄なデータ転送によりパケットメ
モリのアクセス回数を削減することよりスイッチング性
能の低下を阻止することが可能である。
As described above, according to the layer 3 switch of the present invention, the following remarkable practical effects can be obtained. When the destination IP address of the received packet is not registered in the search memory due to the address resolution ("unknown destination packet"), when transferring the packet data to the main memory to rewrite the address for routing processing By using the DMA transfer function of the address resolution unit, it is possible to directly transfer packet data of the number of bytes required for rewriting the MAC address to the main memory without using the CPU in order to perform routing. Therefore, useless data transfer can be eliminated, address learning performance can be improved, and a reduction in switching performance can be prevented by reducing the number of accesses to the packet memory by useless data transfer.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明によるレイヤ3スイッチの好適実施形態
例の構成図である。
FIG. 1 is a configuration diagram of a preferred embodiment of a layer 3 switch according to the present invention.

【図2】図1のレイヤ3スイッチの動作を説明するフロ
ーチャートである。
FIG. 2 is a flowchart illustrating an operation of the layer 3 switch of FIG. 1;

【図3】一般的なレイヤ3スイッチの構成図である。FIG. 3 is a configuration diagram of a general layer 3 switch.

【図4】レイヤ3スイッチのパケットフォーマットであ
る。
FIG. 4 is a packet format of a layer 3 switch.

【図5】従来のレイヤ3スイッチの構成図である。FIG. 5 is a configuration diagram of a conventional layer 3 switch.

【図6】図5のレイヤ3スイッチの動作を示すフローチ
ャートである。
6 is a flowchart showing an operation of the layer 3 switch of FIG.

【符号の説明】[Explanation of symbols]

500 物理層プロトコル(PHY) 510 媒体アクセス制御(MAC) 520 アドレス解決部 521 パケット制御部 522 アドレス検索部 523 CPU割込部 524 DMA転送部 525 受信バッファ 530 サーチメモリ 540 スイッチエンジン 541 スイッチ制御部 542 パケットメモリ制御部 550 パケットメモリ 560 CPU(中央処理装置) 561 処理部 562 割込検出部 563 割込データ検査部 570 メインメモリ 571 パケット格納エリア 572 パケット判別エリア 580 CPUインタフェース 590 スイッチインタフェース 500 Physical layer protocol (PHY) 510 Medium access control (MAC) 520 Address resolution unit 521 Packet control unit 522 Address search unit 523 CPU interrupt unit 524 DMA transfer unit 525 Receive buffer 530 Search memory 540 Switch engine 541 Switch control unit 542 packet Memory control unit 550 Packet memory 560 CPU (central processing unit) 561 Processing unit 562 Interrupt detection unit 563 Interrupt data inspection unit 570 Main memory 571 Packet storage area 572 Packet discrimination area 580 CPU interface 590 Switch interface

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】複数の物理層プロトコル(PHY)、複数の
媒体アクセス制御(MAC)、該MACに接続されたアドレス
解決部、該アドレス解決部に接続されたサーチメモリ、
スイッチエンジン、該スイッチエンジンに接続されたパ
ケットメモリ、受信パケットを格納するメインメモリお
よびCPUインタフェースを介して相互接続されたCPUを備
え、前記アドレス解決部は、パケット制御部、前記サー
チメモリに接続されたアドレス検索部および前記CPUに
割込をかけるCPU割込部を含むレイヤ3スイッチにおい
て、 前記アドレス解決部は、前記パケット制御部に接続され
且つ前記受信パケットのヘッダ部分を格納する受信バッ
ファと、前記パケット制御部および前記CPUインタフェ
ース間に接続され、前記受信バッファからパケットデー
タを前記メインメモリへDMA転送するDMA転送部を更に含
むことを特徴とするレイヤ3スイッチ。
1. A plurality of physical layer protocols (PHYs), a plurality of medium access controls (MACs), an address resolution unit connected to the MACs, a search memory connected to the address resolution units,
A switch engine, a packet memory connected to the switch engine, a main memory for storing received packets, and a CPU interconnected via a CPU interface.The address resolution unit is connected to a packet control unit and the search memory. A layer 3 switch including an address search unit and a CPU interrupt unit that interrupts the CPU, wherein the address resolution unit is connected to the packet control unit and stores a header portion of the reception packet; The layer 3 switch, further comprising a DMA transfer unit connected between the packet control unit and the CPU interface and configured to perform a DMA transfer of packet data from the reception buffer to the main memory.
【請求項2】前記受信バッファは、前記受信パケットの
ヘッダ部分の64Byteを格納することを特徴とする請求
項1に記載のレイヤ3スイッチ。
2. The layer 3 switch according to claim 1, wherein said reception buffer stores 64 bytes of a header portion of said reception packet.
【請求項3】前記CPUは、処理部と、前記アドレス解決
部の前記CPU割込部に接続された割込検出部と、該割込
検出部から転送されたパケットのIPアドレスを調べる割
込データ検査部とを含むことを特徴とする請求項1又は
2に記載のレイヤ3スイッチ。
3. The CPU includes: a processing unit; an interrupt detection unit connected to the CPU interruption unit of the address resolution unit; and an interrupt for checking an IP address of a packet transferred from the interruption detection unit. The layer 3 switch according to claim 1, further comprising a data inspection unit.
【請求項4】前記メインメモリは、パケット格納エリア
に加えてパケット判定エリアを有し、前記パケット格納
エリアに格納されたパケットがCPU宛パケットか宛先不
明パケットかを表示することを特徴とする請求項1、2
又は3に記載のレイヤ3スイッチ。
4. The main memory has a packet determination area in addition to a packet storage area, and indicates whether a packet stored in the packet storage area is a packet addressed to a CPU or a packet whose destination is unknown. Terms 1, 2
Or the layer 3 switch according to 3.
【請求項5】前記スイッチエンジンは、スイッチインタ
フェースを介して前記アドレス解決部の前記パケット制
御部に接続されたスイッチ制御部と、前記パケットメモ
リに接続されたパケットメモリ制御部とを含むことを特
徴とする請求項1乃至4のいずれかに記載のレイヤ3ス
イッチ。
5. The switch engine includes a switch controller connected to the packet controller of the address resolution unit via a switch interface, and a packet memory controller connected to the packet memory. The layer 3 switch according to claim 1, wherein
JP37208499A 1999-12-28 1999-12-28 Layer 3 switch Expired - Fee Related JP3508057B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP37208499A JP3508057B2 (en) 1999-12-28 1999-12-28 Layer 3 switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP37208499A JP3508057B2 (en) 1999-12-28 1999-12-28 Layer 3 switch

Publications (2)

Publication Number Publication Date
JP2001189729A true JP2001189729A (en) 2001-07-10
JP3508057B2 JP3508057B2 (en) 2004-03-22

Family

ID=18499827

Family Applications (1)

Application Number Title Priority Date Filing Date
JP37208499A Expired - Fee Related JP3508057B2 (en) 1999-12-28 1999-12-28 Layer 3 switch

Country Status (1)

Country Link
JP (1) JP3508057B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009088622A (en) * 2007-09-27 2009-04-23 Oki Semiconductor Co Ltd Packet transfer apparatus and method having buffer memory

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009088622A (en) * 2007-09-27 2009-04-23 Oki Semiconductor Co Ltd Packet transfer apparatus and method having buffer memory

Also Published As

Publication number Publication date
JP3508057B2 (en) 2004-03-22

Similar Documents

Publication Publication Date Title
US8059680B2 (en) Offload system, method, and computer program product for processing network communications associated with a plurality of ports
US6308218B1 (en) Address look-up mechanism in a multi-port bridge for a local area network
JP4685254B2 (en) Priority remapping for data communication switches
US6674769B1 (en) Simultaneous searching of layer 3 policy filter and policy cache in a network switch port
EP0508886B1 (en) Filtering and disposition of messages in a bridge using a single address and protocol table
KR100798926B1 (en) Packet forwarding apparatus and method in packet switch system
US7248584B2 (en) Network packet processing
JPH11261649A (en) Data processing device and router bridge using the same
US20110142050A1 (en) Hashing packet contents to determine a processor
US20030182440A1 (en) Network processor with high-speed transceiver
JP3545858B2 (en) Network connection device and information search device
WO2002059757A1 (en) Communications processor
JP3508057B2 (en) Layer 3 switch
TWI830350B (en) Methods and electronic devices for routing data packets
JP2790550B2 (en) Gateway device
JP4029708B2 (en) Router device and transfer control method
TWI825293B (en) Circuitry within network device
JP4079764B2 (en) Router device
JPH08212790A (en) Associative memory for multi-protocol address search and its search method
JPH11191790A (en) Communication data processing method and inter-network connection device
KR100596385B1 (en) Forwarding Information Processing Method Configured in Virtual Local Area Network in Router
JP2003289315A (en) Packet transfer apparatus and packet transfer method
JPH06266535A (en) Addition system and communication system with addition section
JP3335861B2 (en) Switch device with protocol priority processing function
JPH06224918A (en) Inter-lan connection device

Legal Events

Date Code Title Description
A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20031211

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080109

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090109

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090109

Year of fee payment: 5

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090109

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100109

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees