FLOGI,PLOGI,PRLI

(2012-03-27 09:37:50)
标签: 

杂谈

 

Logins
There are three different types of login for Fibre Channel. These are:

  • Fabric login
  • Port login
  • Process login

Fabric login
After the fabric capable Fibre Channel device is attached to a fabric switch, it will carry out a fabric login (FLOGI). Similar to port login, FLOGI is an extended link service command that sets up a session between two participants. With FLOGI a session is created between an N_Port or NL_Port and the switch. An N_Port will send a FLOGI frame that contains its Node Name, its N_Port Name, and service parameters to a well-known address of 0xFFFFFE.

A public loop NL_Port first opens the destination AL_PA 0x00 before issuing the FLOGI request. In both cases the switch accepts the login and returns an accept (ACC) frame to the sender. If some of the service parameters requested by the N_Port or NL_Port are not supported, the switch will set the appropriate bits in the ACC frame to indicate this.

When the N_Port logs in it uses a 24-bit port address of 0x000000. Because of this the fabric is allowed to assign the appropriate port address to that device, based on the Domain-Area-Port address format. The newly assigned address is contained in the ACC response frame.

When the NL_Port logs in a similar process starts, except that the least significant byte is used to assign AL_PA and the upper two bytes constitute a fabric loop identifier. Before an NL_Port logs in it will go through the LIP on the loop, which is started by the FL_Port, and from this process it has already derived an AL_PA. The switch then decides if it will accept this AL_PA for this device or not. If not a new AL_PA is assigned to the NL_Port, which then causes the start of another LIP. This ensures that the switch assigned AL_PA does not conflict with any previously selected AL_PAs on the loop.

After the N_Port or public NL_Port gets its fabric address from FLOGI, it needs to register with the SNS. This is done with port login (PLOGI) at the address 0xFFFFFC. The device may register values for all or just some database objects, but the most useful are its 24-bit port address, 64-bit Port Name (WWPN), 64-bit Node Name (WWN), class of service parameters, FC-4 protocols supported, and port type, such as N_Port or NL_Port.

Port login
Port login is also known as PLOGI. Port login is used to establish a session between two N_Ports (devices) and is necessary before any upper level commands or operations can be performed. During the port login, two N_Ports (devices) swap service parameters and make themselves known to each other.

Process login
Process login is also known as PRLI. Process login is used to set up the environment between related processes on an originating N_Port and a responding N_Port. A group of related processes is collectively known as an image pair. The processes involved can be system processes, system images, such as mainframe logical partitions, control unit images, and FC-4 processes. Use of process login is optional from the perspective of Fibre Channel FC-2 layer, but may be required by a specific upper-level protocol as in the case of SCSI-FCP mapping.



N_Port: an end device connecting to a switched fabric network, such as a SCSI initiator or a SCSI target.

F_Port: a port on a switch that provides access to Fabric Services (eg. the Fabric Nameserver & the Fabric Login Server etc)

 

Fabric_point_2_point initialization (ie. N_Port to F_Port initialization) involves the following ordered sequence: FLOGI, PLOGI, PRLI.

 

  • FLOGI
    •           N_Port requests a unique 24-bit address from the Fabric Login Server (accessible via an F_port on a Fabric switch).
  • PLOGI
    •           N_Port informs the Fabric Name Server of its personality and capabilities. For example:
      • WWNN, WWPN
      • Buffer credits for flow control
      • clock frequency ('speed capability')
      • Upper layer protocol support (eg. SCSI-3, IP)
  • PRLI
    • Upper layer protocol communication. Well, ever since SCSI was designed and engineered (1970s, or so, previously SASI...), SCSI initiators need to discover SCSI targets. So, during PRLI, N_Port SCSI initiators discover N_Port SCSI targets (which is an opportunity for the host (maybe a UNIX host) to assign a target ID to the device path).

 

  •      Depending on the OS, you may be able to investigate further with commands like:
  • egrep -i 'flogi|plogi|prli' /var/adm/messages  



一.FC协议(FCP)
FC0)物理
1.     在速度上,有 1Gb/s、2Gb/s、4Gb/s、8Gb/s
 
FC1)传输协议
1.     根据 ANSI X3 T11标准,规定了8B/10B的编码方式和传输协议,包括串行编码、编码规则、特殊字符和错误控制。
 
