交换的类型

Switching can occur at four levels, which are listed here in order of increasing performance:

Process switching. With this type of switching, an incoming packet is associated with a
destination network or subnet entry in the routing table located in main memory. Process
switching is a scheduled process that is performed by the system processor.

• Fast switching. With this type of switching, an incoming packet matches an entry in the
fast-switching cache located in main memory. Fast switching is done via asynchronous interrupts,
which are handled in real time. Fast switching allows higher throughput by switching a packet
using a cache created by previous packets.

• Autonomous switching. With this type of switching, an incoming packet matches an entry in the
autonomous-switching cache located on the interface processor. Autonomous switching provides
faster packet switching by allowing the ciscoBus controller to switch packets independently
without having to interrupt the system processor. It is available only on Cisco 7000 series routers
and in AGS+ systems with high-speed network controller cards.

• SSE switching. With this type of switching, an incoming packet matches an entry in the
silicon-switching cache located in the silicon switching engine (SSE) of the Silicon Switch
Processor (SSP) module. This module is available only on Cisco 7000 series routers. Silicon
switching provides very fast, dedicated packet switching by allowing the SSE to switch packets
independently without having to interrupt the system processor.
Process Switching
Process switching is the slowest and most processor-intensive of the routing types. When a packet arrives on an interface to be forwarded, it is copied to the router's process buffer, and the router performs a lookup on the Layer 3 address. Using the route table, an exit interface is associated with the destination address. The processor encapsulates and forwards the packet with the new information to the exit interface. Subsequent packets bound for the same destination address follow the same path as the first packet.

The repeated lookups performed by the router's processor and the processor's relatively slow performance eventually create a bottleneck and greatly reduce the capacity of the router. This becomes even more significant as the bandwidth and number of interfaces increase and as the routing protocols demand more processor resources.

Fast Switching
Fast switching is an improvement over process switching. The first packet of a new session is copied to the interface processor buffer. The packet is then copied to the CxBus (or other backplane technology as appropriate to the platform) and sent to the switch processor. A check is made against other switching caches (for example, silicon or autonomous) for an existing entry.

Fast switching is then used because no entries exist within the more efficient caches. The packet header is copied and sent to the route processor, where the fast-switching cache resides. Assuming that an entry exists in the cache, the packet is encapsulated for fast switching and sent back to the switch processor. Then the packet is copied to the buffer on the outgoing interface processor, and ultimately it is sent out the destination interface.

Fast switching is on by default for lower-end routers like the 4000/2500 series and may be used on higher-end routers as well. It is important to note that diagnostic processes sometimes require reverting to process switching. Fast-switched packets will not traverse the route processor, which provides the method by which packets are displayed during debugging. Fast switching may also be inappropriate when bringing traffic from high-speed interfaces to slower ones—this is one area where designers must understand not only the bandwidth potential of their links, but also the actual flow of traffic.

Fast switching guarantees that packets will be processed within 16 processor cycles. Unlike process-switched packets, the router's processor will not be interrupted to facilitate forwarding.

Autonomous Switching
Autonomous switching is comparable to fast switching. When a packet arrives on the interface processor, it checks the switching cache closest to it— the caches that reside on other processor boards. The packet is encapsulated for autonomous switching and sent back to the interface processor. The packet header is not sent to the route processor. Autonomous switching is available only on AGS+ and Cisco 7000 series routers that have high-speed controller interface cards.

Silicon Switching
Silicon switching is available only on the Cisco 7000 with an SSP (Silicon Switch Processor). Silicon-switched packets are compared to the silicon-switching cache on the SSE (Silicon Switching Engine). The SSP is a dedicated switch processor that offloads the switching process from the route processor, providing a fast-switching solution. Designers should note that packets must still traverse the backplane of the router to get to the SSP, and then return to the exit interface. NetFlow switching (defined below) and multilayer switching are more efficient than silicon switching.

Optimum Switching
Optimum switching follows the same procedure as the other switching algorithms. When a new packet enters the interface, it is compared to the optimum-switching cache, rewritten, and sent to the chosen exit interface. Other packets associated with the same session then follow the same path. All processing is carried out on the interface processor, including the CRC (cyclical redundancy check). Optimum switching is faster than both fast switching and NetFlow switching, unless you have implemented several access lists.

Optimum switching replaces fast switching on high-end routers. As with fast switching, optimum switching must be turned off in order to view packets while troubleshooting a network problem. Optimum switching is the default on 7200 and 7500 routers.

Distributed Switching
Distributed switching occurs on the VIP (Versatile Interface Processor) cards, which have a switching processor onboard, so it's very efficient. All required processing is done right on the VIP processor, which maintains a copy of the router's routing cache. With this arrangement, even the first packet needn't be sent to the route processor to initialize the switching path, as it must with the other switching algorithms. Router efficiency increases as more VIP cards are added.

It is important to note that access lists cannot be accommodated with distributed switching.

NetFlow Switching
NetFlow switching is both an administrative tool and a performance-enhancement tool that provides support for access lists while increasing the volume of packets that can be forwarded per second. It collects detailed data for use with circuit accounting and application-utilization information. Because of all the additional data that NetFlow collects (and may export), expect an increase in router overhead—possibly as much as a five-percent increase in CPU utilization.

NetFlow switching can be configured on most interface types and can be used in a switched environment. ATM, LAN, and VLAN (virtual LAN) technologies all support NetFlow switching.

NetFlow switching does much more than just switching—it also gathers statistical data, including protocol, port, and user information. All of this is stored in the NetFlow switching cache, according to the individual flow that's defined by the packet information (destination address, source address, protocol, source and destination port, and incoming interface).

