About Me
Dec 30, 2008
三层交换机和路由器的区别
但如果从二者的历史的发展的角度去寻找,我们还是能够找出一些差别的:
路由器的历史比较久远一些,80年代中期思科就推出了业界第一台路由器。路由器的推出是为了解决远程的、 不同网段的互连互通,所谓“路由”就是根据网络上数据包(如IP Packet)的目的地址(如IP地址)查表, 以决定并将该数据包转发到通往目的地的“下一跳”。由于路由算法比较复杂, 早期的路由器一般都是基于CPU以“单跳时钟”指令计算的方式来处理和转发数据包,这种方式转发数据包的效率是比较低的。 但我们不要忘了,在当时,远程广域的互连互通是第一位的,而需要并用得起路由器的是大企业大机构(如银行)。一方面, 承载数据的广域网链路速度比较低(低于1个E1=2Mbps,如PSTN、ISDN、DDN、Frame Relay等),另一方面当时的应用以UNIX主机计算为主,所以网络传输的速度并不是大问题。
总结起来,传统的路由器有3个特点:
1、基于CPU的单步时钟处理机制
2、能够处理复杂的路由算法和协议
3、主要用于广域网的低速数据链路
进入90年代,PC机的飞速发展,导致以太网和TCP/IP协议的迅速崛起和广泛应用,企业内部网络越来越庞大, Internet已经成为最大的广域网,企业的远程互连互通已经越来越从自建(租)的专网转向Internet。 这些变化直接导致了交换机的出现,路由器的升级换代,以及路由器和交换机的融合。
最早的以太网交换机于95年前后问世,其前身是网桥。网桥工作在网络的第二层,它的作用之一是隔离网络广播风暴。我们知道, 以太网上主机之间通讯链路的建立很大程度上依赖于一种广播包,严格来说广播包只负责建立和维系通讯而不传送有效的数据, 当网络上主机数量增大时广播包会以指数级增长,占用太多带宽,降低网络效率(权威的说法,一个以太网段的主机数量不要超过30台, 超过时就应该用网桥加以隔离)。网桥很像一个有着左膀和右臂的人, 它根据以太网上数据帧(Frame)的目的MAC地址决定是否将帧在左右手之间交换。广播包是没有目的地址的(意味着给所有人), 所以被隔断。我们可以把交换机理解成一个多端口的网桥,连接在它的每一个端口上的主机或网段独享带宽,各端口之间的交换相对独立, 提高了网络效率。交换机工作在网络第二层,算法相对简单,很快就有芯片厂家将其固化, 生产出交换机的核心ASIC芯片,推出硬件的线速度交换机。
总结起来,传统的交换机有3个特点:
1、基于ASIC硬件,线速度交换
2、工作在网络第二层,主要是以太网
3、主要用于局域网的快速数据交换
随着企业内部网络的进一步扩到,主机增加到成百上千台,网络第三层的广播风暴成为了问题(权威的说法: 一个TCP/IP网段上的主机数量不要超过300台)。传统的交换机工作在网络第二层,不能隔离三层的广播。 一个的解决办法是在交换机上做VLAN隔离,再将VLAN上汇聚到上级路由器上,由路由器实现不同网段(3层网段)之间的路由转发。 这就是最初的路由+交换模型,典型的产品是CISCO的Catalyst 5500路由交换机。
路由+交换是一个过渡产品, 今天的三层交换机在体系结构上已有很大的改观,路由和交换通过ASIC充分揉合,第一个包经过路由算法确定路径后, 后续的数据包交由交换引擎实现线速度交换。当然,把所有的路由算法都固化还很困难, 这就是今天的三层交换机要么不能100%实现线速交换,要么只能支持有限的简单的路由协议的原因。
传统的路由器随着Internet的发展也继续保持其生命力。复杂的协议(如BGP、MPLS), 新的功能和应用(如VPN、Security)都离不开软件和CPU的计算,但路由器在体系结构上也进行了非常大的改进, 并融合了越来越多的固件和ASIC。
路由和交换的发展透析着IT产业软件和硬件的演变,并将随着人们对功能和性能的不懈追求而继续演变下去。
交换机和路由器的几点区别
将网络互相连接起来要使用一些中间设备(或中间系统),ISO的术语称之为中继(relay)系统。根据中继系统所在的层次,可以有以下五种中继系统:
1.物理层(即常说的第一层、层L1)中继系统,即转发器(repeater)。
2.数据链路层(即第二层,层L2),即网桥或桥接器(bridge)。
3.网络层(第三层,层L3)中继系统,即路由器(router)。
4.网桥和路由器的混合物桥路器(brouter)兼有网桥和路由器的功能。
5.在网络层以上的中继系统,即网关(gateway).
当中继系统是转发器时,一般不称之为网络互联,因为这仅仅是把一个网络扩大了,而这仍然是一个网络。高层网关由于比较复杂,目前使用得较少。因此一般讨论网络互连时都是指用交换机和路由器进行互联的网络。本文主要阐述交换机和路由器及其区别。
2 交换机和路由器
“交换”是今天网络里出现频率最高的一个词,从桥接到路由到ATM直至电话系统,无论何种场合都可将其套用,搞不清到底什么才是真正的交换。其实交换一词最早出现于电话系统,特指实现两个不同电话机之间话音信号的交换,完成该工作的设备就是电话交换机。所以从本意上来讲,交换只是一种技术概念,即完成信号由设备入口到出口的转发。因此,只要是和符合该定义的所有设备都可被称为交换设备。由此可见,“交换”是一个涵义广泛的词语,当它被用来描述数据网络第二层的设备时,实际指的是一个桥接设备;而当它被用来描述数据网络第三层的设备时,又指的是一个路由设备。
我们经常说到的以太网交换机实际是一个基于网桥技术的多端口第二层网络设备,它为数据帧从一个端口到另一个任意端口的转发提供了低时延、低开销的通路。
由此可见,交换机内部核心处应该有一个交换矩阵,为任意两端口间的通信提供通路,或是一个快速交换总线,以使由任意端口接收的数据帧从其他端口送出。在实际设备中,交换矩阵的功能往往由专门的芯片(ASIC)完成。另外,以太网交换机在设计思想上有一个重要的假设,即交换核心的速度非常之快,以致通常的大流量数据不会使其产生拥塞,换句话说,交换的能力相对于所传信息量而无穷大(与此相反,ATM交换机在设计上的思路是,认为交换的能力相对所传信息量而言有限)。
虽然以太网第二层交换机是基于多端口网桥发展而来,但毕竟交换有其更丰富的特性,使之不但是获得更多带宽的最好途径,而且还使网络更易管理。
而路由器是OSI协议模型的网络层中的分组交换设备(或网络层中继设备),路由器的基本功能是把数据(IP报文)传送到正确的网络,包括:
1.IP数据报的转发,包括数据报的寻径和传送;
2.子网隔离,抑制广播风暴;
3.维护路由表,并与其他路由器交换路由信息,这是IP报文转发的基础。
4.IP数据报的差错处理及简单的拥塞控制;
5.实现对IP数据报的过滤和记帐。
对于不同地规模的网络,路由器的作用的侧重点有所不同。
在主干网上,路由器的主要作用是路由选择。主干网上的路由器,必须知道到达所有下层网络的路径。这需要维护庞大的路由表,并对连接状态的变化作出尽可能迅速的反应。路由器的故障将会导致严重的信息传输问题。
在地区网中,路由器的主要作用是网络连接和路由选择,即连接下层各个基层网络单位--园区网,同时负责下层网络之间的数据转发。
在园区网内部,路由器的主要作用是分隔子网。早期的互连网基层单位是局域网(LAN),其中所有主机处于同一逻辑网络中。随着网络规模的不断扩大,局域网演变成以高速主干和路由器连接的多个子网所组成的园区网。在其中,处个子网在逻辑上独立,而路由器就是唯一能够分隔它们的设备,它负责子网间的报文转发和广播隔离,在边界上的路由器则负责与上层网络的连接。
3 第二层交换机和路由器的区别
传统交换机从网桥发展而来,属于OSI第二层即数据链路层设备。它根据MAC地址寻址,通过站表选择路由,站表的建立和维护由交换机自动进行。路由器属于OSI第三层即网络层设备,它根据IP地址进行寻址,通过路由表路由协议产生。交换机最大的好处是快速,由于交换机只须识别帧中MAC地址,直接根据MAC地址产生选择转发端口算法简单,便于ASIC实现,因此转发速度极高。但交换机的工作机制也带来一些问题。
1.回路:根据交换机地址学习和站表建立算法,交换机之间不允许存在回路。一旦存在回路,必须启动生成树算法,阻塞掉产生回路的端口。而路由器的路由协议没有这个问题,路由器之间可以有多条通路来平衡负载,提高可靠性。
2.负载集中:交换机之间只能有一条通路,使得信息集中在一条通信链路上,不能进行动态分配,以平衡负载。而路由器的路由协议算法可以避免这一点,OSPF路由协议算法不但能产生多条路由,而且能为不同的网络应用选择各自不同的最佳路由。
3.广播控制:交换机只能缩小冲突域,而不能缩小广播域。整个交换式网络就是一个大的广播域,广播报文散到整个交换式网络。而路由器可以隔离广播域,广播报文不能通过路由器继续进行广播。
4.子网划分:交换机只能识别MAC地址。MAC地址是物理地址,而且采用平坦的地址结构,因此不能根据MAC地址来划分子网。而路由器识别IP地址,IP地址由网络管理员分配,是逻辑地址且IP地址具有层次结构,被划分成网络号和主机号,可以非常方便地用于划分子网,路由器的主要功能就是用于连接不同的网络。
5.保密问题:虽说交换机也可以根据帧的源MAC地址、目的MAC地址和其他帧中内容对帧实施过滤,但路由器根据报文的源IP地址、目的IP地址、TCP端口地址等内容对报文实施过滤,更加直观方便。
6.介质相关:交换机作为桥接设备也能完成不同链路层和物理层之间的转换,但这种转换过程比较复杂,不适合ASIC实现,势必降低交换机的转发速度。因此目前交换机主要完成相同或相似物理介质和链路协议的网络互连,而不会用来在物理介质和链路层协议相差甚元的网络之间进行互连。而路由器则不同,它主要用于不同网络之间互连,因此能连接不同物理介质、链路层协议和网络层协议的网络。路由器在功能上虽然占据了优势,但价格昂贵,报文转发速度低。
近几年,交换机为提高性能做了许多改进,其中最突出的改进是虚拟网络和三层交换。
划分子网可以缩小广播域,减少广播风暴对网络的影响。路由器每一接口连接一个子网,广播报文不能经过路由器广播出去,连接在路由器不同接口的子网属于不同子网,子网范围由路由器物理划分。对交换机而言,每一个端口对应一个网段,由于子网由若干网段构成,通过对交换机端口的组合,可以逻辑划分子网。广播报文只能在子网内广播,不能扩散到别的子网内,通过合理划分逻辑子网,达到控制广播的目的。由于逻辑子网由交换机端口任意组合,没有物理上的相关性,因此称为虚拟子网,或叫虚拟网。虚拟网技术不用路由器就解决了广播报文的隔离问题,且虚拟网内网段与其物理位置无关,即相邻网段可以属于不同虚拟网,而相隔甚远的两个网段可能属于不同虚拟网,而相隔甚远的两个网段可能属于同一个虚拟网。不同虚拟网内的终端之间不能相互通信,增强了对网络内数据的访问控制。
交换机和路由器是性能和功能的矛盾体,交换机交换速度快,但控制功能弱,路由器控制性能强,但报文转发速度慢。解决这个矛盾的最新技术是三层交换,既有交换机线速转发报文能力,又有路由器良好的控制功能。
4 第三层交换机和路由器的区别
在第三层交换技术出现之前,几乎没有必要将路由功能器件和路由器区别开来,他们完全是相同的:提供路由功能正在路由器的工作,然而,现在第三层交换机完全能够执行传统路由器的大多数功能。作为网络互连的设备,第三层交换机具有以下特征:
1.转发基于第三层地址的业务流;
2.完全交换功能;
3.可以完成特殊服务,如报文过滤或认证;
4.执行或不执行路由处理。
第三层交换机与传统路由器相比有如下优点:
1.子网间传输带宽可任意分配:传统路由器每个接口连接一个子网,子网通过路由器进行传输的速率被接口的带宽所限制。而三层交换机则不同,它可以把多个端口定义成一个虚拟网,把多个端口组成的虚拟网作为虚拟网接口,该虚拟网内信息可通过组成虚拟网的端口送给三层交换机,由于端口数可任意指定,子网间传输带宽没有限制。
2.合理配置信息资源:由于访问子网内资源速率和访问全局网中资源速率没有区别,子网设置单独服务器的意义不大,通过在全局网中设置服务器群不仅节省费用,更可以合理配置信息资源。
3.降低成本:通常的网络设计用交换机构成子网,用路由器进行子网间互连。目前采用三层交换机进行网络设计,既可以进行任意虚拟子网划分,又可以通过交换机三层路由功能完成子网间通信,为此节省了价格昂贵的路由器。
4.交换机之间连接灵活:作为交换机,它们之间不允许存在回路,作为路由器,又可有多条通路来提高可靠性、平衡负载。三层交换机用生成树算法阻塞造成回路的端口,但进行路由选择时,依然把阻塞掉的通路作为可选路径参与路由选择。
5 结论
综上所述,交换机一般用于LAN-WAN的连接,交换机归于网桥,是数据链路层的设备,有些交换机也可实现第三层的交换。路由器用于WAN-WAN之间的连接,可以解决异性网络之间转发分组,作用于网络层。他们只是从一条线路上接受输入分组,然后向另一条线路转发。这两条线路可能分属于不同的网络,并采用不同协议。相比较而言,路由器的功能较交换机要强大,但速度相对也慢,价格昂贵,第三层交换机既有交换机线速转发报文能力,又有路由器良好的控制功能,因此得以广播应用。
Dec 27, 2008
数据中心中铜缆和光纤的选择