FC2)数据链路
  1.在数据帧上, FC协议为24字节的帧头(以太网帧为14字节),在这24字节中,包括寻址、传输保障功能。网络和传输的逻辑都用着24字节来传递。以太网TCP/IP协议开销:14帧头+20 IP头+20TCP头(或8字节的UDP头)。
  2.FC协议定义了 2种流控策略,a、端到端的流控;b、缓存到缓存的流控。a比b要上层和高级,如FC终端给另外一个FC终端发送数据帧,它需要先经历缓存-缓存的流控(端-FC交换机),然后再经历缓存-缓存的流控(FC交换机-端),最终到达另外一个终端。端到端的流控实现,是由多个Buffer-Buffer的流控组成的。
  3.MTU,以太网 MTU为1500字节,FC-2的MTU可以到2112字节(该2112为负载大小,整个数据帧包括:帧起始EOF\帧头Frame Header\负载\CRC\帧结束,整个帧为2148字节)。
 
FC2)网路层
  1.拓扑,包括 2种模式,分别为a、FC-AL和Fabric
       FC-AL:类似于共享总线拓扑,连接方式为一条仲裁环路,每个 FC-AL设备首尾相连构成环路,每环路最多128个节点。
       Fabric(Fabric-网状构造)类似交换拓扑,是个网状交换矩阵。其转发效率比FC-AL要高,矩阵中All节点均可点到点通信,此架构总带宽为All端口带宽之和.
  2.寻址,和 Ethernet端口MAC地址类似,每个FC网中设备自身都有个WWNN(该地址在世界范围内是唯一的)。每个FC交换机上的端口都有自己的WWPN地址。FC交换机要处理到FC协议的最上层。
       WWNN:每个 FC设备都被赋予一个WWNN
       WWPN:地址长度为 64位;在路由上,FC协议给每个连接到FC中的接口分配了Fabric ID,用ID来嵌入链路帧中作路由(WWPN与ID类似于MAC与IP关系),该ID长为24位,高8位是Domain区分,中8是Area(地区)区分,低8是PORT区分。
       DomainID:区分交换机本身,该 ID为主交换自动分配,主交换为WWPN最小者
       AreaID:区分同台交换机的不同端口组
       PoreID:区分同个 Area中不同的Port
  3.寻址过程 :
    1).地址映射 :
              a.接入 FC中时,端口发起登录注册动作;
              b.FC Switch收到登录帧后分配 FabricID,并做WWPN与ID的映射;
              c.之后该端口中的帧不会携带 WWPN,而是用ID作为地址。
    2).寻址机制 :
              FC网络中自动分配 \管理各种地址.FC设备会向特定目的ID(这个像WINS)发注册帧,之后,该特定ID将它知道的所有节点信息告知该接口设备.
              ZONE:即分区的意思。同区的节点可以通信,不同区则不可以通信。软 ZONE是FC名称服务不通告的ID就不连接。硬ZONE为底层硬件隔离,即使知道ID也无法连接。
              FC服务 (Fabric):FC Control Service(向FFFFFD-SCR帧,将整个Fabric的变动信息发送给注册该服务的节点);其他的还有时间服务、别名服务等。
  FC的链路层和网络层被合并为一层——“ FC2”
 
(FC3)公共服务
  1.端口间的结构协议和流动控制 ,有3个服务:条带化(Striping:多端口多连接并行传输)\搜索组(Hunt Group:是一个节点上一组端口来响应同一地址,降低单个端口的占线概率,)\多播(Multicast:将信息传递到多个目的地址).
  2.一个节点只有一个 FC-3层,它为同节点上的多个上层提供服务,它利用FC2层(可能是多个基于端口的FC2层)实现公共服务.
  3.HDS说该层还包含数据加密和压缩
4. FC-3 层为可以跨端口定义功能
 
(FC4)映射层
  1.为 FC协议最高层,规定上层协议到FC协议的映射,当前映射有:HBA的接口(FC-VI);IO通道-SCSI\IPI3\HIPPI\SBCCS;网络-802.2\IP\ATM.
  2.它还有一个角色是分割 ,ULP(上层)发过来的包,被FC4分割成"信息单元",然后交给下层,下层会把分割好的Unit赋予序列ID.
  3.HDS说 ,FC-4主要协议为FC-SCSI(SCSI-3),IPI-3命令集映射,FC链路封装(FC-LE),FC-ATM,FC-VI(HBA驱动下的FC4接口函数).