The data can be sent to a network management station to be stored and processed. The NetFlow switching process is very efficient: An incoming packet is processed by the fast- or optimum-switching process, and then all path and packet information is copied to the NetFlow cache. The remaining packets that belong to the flow are compared to the NetFlow cache and forwarded accordingly.

The first packet that's copied to the NetFlow cache contains all security and routing information, and if an access list is applied to an interface, the first packet is matched against it. If it matches the access-list criteria, the cache is flagged so that the remaining packets in the flow can be switched without being compared to the list. (This is very effective when a large amount of access-list processing is required.) 文章录入:csh    责任编辑:csh

(0)

相关推荐

  • 交换的类型

    Switching can occur at four levels, which are listed here in order of increasing performance: • Process switching. With this type of switching, an incoming packet is associated with adestination network or subnet entry in the routing table located in

  • Linux系统交换空间介绍

    交换空间是当今计算的一个共同方面,不管操作系统如何.Linux使用交换空间来增加主机可用的虚拟内存量.它可以在常规文件系统或逻辑卷上使用一个或多个专用交换分区或交换文件. 在一台典型的计算机中有两种基本的内存类型.第一种类型,随机存取存储器(RAM),用于存储数据和程序,而这些数据和程序正在由计算机积极使用.除非程序和数据存储在RAM中,否则计算机无法使用它们.RAM是易失性内存:也就是说,如果关闭计算机,存储在RAM中的数据就会丢失. 硬盘是用于长期存储数据和程序的磁性介质.磁性介质是非易失性

  • RabbitMQ .NET消息队列使用详解

    本文实例为大家分享了RabbitMQ .NET消息队列使用方法,供大家参考,具体内容如下 首先下载安装包,我都环境是win7 64位: 去官网下载 otp_win64_19.0.exe  和rabbitmq-server-3.6.3.exe安装好 然后开始编程了: (1)创建生产者类: class Program { private static void Main() { //建立RabbitMQ连接和通道 var connectionFactory = new ConnectionFacto

  • C++中模板和STL介绍详解

    目录 一.模板 1.1.函数模板 1.1.1.两种函数模板的实例化 1.1.2.模板参数的匹配原则 1.2.类模板 二.STL 总结 一.模板 对于一个交换函数,虽然C++支持函数重载,我们可以对多个交换函数起相同的名字: void Swap(int& left, int& right) { int temp = left; left = right; right = temp; } void Swap(double& left, double& right) { doub

  • C++操作.json文件的超详细新手教程

    目录 1.JSON简介 1.1 什么是JSON: 1.2 JSON的优缺点: 1.3 JSON的存储: 2.jsoncpp库介绍 2.1 jsoncpp库的配置使用: 2.2 jsoncpp库内部构成: 3.json文件读取(例) 3.1 json文件: 3.2 源码: 3.3 结果图: 总结 1.JSON简介 1.1 什么是JSON: JSON是一种纯字符串形式的数据,它本身不提供任何方法(函数),非常适合在网络中进行传输.JavaScript.PHP.Java.Python.C++等编程语言

  • C++印刷模板使用方法详解

    目录 一.泛型编程 二.模板(初阶) 1.函数模板 1.单参数类型 2.多参数类型 3.模板函数和自定义函数 2.类模板 3.模板不支持分离编译 在了解string之前,我们需要了解模板等等的一些铺垫知识,让我们开始吧! 一.泛型编程 泛型编程是什么意思呢?我们通过下面的例子来具体了解: void Swap(int& left, int& right) { int temp = left; left = right; right = temp; } void Swap(double&

  • Java 交换两个变量的数值实现方法

    一.参数传递方法 为解决标题问题,首先介绍参数传递方法.目前各类程序设计语言的参数传递方法主要有三种: 1.按值传递 2.按引用传递 3.按指针传递 其中按值传递表示方法(函数)接收的是调用者提供的变量的拷贝,不改变参数的值:按引用传递表示方法(函数)接收的调用者提供的变量地址:按指针传递表示方法(函数)接收的是调用者提供的指针的拷贝,不改变指针的值和地址,但可以改变指针所指向的地址. 二.Java参数传递方法 Java提供的参数传递方法,很遗憾只有一种,按值传递.也就是说,方法得到的是所有参数

  • Lua中的变量类型与语句学习总结

    1. Lua类型 1.1 基本类型 Lua是一种动态类型语言,没有类型定义的语法.Lua一共有8种基础类型:nil(空).boolean(布尔).number(数字).string(字符串).userdata(自定义类型).function(函数).thread(线程).table(表). 函数type可根据一个值返回其类型名称(字符串),如print(type(print)),输出"function":print(type(type(X))) ,输出"string"

  • 深入理解golang的基本类型排序与slice排序

    前言 其实golang的排序思路和C和C++有些差别. C默认是对数组进行排序, C++是对一个序列进行排序, Go则更宽泛一些,待排序的可以是任何对象, 虽然很多情况下是一个slice(分片, 类似于数组),或是包含 slice 的一个对象. 排序(接口)的三个要素: 1.待排序元素个数 n : 2.第 i 和第 j 个元素的比较函数 cmp : 3.第 i 和 第 j 个元素的交换 swap : 乍一看条件 3 是多余的, c 和 c++ 都不提供 swap . c 的 qsort 的用法:

  • js读取并解析JSON类型数据的方法

    本文实例讲述了js读取并解析JSON类型数据的方法.分享给大家供大家参考,具体如下: 一.什么是JSON? JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式,采用完全独立于语言的文本格式,是理想的数据交换格式,同时,JSON是 JavaScript 原生格式. 非常适合于服务器与 JavaScript 的交互 二.为什么使用JSON而不是XML 他们都是这样说的:尽管有许多宣传关于 XML 如何拥有跨平台,跨语言的优势,然而,除非应用于 Web Ser

随机推荐