40G/100G Market----study.
需求动力:
大型的数据和交换中心
文件和存储虚拟化
高分辨率的图像和视频
Ethernet
Sonet
Infiniband
Fiberchannel
他们采用相似的FPGA、Serdes和编码技术,这使得任何协议所对应的设备都难以通过量产来获得成本优势,所以他们将共同竞争这个市场。
而不像千兆以太网淘汰Token Ring,FDDI和ATM一样再淘汰其他协议,是因为他很好的价格优势!
Dec 22, 2008
Fibre Channel
Fibre Channel, or FC, is a gigabit-speed network technology primarily used for storage networking. Fibre Channel is standardized in the T11 Technical Committee of the InterNational Committee for Information Technology Standards (INCITS), an American National Standards Institute (ANSI)–accredited standards committee. It started use primarily in the supercomputer field, but has become the standard connection type for storage area networks (SAN) in enterprise storage. Despite common connotations of its name, Fibre Channel signaling can run on both twisted pair copper wire andfiber-optic cables.
Fibre Channel Protocol (FCP) is a transport protocol (similar to TCP used in IP networks) which predominantly transports SCSI commands over Fibre Channel networks.
Fibre Channel started in 1985, with ANSI standard approval in 1994, as a way to simplify the HIPPI system then in use for similar roles. HIPPI used a massive 50-pair cable with bulky connectors, and had limited cable lengths. Fibre Channel was primarily concerned with simplifying the connections and increasing distances, as opposed to increasing speeds. Later, designers added the goals of connecting SCSI disk storage, providing higher speeds and far greater numbers of connected devices.
It also added support for any number of "upper layer" protocols, including SCSI, ATM, and IP, with SCSI being the predominant usage.
| NAME | Line-Rate (Gbps) | Throughput ( MBps) |
| 1GFC | 1.0625 | 100 |
| 2GFC | 2.125 | 200 |
| 4GFC | 4.25 | 400 |
| 8GFC | 8.5 | 800 |
| 10GFC Serial | 10.51875 | 1000 |
| 20GFC | 10.52 | 2000 |
| 10GFC Parallel | 12.75 |
Fibre Channel topologies
There are three major Fibre Channel topologies, describing how a number of ports are connected together. A port in Fibre Channel terminology is any entity that actively communicates over the network, not necessarily a hardware port. This port is usually implemented in a device such as disk storage, an HBA on a server or a Fibre Channel switch.
- Point-to-Point (FC-P2P). Two devices are connected back to back. This is the simplest topology, with limited connectivity.
- Arbitrated loop (FC-AL). In this design, all devices are in a loop or ring, similar to token ring networking. Adding or removing a device from the loop causes all activity on the loop to be interrupted. The failure of one device causes a break in the ring. Fibre Channel hubs exist to connect multiple devices together and may bypass failed ports. A loop may also be made by cabling each port to the next in a ring.
- A minimal loop containing only two ports, while appearing to be similar to FC-P2P, differs considerably in terms of the protocol.
- Switched fabric (FC-SW). All devices or loops of devices are connected to Fibre Channel switches, similar conceptually to modern Ethernet implementations. Advantages of this topology over FC-P2P or FC-AL include:
- The switches manage the state of the fabric, providing optimized interconnections.
- Multiple pairs of ports may communicate simultaneously.
- Failure of a port is isolated and should not affect operation of other ports.
| Attribute | Point-to-Point | Arbitrated loop | Switched fabric |
|---|---|---|---|
| Max ports | 2 | 127 | ~16777216 (224) |
| Address size | N/A | 8-bit ALPA | 24-bit port ID |
| Side effect of port failure | N/A | Loop fails (until port bypassed) | N/A |
| Mixing different link rates | N/A | No | Yes |
| Frame delivery | In order | In order | Not guaranteed |
| Access to medium | Dedicated | Arbitrated | Dedicated |
Fibre Channel layers
Fibre Channel is a layered protocol. It consists of 5 layers, namely:
- FC0 The physical layer, which includes cables, fiber optics, connectors, pinouts etc.
- FC1 The data link layer, which implements the 8b/10b encoding and decoding of signals.
- FC2 The network layer, defined by the FC-PI-2 standard, consists of the core of Fibre Channel, and defines the mainprotocols.
- FC3 The common services layer, a thin layer that could eventually implement functions like encryption or RAID.
- FC4 The Protocol Mapping layer. Layer in which other protocols, such as SCSI, are encapsulated into an information unit for delivery to FC2.
FC0, FC1, and FC2 are also known as FC-PH, the physical layers of fibre channel.
Fibre Channel routers operate up to FC4 level (i.e. they may operate as SCSI routers), switches up to FC2, and hubs on FC0 only.
Fibre Channel products are available at 1 Gbit/s, 2 Gbit/s, 4 Gbit/s, 8 Gbit/s, 10 Gbit/s and 20 Gbit/s. Products based on the 1, 2, 4 and 8 Gbit/s standards should be interoperable, and backward compatible. The 10 Gbit/s standard (and 20 Gbit/s derivative), however, is not backward compatible with any of the slower speed devices, as it differs considerably on FC1 level (64b/66b encoding instead of 8b/10b encoding). 10Gb and 20Gb Fibre Channel is primarily deployed as a high-speed "stacking" interconnect to link multiple switches.
Ports
The following types of ports are defined by Fibre Channel:
- node ports
- N_port is a port on the node (e.g. host or storage device) used with both FC-P2P or FC-SW topologies. Also known as Node port.
- NL_port is a port on the node used with an FC-AL topology. Also known as Node Loop port.
- F_port is a port on the switch that connects to a node point-to-point (i.e. connects to an N_port). Also known as Fabric port. An F_port is not loop capable.
- FL_port is a port on the switch that connects to a FC-AL loop (i.e. to NL_ports). Also known as Fabric Loop port.
- E_port is the connection between two fibre channel switches. Also known as an Expansion port. When E_ports between two switches form a link, that link is referred to as an inter-switch link (ISL).
- EX_port is the connection between a fibre channel router and a fibre channel switch. On the side of the switch it looks like a normal E_port, but on the side of the router it is a EX_port.
- TE_port * a Cisco addition to Fibre Channel, now adopted as a standard. It is an extended ISL or EISL. The TE_port provides not only standard E_port functions but allows for routing of multiple VSANs (Virtual SANs). This is accomplished by modifying the standard Fiber Channel frame (vsan tagging) upon ingress/egress of theVSAN environment. Also known as Trunking E_port.
- general (catch-all) types
- Auto or auto-sensing port found in Cisco switches, can automatically become an E_, TE_, F_, or FL_port as needed.
- Fx_port a generic port that can become a F_port (when connected to a N_port) or a FL_port (when connected to a NL_port). Found only on Cisco devices where oversubscription is a factor.
- G_port or generic port on a switch can operate as an E_port or F_port. Found on Brocade and McData switches.
- L_port is the loose term used for any arbitrated loop port, NL_port or FL_port. Also known as Loop port.
- U_port is the loose term used for any arbitrated port. Also known as Universal port. Found only on Brocade switches.
(*Note: The term "trunking" is not a standard Fiber Channel term and is thereby used by vendors interchangably. For example: A trunk (an aggregation of ISLs) in a Brocade device is referred to as a Port Channel by Cisco. Whereas Cisco refers to trunking as an EISL.)
Optical carrier medium variants
| Media Type | Speed (Mbyte/s) | Transmitter | Variant | Distance |
|---|---|---|---|---|
| Single-Mode Fiber | 400 | 1300 nm Longwave Laser | 400-SM-LL-I | 2 m - 2 km |
| 200 | 1550 nm Longwave Laser | 200-SM-LL-V | 2 m - >50 km | |
| 1300 nm Longwave Laser | 200-SM-LL-I | 2 m - 2 km | ||
| 100 | 1550 nm Longwave Laser | 100-SM-LL-V | 2 m - >50 km | |
| 1300 nm Longwave Laser | 100-SM-LL-L | 2 m - 10 km | ||
| 1300 nm Longwave Laser | 100-SM-LL-I | 2 m - 2 km | ||
| Multimode Fiber (50µm) | 400 | 850 nm Shortwave Laser | 400-M5-SN-I | 0.5 m - 150m |
| 200 | 200-M5-SN-I | 0.5 m - 300m | ||
| 100 | 100-M6-SN-I | 0.5 m - 300m | ||
| 100-M6-SL-I | 2 m - 175m |
Modern FibreChannel devices support SFP.
Fibre Channel infrastructure
Fibre Channel switches are divided into two classes. These classes are not part of the standard, and the classification of every switch is a marketing decision of the manufacturer.
- Directors offer a high port-count in a modular (slot-based) chassis with no single point of failure (high availability).
- Switches are typically smaller, fixed-configuration (sometimes semi-modular), less redundant devices.
Brocade, Cisco and QLogic provide both directors and switches.
If multiple switch vendors are used in the same fabric (i.e. fabric is heterogeneous), the fabric will default to "interoperability mode", that is to a pure standardized Fibre Channel protocol. Some proprietary, advanced features may be disabled.
Fibre Channel Host Bus Adapters
Fibre Channel HBAs are available for all major open systems, computer architectures, and buses, including PCI andSBus. Some are OS dependent. Each HBA has a unique World Wide Name (WWN), which is similar to an Ethernet MAC addressin that it uses an Organizationally Unique Identifier (OUI) assigned by the IEEE. However, WWNs are longer (8 bytes). There are two types of WWNs on a HBA; a node WWN (WWNN), which is shared by all ports on a host bus adapter, and aport WWN (WWPN), which is unique to each port. Some Fibre Channel HBA manufacturers are Brocade, Emulex, LSI,QLogic, and ATTO Technology.
Blog Archive
-
▼
2008
(35)
-
▼
December
(26)
- 三层交换机和路由器的区别
- 交换机和路由器的几点区别
- 数据中心中铜缆和光纤的选择
- 40G/100G Market----study.
- Fibre Channel
- Firewall主要参数
- IEEE 1588是什么?
- Burst mode clock and data recovery
- 什么是NGN?
- RDMA技术分析
- RDMA over TCP的协议栈工作过程浅析
- TOE技术以及TOE网卡的工作原理
- 云计算和云存储的关系
- 深度剖析云存储
- SAN网络存储共享软件全攻略
- iSCSI存储技术全攻略
- Gartner分析:十大颠覆性数据中心技术
- ROCket I/O简介
- 串行通信技术SERDES正成为高速接口的主流
- FPGA实现中的SERDES接口设计和测试
- 人要进城,心要进门!
- 总线和背板技术
- 高速串列通訊技術的發展、設計及應用
- Status!
- SPICE模型
- IBIS与SPICE模型对比
-
▼
December
(26)