通常情况下NAS存储网络布线为双上联对称布线,交换机推荐做堆叠,存储和交换机分别配置链路聚合(推荐LACP),此网络环境为对称网络环境。
但在非对称网络环境中,比如华为的mlag技术,交换机可以不堆叠,但可以通过端口互联实现跨交换机端口绑定功能。这样跨交换机绑定的端口其中一个端口down掉后,在netapp C-mode默认网络配置中有可能造成有的请求无法收到回包,有的正常。通常情况下会从网络层面排除故障,具体原因NetApp厂商给了如下回复及解决办法:
该中情况是由于NetApp 缺省开启了IP fast path,这个功能 是NetApp 的网络优化的机制之一,默认情况下是开启的。
目的是避免路由表的查询,回包时会使用incoming traffic 相同的端口。
What is fast path?
Fast path is an alternative routing mechanism to the routing table, in which the responses to incoming network traffic are sent back by using the same interface as the incoming traffic. By avoiding the routing table lookup, fast path provides a shorter route for data access. Fast path is used in all TCP and NFS/UDP protocols.
但是对于某些特殊的网络环境, 比如非对称路由,或者开启了Vpc 环境中是不适合的,可能导致网络的异常。
原因是开启了ip fast path 后, 存储会回复真实的switch or route 的MAC address 而不是虚拟的MAC address.
Fastpath is a feature that is enabled by default in Data ONTAP systems. Essentially, Fastpath eliminates overhead used by the routing logic (that is, route table lookups) by sending frames out of the same interface that we received the traffic on. This is done via interface to MAC address caching. This feature has been in place and used by NetApp for years. Other vendors do this as well.
Due to fastpath caching incoming MAC address information, considerations should be made when HSRP is in use in combination with vPCs as well. From the perspective of the storage system, if a frame arrives on an ethernet interface on the storage system with the physical MAC address of the switch, then the load balancing algorithim of a vif or ifgrp could choose to return the traffic to the originating MAC address through an interface connected to the neighboring switch (that does not use that MAC address), causing the potential for performance degradation or packet loss due to traffic traversing the peer-link.
通过抓包的结果分析,NetApp用源端主机发送过来MAC来做二层的封装,而没有查询本地路由表和ARP表,和上述基本一致,因此可以确定原因就是这个了。
通过如下命令关闭此功能:
options -option-name ip.fastpath.enable -option-value off
下面链接详细介绍了fast path的工作原理和过程,供参考。
https://kb.netapp.com/app/answers/answer_view/a_id/1002602/loc/en_US#__highlight
关闭此功能的影响:
此功能只是做了简单的网络优化,即存储端不用查询路由表,而是通过缓存MAC直接进行转发,因此对系统影响可以忽略不计。