ARL_Student - High Speed Network Lab @ NCTU

dargspurΔίκτυα και Επικοινωνίες

27 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

101 εμφανίσεις

Address Resolution Logic

(for NCTU)

呂國正

工研院電通所高速網路部

TEL : (03)591
-
5708

Email : lkc@n300.ccl.itri.org.tw

Confidential & Proprietary

2

Agenda


Position of ARL in L3S Chip


Concept of IP Routing & Multi
-
Layer Switching


Introduction to CIDR and Longest Prefix Matching


ARL Architecture and I/O interface


ARL Detailed Design


Forwarding Table Management

Confidential & Proprietary

3

Position of ARL in L3S Chip

ARL

Header Pre
-
Processor

...

Result Processor

Routing Header

Routing Result

Queue Processor

Packet Memory

Header updating

Port map ...

Routing Result


(from CPU)

Header Queues

Forwarding Table

Scheduler

Post Processor

MAC

To PM

Confidential & Proprietary

4

ARL Specification


Confidential & Proprietary

5

ARL Functions (1/2)


Layer 2 Forwarding Decision


DA Lookup


SA Learning


VID Lookup


BPDU/GMRP/GVRP Handling


STP Port State Handling


Port Mirroring


Non
-
IP Packet Handling (ARP, IPX …)


Statistical Counters


Decide to Route or to Switch


Confidential & Proprietary

6

ARL Functions (2/2)


Layer 3 Forwarding Decision


Version and Header Length Check


IP Unicast Lookup (find next hop MAC)


TTL check


IP Multicast Lookup


IGMP & 224.0.0.X Filtering


Statistic Counters



Packet Classification


IEEE 802.1p Priority Tag


IP TOS bits


Layer 4 Protocols


Confidential & Proprietary

7

Agenda


Position of ARL in L3S Chip


Concept of IP Routing & Multi
-
Layer Switching


Introduction to CIDR and Longest Prefix Matching


ARL Architecture and I/O interface


ARL Detailed Design


Forwarding Table Management

Confidential & Proprietary

8

Router v.s. Bridge/Switch

Confidential & Proprietary

9

Router does packet modification

These two maybe

occur at the same time

in a multilayer SW

These two maybe occur at the same time

if subnet directed broadcast is supported

Packet modification summary

Confidential & Proprietary

10

A Typical IP Routing Table


Entry in a typical routing table









An ARP table entry

Network Address for This Route

Subnet Mask for This Route

IP Address of the Next Hop

Distance Metric

Interface Port ID

Sort Key

Time to Live

0

31

IP Address of the Next Hop or Local Host

MAC Address [47:16]

MAC Address [15:0]

Time to Live

Confidential & Proprietary

11

A Sample Network

Confidential & Proprietary

12

Routing Tables


Routing table of router #1







Routing table of router #2

Confidential & Proprietary

13

What’s Multi
-
Layer Switching


Very Flexible Configuration

Confidential & Proprietary

14

VLAN , IP Subnet, and Port


Support Port Based VLAN


A Port can belong to Multiple IP Subnets but only one
VLAN(exception : trunk port)


Multiple ports can group into a Subnet or VLAN


Each subnet has a unique router IP address


Ports of the same subnet have the same router

MAC address


But …


VLAN boundary defines the broadcast domain,


not the subnet boundary !!


If Explicit Tag is applied, a packet can arrive any
member ports of the L3S chip


Trunk port delivery


confused VLAN & subnet limitation !

Subnet 1

VLAN

Subnet N

Confidential & Proprietary

15

VLAN , IP Subnet, and Port

In Short,


VLAN (VID) is just a method to defines the broadcast
domain of a IP subnet in our L3S design


Actually, there is only VLAN boundary but no subnet boundary !!


Or, Subnet boundary is virtually contained by the same router
MAC address



Set VLAN Boundary = Subnet boundary you want to
be
-
> normal operation

聽無

?!

Confidential & Proprietary

16

When to route? When to switch ?


If (IP & DA = Router’s MAC of the source port)


Route

Confidential & Proprietary

17

Non
-
IP Packet Handling


Method #1 : Local Bridging


share the same VLAN boundary with IP packets


can use trunk port to connect to an external router


suitable for overlay of IP subnet & non
-
IP subnet environment



Method #2 : Local Bridging to all
-
port VLAN


may cause broadcast storm


not support in this version !



Method #3 : Send to CPU if DA=router’s MAC


set NIPR = 1 to enable non
-
IP packet routing


need non
-
IP routing protocol running on the system

Confidential & Proprietary

18

IP Multicast Forwarding

DVMRP Multicast Forwarding Table

MOSFP Multicast Forwarding Cache

Reverse Path Forwarding(used by DVMRP)

TTL Based Scoping

DVMRP,MOSPF :

Two popular inter
-
gateway

multicast Routing Protocols

Build shortest path tree

from source to each

destination!

Confidential & Proprietary

19

Agenda


Position of ARL in L3S Chip


Concept of IP Routing & Multi
-
Layer Switching


ARL Architecture and I/O interface


Introduction to CIDR and Longest Prefix Matching


ARL Detailed Design


Forwarding Table Management


ARL Performance Estimation