关于 FCP可参考赵文辉的"网络存储技术",那里写的比较详细.
 
FCP综述:每个服务器 \交换机\存储设备本身被视为节点,连接的端口(HBA)就是N端口,一个节点中可能有多个端口,其中FC-3、FC-4的实现是在节点上,且只有一个FC-3\FC-4实现,FC-0、FC-1、FC-2的实现是在每一个端口上实现的,一个节点可能有多个FC-0\FC-1\FC-2实现.
.FCP中的7个端口——终端(N、L、NL);交换机(F、FL、E、G);
  1.N端口和 F端口:基于Fabric,;N-Node为终端节点一端的接口;F-Fabric为对应的交换机端的接口.
              (FC终端 )N——F(FC交换机).
  2.L端口 :基于FC-A;L口是AL中ALL-Node的端口类型(LOOP).
              私有环 _封闭的、不能与环外通信.
              开放环 _开放的、可以和环外通信.
  3.NL端口和 FL端口:基于FC-AL开放环;NL有N、L口的双重能力;FL是连接Fabric和AL的中介口.
              只有 NL口-Node才能和环外通信.
              NL与环外通讯时 ,不需MAP,只要Tunnel过程即可
              L口与环外通讯时 ,需要MAP映射(N与L,Fabric与AL)
  4.E端口 :交换机和交换机的端口连接专用.
  5.G端口 :万能口,可转变为以上任何一种口,方式为自动协商.
端口编址 :N\NL\L 的FC ID均为24位(3字节)长.
  6.端口:分为传送 (TX)和接受(RX)两部分,有一个唯一的节点名称。
.FC协议中的保留地址
 

 

地址
作用
000000
未定义N_Port 标识。
FFFFFA
管理服务器(Management Server)。
FFFFFB
时间服务器。
FFFFFC
目录服务器或名称服务器(Name Server)。用于让设备查询 FC网络中其他设备的存在
FFFFFD
Fabric 控制器(Fabric Controller)。通过发送RSCN 让设备了解网
络中的变化 (设备加入\离线\ZONE变化)。
FFFFFE
Fabric 登录服务器预留地址。接收 FLOGI。分配地址(ID),并作好WWN与ID的映射
FFFFFF
广播地址。如果支持这一可选功能, Fabric 就会将所有传输到这一地
址的帧发送到所连接的所有N_Port。

 

 
 
 
 
附录:
   FCoE
  FCoE:Fibre Channel over Ethernet 以太网光纤通道(参考自 中国高新技术产业报 2007.05.07 第C02版)
  FCoE是去年4月份由数家IT厂商向美国国家标准协会(ANSI)T11委员会提交的一种新技术标准的提案。该提案目前还未获得最终批准,但于今年2月份取得了突破性进展,在今年6月份就会有正式符合标准的FCoE产品出现。
  FCoE技术标准可以将光纤通道地映射到以太网,从而可以在以太网上传输SAN数据。它能够保护客户在现有FC-SAN上的投资(如FC-SAN的各种工具、员工的培训、已建设的FC-SAN设施及相应的管理架构)的基础上,提供一种以FC存储协议为核心的I/O整合方案。
  当前的FCoE技术标准提案可以使用任何速度的网卡,但需要网卡支持802.3x PAUSE机制。
  FCoE面向的是10G以太网,其应用的优点是在维持原有服务的基础上,可以大幅减少服务器上的网络接口数量(同时减少了电缆、节省了交换机端口和管理员需要管理的控制点数量),从而降低了功耗,给管理带来方便。此外它还提高了系统的可用性。
  根据FCoE的路线图,FCoE标准将在今年批准,10G的FCoE产品可望在2009年出现。
  当前已知的开源FCoE项目是Open-FCoE,其地址为:www.open-fcoe.org
  更多的信息请参考:
  http://www.fibrechannel.org
  http://www.fcoe.com
   
 
附录2:WWN定义
 

---------------------------------------------------------------------------------

 
附录3:FC协议——网络服务

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值