Switching and Routing - Part 1. Router Architecture


Published on

Download a PDF file: http://www.netmanias.com/en/?m=view&id=blog&no=6338
You can also find and download more materials from http://www.netmanias.com

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Switching and Routing - Part 1. Router Architecture

  1. 1. 1 NETMANIAS TECH-BLOG Please visit www.netmanias.com to view more posts Switching and Routing - Part 1. Router Architecture May 23, 2014 | By Netmanias (tech@netmanias.com) Back in the early 2000s, when I worked for an L3 switch (Ethernet switch + IP router) developer, I had once implemented packet forwarding by using IBM NP4GS3C, a network processor. Not just because of that, but I also believe this might be a good time for us, especially network novices, to look into the logic of packet delivery by L3 switch, through the following series of posts: Part 1. Router Architecture (this post) Part 2. Packet Forwarding by IP Router Part 3. L2 (Ethernet) Switching by L3 Switch Part 4. IP Forwarding by L3 Switch Router Architecture Seen in the left figure above is the illustration of a Cisco 7600 router. This router consists of the following three functional modules: ■ Supervisor Engine  Works as the brain of the entire router system that controls/operates the system. This is where all protocols (OSPF, BGP, SNMP, Telnet, etc.) are installed and run. Administrators can access these modules to manage the entire router system through CLI.  Usually, general CPUs (like Intel CPU) with excellent processing power are placed here. And, protocol-embedding OSs are installed.  In Juniper routers, this module is called a "routing engine". ge1/4 ge1/3 ge1/2 ge1/1 FIB Table ARP Table Packet Processor (Ingress Lookup/Egress Scheduling) Ingress Packet Buffer Egress Packet Buffer ge2/4 ge2/3 ge2/2 ge2/1 FIB Table ARP Table Egress Packet Buffer Line Card #2 Ingress Packet Buffer Packet Processor (Ingress Lookup/Egress Scheduling) ARP Table Control Module RIB Table OSPF Process LSDB (Link-State Data Base) Line Card #1 Switching Fabric Switching Module Switch Module Control Module Switch Module Control Module Line Card Line Card Cisco 7600 Router General Router Architecture Line Card Physical Port ge1/4 Port type: ge = Gigabit Ethernet Line Card number: 1 = 1st Line Card in a Router Port number: 4 = 4th Port in a Line Card so, ge1/4 means “Gigabit Ethernet Port 4 in a Line Card 1”
  2. 2. Netmanias Tech-Blog: Switching and Routing - Part 1. Router Architecture 2 ■ Line Card  In charge of receiving packets, looking up tables (FIB/ARP), applying QoS (QoS marking, policing, queueing), and delivering packets to destined output ports (all of these at wire-speed). Comes in different models to support different port types (1GE, 10GE, SONET, etc.) and port numbers.  For wire-speed processing of packets, technically capable vendors like Cisco and Juniper use their own ASIC/NP while others usually use commercial ASIC (e.g. Broadcom, Marvell, etc.).  In Juniper routers, this module is called a "packet forwarding engine (PFE)". ■ Switch Fabric Module  Works as a bridge through which packets are delivered between line cards. For example, when a packet received at line card #1 needs to go out through line card #1, the packet is delivered through this module.  In Juniper routers, this module is called a "switch fabric". Seen in the right figure is the architecture of a general router to be explained through this and the later posts. ■ Control Module (Control Plane)  This module, also known as "control plane", corresponds to Cisco's supervisor engine/Juniper routing engine.  Although a control module has many protocols and tables, we have simplified the architecture to show only the ones to be explained through the posts.  All routers have a control module that runs an OSPF process, and they learn routing information from their OSPF neighbors (OSPF routers) by using the OSPF protocol. Among the information learned, only the routing entries that correspond to the shortest paths to each destination are installed in the Routing Information Base (RIB).  It has an ARP table if the port type of the line card is Ethernet, which is very likely these days. This ARP table stores "MAC addresses corresponding to IP addresses" of nodes (servers and routers) directly connected to the router (just like ARP tables on a Windows PC, which can be retrieved using a Window command "arp -a"). ■ Line Card (Data Plane)  Also known as "data plane".  Has a packet processor (e.g. IBM NP, Broadcom, Marvell chip, etc.), the most essential component in processing packets.  Has an ingress packet buffer where received packets are kept momentarily.  Has an egress packet buffer where packets are kept before being delivered to the output port. When congested (e.g. if packets of more than 1 Gbps are converging towards 1GE port), packets with higher priorities are processed first, and others are buffered here according to the specified scheduling algorithm (e.g. SPQ, WFQ/DWRR).  Has a forwarding information base (FIB) and ARP table that are referred when determining which port to send a received packet to.
  3. 3. Netmanias Tech-Blog: Switching and Routing - Part 1. Router Architecture 3 ■ Switch Module  Functions as a bridge through which packets are delivered between line cards. This module will not be further discussed as this post does not concern switching fabric technique. RIB/ARP Table on Control Module (Control Plane) and FIB/ARP Table on Line Card (Data Plane) It is known that routing entries in the RIB on the control module and the FIBs on the line cards vary depending on each vendor's implementation. For example, in case of Cisco:  In OSPF LSDB, all routing paths (to be exact, all LSA information received from OSPF neighbors) are saved.  In the RIB, only the routing entries that correspond to the shortest paths to each destination are installed.  Then, the same entries in the RIB are copied to the FIB on each line card.  That means, {RIB on Control Module} = {FIB on Line Card #1} = {FIB on Line Card #2} = {FIB on Line Card #3} = ... However, things are different in ARP tables. In the ARP table on each line card, only the ARP entries (IP & MAC) that each line card has learned itself are saved. These learned entries are not shared with other line cards (e.g. the ARP entries learned by the line card #1 are useless to other line cards). But, in the ARP table on the control module, all ARP entry information on all line cards is kept. How ARP entries are learned will be explained in the next post. So, in Cisco routers, show ip route or show ip arp command retrieves these RIB and ARP tables on the control module. What's Ingress and Egress? Ingress means "incoming", and egress means "outgoing". For example, if a packet is received via ge1/4 port of the line card #1, and is output via ge2/3 port of the line card #2,  the ge1/4 port where the packet was received is called an "ingress port"  the line card #1 where the packet was received is called an "ingress line card"  the ge2/3 port where the packet was sent is called an "egress port"  the line card #2 where the packet was sent is called an "egress line card" So, line cards and ports on a router can be called and worked as Ingress or egress line cards/ports depending on to which direction the packet was going. In the next post, we will see how IP packets are forwarded (delivered) in the general router architecture discussed so far.
  4. 4. About NMC Consulting Group (www.netmanias.com) NMC Consulting Group is an advanced and professional network consulting company, specializing in IP network areas (e.g., FTTH, Metro Ethernet and IP/MPLS), service areas (e.g., IPTV, IMS and CDN), and wireless network areas (e.g., Mobile WiMAX, LTE and Wi-Fi) since 2002. Copyright © 2002-2014 NMC Consulting Group. All rights reserved. 4 Carrier WiFi Data Center Migration Wireline Network LTE Mobile Network Mobile WiMAX Carrier Ethernet FTTH Data Center Policy Control/PCRF IPTV/TPS Metro Ethernet MPLS IP Routing 99 00 01 02 03 04 05 06 07 08 09 10 11 12 13 eMBMS/Mobile IPTV Services CDN/Mobile CDN Transparent Caching BSS/OSS Cable TPS Voice/Video Quality IMS LTE Backaul Netmanias Research and Consulting Scope Visit http://www.netmanias.com to view and download more technical documents. Future LTE IP/MPLS CarrierEthernet Networks Consulting POC Training Wi-Fi Infrastructure Services CDN Transparent Caching IMS Concept Design DRM eMBMS protocols Analyze trends, technologies and market Analysis Report Technical documents Blog One-Shot gallery We design the future We design the future We design the future