Configuration Registers and Statistical Counters


ARL Pin Assignment


Q & A


Confidential & Proprietary

20

What’s CIDR


CIDR(Classless Inter
-
Domain Routing) is introduced to
overcome the following problems


exhausting of class B network


explosion of internet routing table


CIDR allows any length of subnet mask


e.g. TWNIC can assign 2 class C networks(subnet mask length = 23)
to a company if he has only 300 hosts=> efficient for IP address
allocation


Router can aggregate several routes to a big route with less mask
length=> reduce core router’s routing table size

Confidential & Proprietary

21

Route Aggregation by CIDR


CIDR permits route aggregation


reduce the Internet routing table

Confidential & Proprietary

22

CIDR and Longest Prefix Matching


With CIDR, a router has to perform longest prefix
matching to find the next hop








This is what wire
-
speed routing does !

e.g. dest_ IP: 1100 0001 1110 0001 0011 1110 1010 1111

entry_IP 1:
1100 0001 1110 0001 0011

0000 0000 0000


mask : 1111 1111 1111 1111 1111 0000 0000 0000

entry_IP 2:
1100 0001 1110 0001 0011 11
00 0000 0000


mask : 1111 1111 1111 1111 1111 1100 0000 0000

entry_IP 3:
1100 0001 1110 0000 0000 0000 00
00 0000


mask : 1111 1111 1111 1111 1111 1111 1100 0000


Confidential & Proprietary

23

Algorithm for Longest Prefix Matching

Confidential & Proprietary

24

An Example

Confidential & Proprietary

25

Agenda


Position of ARL in L3S Chip


Concept of IP Routing & Multi
-
Layer Switching


Introduction to CIDR and Longest Prefix Matching


ARL Architecture and I/O interface


ARL Detailed Design


Forwarding Table Management

Confidential & Proprietary

26

ARL Architecture
-

Overview

Multi
-
Layer

Search Engine

ARL_CIU

Aging

Controller

Arbitration /MUX

Forwarding Table

CPU IF

Header

Pre
-
Processor

Result

Processor

Confidential & Proprietary

27

ARL Architecture
-

Block Diagram

Confidential & Proprietary

28

Multi
-
Layer Search Engine

L2 Search

Engine

L3 Search


Engine

Packet

Classifier

MSE Controller

L2/L3 Mux

Routing

Result

To forwarding

table arbiter

Start_L2_PC

Start_L3

Req/ack

Rlt_valid

Rlt_ack

Hdr_valid

Hdr_valid

Routing Header &

Relay Info.(e.g. fptr,flen)

L2_Hdr

L3_Hdr

802.1
p

ToS

Protocol

Confidential & Proprietary

29

Agenda


Position of ARL in L3S Chip


Concept of IP Routing & Multi
-
Layer Switching


Introduction to CIDR and Longest Prefix Matching


ARL Architecture and I/O interface


ARL Detailed Design


Forwarding Table Management

Confidential & Proprietary

30

Overall Lookup Flow

Confidential & Proprietary

31

Forwarding Table Entry Format

Confidential & Proprietary

32

Layer 2 Search Engine
-

Flow Chart

Confidential & Proprietary

33

Layer 2 Search Engine
-

State Machine

Confidential & Proprietary

34

When to enter L3 search engine


A Valid IP Packet


header checksum OK & length check OK…(by HPP)


&



Routing Enable on this ort


configured by REM


&



Destination MAC = Router port’s MAC or


= Broadcast/Multicast MAC


Confidential & Proprietary

35

Layer 3 Search Engine
-

Flow Chart

Confidential & Proprietary

36

Layer 3 Search Engine
-

State Machine

Confidential & Proprietary

37

Packets to CPU


Layer 2 Control packets


BPDU,GMRP,GVRP


ARP packets


!IP & DA=Router’s MAC or Multicast MAC & RE & NIPR=1


e.g. IPX packets


IP & DA=Router’s MAC or Multicast MAC & !RE


disable hardware routing but enable CPU routing for IPpackets


Layer 3 Lookup with AT=00,01,10 or an invalid ARP entry


black hole, ARP age out,router’s IP(s), broadcast IP(s)


Layer 3 Lookup with TTL < 2


Layer 3 Lookup with a Miss in IP Multicast lookup


Layer 3 Lookup with Ver != 4 or Hlen != 5


IGMP or IP=224.x.x.0

Confidential & Proprietary

38

Packet Classifier
-

Circuit


Confidential & Proprietary

39

Agenda


Position of ARL in L3S Chip


Concept of IP Routing & Multi
-
Layer Switching


ARL Architecture and I/O interface


Introduction to CIDR and Longest Prefix Matching


ARL Detailed Design


Forwarding Table Management

Confidential & Proprietary

40

Think ….


The result from the combination of routing table & ARP Table

Route to R1

Route to R2



Route to ?

...

Router #1 IP

Router #2 IP(aged)

Router #15 IP

….

Host #1 IP

Host #k IP


L3 Table

ARP Table

MAC of DR

MAC of R1


MAC of R2(invalid)

...

MAC of R15

MAC of H1

MAC of H2

invalid entry

…..

MAC of H3

...

invalid entry

...

MAC of Hk