# 环路排查方法

**网络环路可能导致的问题**

1. 延迟高或丢包，ping丢包（规律性丢包可能是正常的，因为icmp-guard）
2. 网络不通，直连不通都有可能是网络环路导致的
3. 网络很不稳定，有时候正常有时候很异常，而且是突然这样的&#x20;

### **总结网络环路的排查手段**

#### 1.查看接口流量

看接口流量的大小，广播或组播流量远远大于单播流量时就需要注意可能有网络环路。命令：`show int cou su/rate`，如下

```
Ruijie#show int cou su
Interface     InOctets             InUcastPkts          InMulticastPkts      InBroadcastPkts
---------     --------             -----------          ---------------      ---------------
Gi0/1         1352928182262        6046758435           3133                 5145
Gi0/2         2815459398           985901               2899749              13840740
Gi0/3         655943               3172                 675                  113
Gi0/4         1410454              7915                 1381                 220
Gi0/5         1396609794           2251092              618                  147
Gi0/6         5218941808           27930292             1790                 40860
Gi0/7         1809831016           7672385              1412216              85102
Gi0/8         10100511             69750                449                  3245
Gi0/9         47776315192          347545002            1803202              2196731
Gi0/10        62686109434          238684595            1980306              1669662
Gi0/11        50451173302          273637695            2075094              2756593
Gi0/12        0                    0                    0                    0
Gi0/13        93481466938          303767633            3002017              3979562
Gi0/14        14564650804          48189919             1101320              165894
Gi0/15        61004395008          276792287            2507731              909298
Gi0/16        69856378561          245801142            2275661              689560
Gi0/17        99270987702          257000192            2178309              1096039
Gi0/18        84507643319          266152957            2013117              1182905
Gi0/19        74276217033          243431318            2905349              2343479
Gi0/20        48522347581          233569647            2263506              593703
Gi0/21        58844900325          202207972            2209887              402886
Gi0/22        76981324773          234551326            2042537              752574
Gi0/23        0                    0                    0                    0
Gi0/24        22279890006          117226691            1689399              406492
Gi0/25        0                    0                    0                    0
Gi0/26        0                    0                    0                    0
Gi0/27        6421524              6965                 174                  119
Gi0/28        0                    0                    0                    0
Te0/29        0                    0                    0                    0
Te0/30        0                    0                    0                    0
Te0/31        6158573801596        5099892755           0                    265681
Te0/32        0                    0                    0                    0

```

&#x20;**备注**：`show int cou su`可能数据特别庞大，有时候需要清除，命令是：`clear cou`，然后过十几秒`show int cou su`再看看

#### 2.查看接口mac地址

查看日志，是否有mac地址偏移的日志提示（关键字：mac flapping ），或者`show mac` 的时候是否有mac地址异常的情况（g0/13口只连接了一台电脑），若是则有网络

```
RG-S5750C#show mac interface gigabitEthernet 0/13
Vlan     MAC Address       Type     Interface                Time
----     -----------       ----     ---------                ----
   1     8005.88a3.d42c    DYNAMIC  GigabitEthernet 0/13     2019-9-27 17:08:47
  10     0452.f395.26dd    DYNAMIC  GigabitEthernet 0/13     2019-10-14 18:03:04
  50     8005.88a3.d42d    DYNAMIC  GigabitEthernet 0/13     2019-10-16 11:22:02

```

#### 3.查看下联设备

`show lldp nei`来查看，若有网络环路，`show lldp nei` 可能就看到异常的情况，比如一个接口连接连接了好几个设备。

#### 4.开启RLDP

全部全局和接口开启RLDP，惩罚机制设置为警告即可，看看有没有异常提示，如果RLDP有异常提示，那么就很可能有网络环路。

#### 5.查看日志

查看日志，是否有大量的LLDP抖动情况或者NFPP的提示，若有，可能出现网络环路（用于网络环路方便定位）

#### 6.逐一排除

有些网络环路不明显，以上均无法定位网络环路。那么只能与逐一shutdown接口，看看shutdown哪一个接口后，业务恢复正常，就说明很可能是这个接口下存在网络环路（危险操作，shutdown接口会导致断网）


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kerwin.gitbook.io/ruijie/jiao-huan-chan-pin/rldp/huan-lu-pai-cha-fang-fa.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
