400 likes | 416 Views
Learn about the ARL architecture, detailed design, and forwarding table management in the L3S chip for IP routing and multi-layer switching. Explore concepts like CIDR and longest prefix matching.
E N D
Address Resolution Logic(for NCTU) 呂國正 工研院電通所高速網路部 TEL : (03)591-5708 Email : lkc@n300.ccl.itri.org.tw
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
Position of ARL in L3S Chip Header updating Routing Result (from CPU) Packet Memory Result Processor Queue Processor Port map ... Routing Result ARL Forwarding Table Scheduler Routing Header To PM Post Processor Header Pre-Processor ... Header Queues MAC Confidential & Proprietary
ARL Specification Confidential & Proprietary
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
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
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
Router v.s. Bridge/Switch Confidential & Proprietary
Router does packet modification These two maybe occur at the same time if subnet directed broadcast is supported Packet modification summary These two maybe occur at the same time in a multilayer SW Confidential & Proprietary
A Typical IP Routing Table • Entry in a typical routing table • An ARP table entry 31 0 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 IP Address of the Next Hop or Local Host MAC Address [47:16] MAC Address [15:0] Time to Live Confidential & Proprietary
A Sample Network Confidential & Proprietary
Routing Tables • Routing table of router #1 • Routing table of router #2 Confidential & Proprietary
What’s Multi-Layer Switching • Very Flexible Configuration Confidential & Proprietary
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 N Subnet 1 VLAN Confidential & Proprietary
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
When to route? When to switch ? • If (IP & DA = Router’s MAC of the source port) • Route Confidential & Proprietary
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
IP Multicast Forwarding Reverse Path Forwarding(used by DVMRP) DVMRP,MOSPF : Two popular inter-gateway multicast Routing Protocols Build shortest path tree from source to each destination! DVMRP Multicast Forwarding Table TTL Based Scoping MOSFP Multicast Forwarding Cache Confidential & Proprietary
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
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
Route Aggregation by CIDR • CIDR permits route aggregation • reduce the Internet routing table Confidential & Proprietary
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 1100 0000 0000 mask : 1111 1111 1111 1111 1111 1100 0000 0000 • entry_IP 3: 1100 0001 1110 0000 0000 0000 0000 0000 mask : 1111 1111 1111 1111 1111 1111 1100 0000 Confidential & Proprietary
Algorithm for Longest Prefix Matching Confidential & Proprietary
An Example Confidential & Proprietary
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
ARL Architecture - Overview Forwarding Table Arbitration /MUX ARL_CIU Multi-Layer Search Engine Aging Controller CPU IF Header Pre-Processor Result Processor Confidential & Proprietary
ARL Architecture - Block Diagram Confidential & Proprietary
Multi-Layer Search Engine To forwarding table arbiter Req/ack Routing Result L2/L3 Mux Start_L3 L2 Search Engine L3 Search Engine Packet Classifier Rlt_ack Rlt_valid Start_L2_PC 802.1p ToS Protocol L3_Hdr L2_Hdr MSE Controller Routing Header & Relay Info.(e.g. fptr,flen) Hdr_valid Hdr_valid Confidential & Proprietary
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
Overall Lookup Flow Confidential & Proprietary
Forwarding Table Entry Format Confidential & Proprietary
Layer 2 Search Engine- Flow Chart Confidential & Proprietary
Layer 2 Search Engine- State Machine Confidential & Proprietary
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
Layer 3 Search Engine- Flow Chart Confidential & Proprietary
Layer 3 Search Engine- State Machine Confidential & Proprietary
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
Packet Classifier - Circuit Confidential & Proprietary
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
Think …. • The result from the combination of routing table & ARP Table ARP Table L3 Table MAC of DR MAC of R1 MAC of R2(invalid) ... MAC of R15 Route to R1 Route to R2 … Route to ? ... Router #1 IP Router #2 IP(aged) Router #15 IP …. Host #1 IP Host #k IP MAC of H1 MAC of H2 invalid entry ….. MAC of H3 ... invalid entry ... MAC of Hk Confidential & Proprietary