对 10、40 和 100 千兆以太网接口执行环回测试
对 10、40 和 100 千兆以太网接口使用环回测试的清单
目的
使用环回测试隔离 10、40 和 100 千兆以太网接口问题。
操作
表 1 提供用于对 10、40 和 100 千兆以太网接口使用环回测试的链接和命令。
任务 |
命令或操作 |
---|---|
诊断使用千兆以太网接口的可疑硬件问题 | |
将传输端口连接到接收端口。 |
|
|
|
|
|
|
|
|
|
|
|
|
|
诊断可疑电路问题 | 执行 诊断使用快速以太网或千兆以太网接口的可疑硬件问题中的步骤 2 到 8。使用快速以太网或千兆以太网接口诊断可疑硬件问题 |
诊断使用千兆以太网接口的可疑硬件问题
问题
Description
当您怀疑硬件问题时,请执行以下步骤来帮助验证是否存在问题。
创建环回
您可以创建物理环路或配置本地环路来帮助诊断可疑的硬件问题。建议创建物理环回,因为它允许您测试和验证传输和接收端口。如果没有现场工程师创建物理环路,您可以为接口配置本地环路。本地环路在物理接口卡 (PIC) 内部创建环路。
为光纤接口创建物理环路
操作
要在端口上创建物理环回,请使用已知良好的光纤电缆将传输端口连接到接收端口。
确保对单模端口使用单模光纤,对多模端口使用多模光纤。
意义
创建并测试物理环回时,将测试 PIC 的传输和接收端口。如果有现场工程师可以创建物理环路,建议执行此操作,因为它提供了更完整的 PIC 测试。
另请参阅
配置本地环路
操作
若要配置本地环回而不将传输端口物理连接到接收端口,请执行以下步骤:
在配置模式下,转到以下层次结构级别:
[edit] user@router# edit interfaces
interface-name
gigether-options配置本地环路:
[edit interfaces
interface-name
gigether-options user@router# set loopback验证配置:
user@router# show
例如:
[edit interfaces xe-2/0/0 gigether-options] user@router# show loopback;
提交更改:
user@router# commit
例如:
[edit interfaces xe-2/0/0 gigether-options] user@router# commit commit complete
创建本地环回时,将在正在测试的接口上创建内部环路。本地环回在该 PIC 上内部循环流量。本地环回测试 PIC 的互连,但不测试发送和接收端口。在以太网接口上,您无法创建远程环回,因此没有使用 or 语句的选项。local
remote
只需在层次结构级别包含 语句,即可将接口置于本地环回模式。loopback
[edit interfaces interface-name
gigether-options
请记住在完成测试后删除环回语句。
另请参阅
验证千兆以太网接口是否已启动
目的
显示千兆以太网接口的状态,以提供确定物理链路是打开还是关闭所需的信息。
操作
要验证千兆以太网接口的状态是否为 up,请使用以下 Junos OS 命令行界面 (CLI) 操作模式命令:
user@router> show interfaces (xe-fpc
/pic
/port
| et-fpc
/pic
/port
)
示例输出
user@router# show interfaces xe-2/0/0 extensive Physical interface: xe-2/0/0, Enabled, Physical link is Up Interface index: 187, SNMP ifIndex: 591, Generation: 190 Link-level type: Ethernet, MTU: 1514, MRU: 1522, LAN-PHY mode, Speed: 10Gbps, BPDU Error: None, Loop Detect PDU Error: None, MAC-REWRITE Error: None, Loopback: Local, Source filtering: Disabled, Flow control: Enabled, Speed Configuration: Auto Pad to minimum frame size: Disabled Device flags : Present Running Loop-Detected Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Schedulers : 0 Hold-times : Up 4000 ms, Down 0 ms Damping : half-life: 0 sec, max-suppress: 0 sec, reuse: 0, suppress: 0, state: unsuppressed Current address: d8:18:d3:b3:6d:ea, Hardware address: d8:18:d3:b3:6d:ea Last flapped : 2019-04-20 17:13:55 PDT (13w4d 21:42 ago) Statistics last cleared: 2019-07-25 14:55:21 PDT (00:01:01 ago) Traffic statistics: Input bytes : 537600 0 bps Output bytes : 539600 0 bps Input packets: 6400 0 pps Output packets: 6400 0 pps IPv6 transit statistics: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Dropped traffic statistics due to STP State: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Input errors: Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0, L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0, FIFO errors: 0, Resource errors: 0 Output errors: Carrier transitions: 0, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0, FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0 Egress queues: 8 supported, 4 in use Queue counters: Queued packets Transmitted packets Dropped packets 0 6400 6400 0 1 0 0 0 2 0 0 0 3 0 0 0 Queue number: Mapped forwarding classes 0 best-effort 1 expedited-forwarding 2 assured-forwarding 3 network-control Active alarms : None Active defects : None PCS statistics Seconds Bit errors 0 Errored blocks 0 MAC statistics: Receive Transmit Total octets 652800 652800 Total packets 6400 6400 Unicast packets 6400 6400 Broadcast packets 0 0 Multicast packets 0 0 CRC/Align errors 0 0 FIFO errors 0 0 MAC control frames 0 0 MAC pause frames 0 0 Oversized frames 0 Jabber frames 0 Fragment frames 0 VLAN tagged frames 0 Code violations 0 Total errors 0 0 Filter statistics: Input packet count 6400 Input packet rejects 0 Input DA rejects 0 Input SA rejects 0 Output packet count 6400 Output packet pad count 0 Output packet error count 0 CAM destination filters: 0, CAM source filters: 0 Packet Forwarding Engine configuration: Destination slot: 0 (0x00) CoS information: Direction : Output CoS transmit queue Bandwidth Buffer Priority Limit % bps % usec 0 best-effort 95 9500000000 95 0 low none 3 network-control 5 500000000 5 0 low none Preclassifier statistics: Traffic Class Received Packets Transmitted Packets Dropped Packets real-time 0 0 0 network-control 6400 6400 0 best-effort 0 0 0 Link Degrade : Link Monitoring : Disable Interface transmit statistics: Disabled Logical interface xe-2/0/0.0 (Index 353) (SNMP ifIndex 599) (Generation 175) Flags: Up SNMP-Traps 0x4004000 Encapsulation: ENET2 Traffic statistics: Input bytes : 537600 Output bytes : 539000 Input packets: 6400 Output packets: 6400 Local statistics: Input bytes : 0 Output bytes : 9800 Input packets: 0 Output packets: 100 Transit statistics: Input bytes : 537600 0 bps Output bytes : 529200 0 bps Input packets: 6400 0 pps Output packets: 6300 0 pps Protocol inet, MTU: 1500 Max nh cache: 75000, New hold nh limit: 75000, Curr nh cnt: 1, Curr new hold cnt: 0, NH drop cnt: 0 Generation: 206, Route table: 0 Flags: Sendbcast-pkt-to-re Addresses, Flags: Is-Preferred Is-Primary Destination: 10.108.120.0/30, Local: 10.108.120.1, Broadcast: 10.108.120.3, Generation: 146 Protocol multiservice, MTU: Unlimited, Generation: 207, Route table: 0 Policer: Input: __default_arp_policer__
意义
示例输出显示链路已启动,且此环路配置中没有报警。配置内部环路后,物理环路应在不发出警报的情况下启动。
示例输出
当您看到物理链路已关闭时,端口可能有问题。以下输出是物理链路关闭时 show interfaces et-// 命令的示例:fpcpicport
user@router> show interfaces et-3/0/1 Physical interface: et-3/0/1, Enabled, Physical link is Down Interface index: 620, SNMP ifIndex: 564 Link-level type: Ethernet, MTU: 1514, MRU: 1522, Speed: 40Gbps, BPDU Error: None, Loop Detect PDU Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled Pad to minimum frame size: Disabled Device flags : Present Running Down Interface flags: Hardware-Down SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Schedulers : 0 Current address: 54:e0:32:71:e3:e2, Hardware address: 54:e0:32:71:e3:e2 Last flapped : 2019-07-05 09:10:02 PDT (3d 14:46 ago) Input rate : 0 bps (0 pps) Output rate : 0 bps (0 pps) Active alarms : LINK Active defects : LINK, LOCAL-FAULT PCS statistics Seconds Bit errors 2 Errored blocks 6 Ethernet FEC Mode : NONE Ethernet FEC statistics Errors FEC Corrected Errors 0 FEC Uncorrected Errors 0 FEC Corrected Errors Rate 0 FEC Uncorrected Errors Rate 0 Interface transmit statistics: Disabled
意义
示例输出显示物理链路已关闭,并且存在活动报警和缺陷。
表 2 显示已关闭物理链路的问题情况和操作。
问题 |
操作 |
---|---|
电缆不匹配 |
验证光纤连接是否正确。 |
电缆损坏和/或脏污 |
验证光纤是否可以成功环路已知良好的相同类型端口。 |
光衰减过多或过少 |
根据 PIC 光学规格,验证衰减是否正确。 |
传输端口未在规格规定的 dBm 光学范围内传输 |
验证光学器件的发射功率是否在 PIC 光学规格的范围内。 |
电缆类型和端口不匹配 |
验证单模光纤电缆是否连接到单模接口,以及多模光缆是否连接到多模接口。(此问题并不总是导致物理链路中断;有时会导致错误和丢包。) |
配置静态地址解析协议表条目
目的
配置静态地址解析协议 (ARP) 条目,以允许数据包从环路以太网接口发送出去。
完成测试并监控接口流量后,请移除循环测试结束时的静态 ARP 条目。
操作
要为千兆以太网接口配置静态 ARP 表条目,请执行以下步骤:
查找千兆以太网接口的媒体访问控制 (MAC) 地址:
user@router#
run show interfaces xe-2/0/0 extensive | match "Current address"
Current address: d8:18:d3:b3:6d:ea, Hardware address: d8:18:d3:b3:6d:ea
在配置模式下,转到以下层次结构级别:
[edit] user@router# edit interfaces
interface-name
unitlogical-unit-number
family inet addressaddress
配置静态 ARP 条目:
user@router# set arp
ip-address
macmac-address
提交配置:
user@router# commit
验证是否安装了静态 ARP 条目:
[edit interfaces xe-2/0/0.0 unit 0 family inet address 10.108.120.1/30] user@router#run show arp no-resolve
MAC Address Address Interface Flags 02:01:00:00:00:05 10.0.0.5 em1.0 none 00:00:5e:00:01:01 10.85.175.1 fxp0.0 none d8:b1:22:0a:6e:00 10.85.175.2 fxp0.0 none d0:07:ca:57:d7:a0 10.85.175.3 fxp0.0 none 00:a0:a5:c2:06:e2 10.85.175.4 fxp0.0 none d8:18:d3:b3:6d:ea 10.108.120.2 xe-2/0/0.0 permanent 02:01:00:00:00:05 128.0.0.5 em1.0 none 02:01:00:00:00:05 128.0.0.6 em1.0 none 02:00:00:00:00:10 128.0.0.16 em0.0 none 02:00:00:00:00:12 128.0.0.18 em0.0 none 02:00:00:00:00:17 128.0.0.23 em0.0 none 02:00:00:00:00:1a 128.0.0.26 em0.0 none Total entries: 12
意义
示例输出适用于步骤 1 到步骤 6,显示在千兆以太网接口 上配置了静态 ARP 条目。xe-2/0/0.0
清除千兆以太网接口统计信息
目的
您可以重置千兆以太网接口统计信息。重置统计信息提供了一个干净的开始,以便以前的输入/输出错误和数据包统计信息不会干扰当前诊断。
操作
要清除接口的所有统计信息,请使用以下 Junos OS CLI 操作模式命令:
user@router> clear interfaces statistics (xe-fpc
/pic
/port
| et-fpc
/pic
/port
)
示例输出
user@router> clear interfaces statistics xe-2/0/0 user@router>
意义
此命令仅清除千兆以太网接口的接口统计信息计数器。
Ping 千兆以太网接口
目的
使用 ping 命令验证环路连接。
操作
要从以太网接口发送 ping 数据包,请使用以下 Junos OS CLI 操作模式命令:
user@router> pingremote-IP-address
bypass-routing interface (xe-fpc
/pic
/port
| et-fpc
/pic
/port
) count 100 rapid
示例输出
user@router> ping 10.108.120.2 bypass-routing interface xe-2/0/0 count 100 rapid ping 10.108.120.2 bypass-routing interface xe-2/0/0 count 100 rapid (snip) Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 6a14 0 0000 36 01 15ba 10.108.120.1 10.108.120.2 36 bytes from 10.108.120.1: Redirect Host(New addr: 10.108.120.2) Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 6a14 0 0000 35 01 16ba 10.108.120.1 10.108.120.2 36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 6a14 0 0000 01 01 4aba 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 6a76 0 0000 01 01 4a58 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 6aa7 0 0000 01 01 4a27 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 6ae3 0 0000 01 01 49eb 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 6b0a 0 0000 01 01 49c4 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded
意义
示例输出显示生存时间 (TTL) 已过期,指示链路正在接收来自 ping 测试的帧。使用的 MAC 地址与正在测试的端口的物理地址相同,因为这允许端口接受来自 ping 测试的帧。当数据包通过链路循环时,您希望每发送一次 ping 就会收到一条 TLL 超出的消息。之所以生成这些消息,是因为 ping 数据包在路由器和物理环路之间重复循环。当数据包被发送到链路的另一端(不存在)时,环路会将数据包返回到同一接口,在该接口中,数据包再次受数据包转发引擎结构的约束以进行路由。路由查找后,TTL 递减,数据包再次从环路接口发送出去。此过程将重复,直到打包丢失,或者 TLL 过期并显示后续 TTL 过期消息。如果发生任何错误,数据包将被丢弃并显示超时错误,而不是预期的 TTL 过期消息。请注意,Junos OS 中 ICMP 回显数据包的默认 TTL 为 64。这意味着给定的测试数据包必须成功发送和接收 63 次,然后才能生成 TTL 过期消息。您可以更改 TTL 值以调整丢失容差,例如,值 255 是最苛刻的测试,因为现在数据包必须发送和接收 254 次无错误。
检查千兆以太网接口错误统计信息
目的
持续接口错误统计信息表明您需要向瞻博网络技术援助中心 (JTAC) 提交案例。
操作
要检查本地接口的错误统计信息,请使用以下 Junos OS CLI 操作模式命令:
user@router> (xe-fpc
/pic
/port
| et-fpc
/pic
/port
) extensive
示例输出
user@router> show interfaces xe-2/0/0 extensive Physical interface: xe-2/0/0, Enabled, Physical link is Up Interface index: 187, SNMP ifIndex: 591, Generation: 190 Link-level type: Ethernet, MTU: 1514, MRU: 1522, LAN-PHY mode, Speed: 10Gbps, BPDU Error: None, Loop Detect PDU Error: None, MAC-REWRITE Error: None, Loopback: Local, Source filtering: Disabled, Flow control: Enabled, Speed Configuration: Auto Pad to minimum frame size: Disabled Device flags : Present Running Loop-Detected Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Schedulers : 0 Hold-times : Up 4000 ms, Down 0 ms Damping : half-life: 0 sec, max-suppress: 0 sec, reuse: 0, suppress: 0, state: unsuppressed Current address: d8:18:d3:b3:6d:ea, Hardware address: d8:18:d3:b3:6d:ea Last flapped : 2019-04-20 17:13:55 PDT (13w4d 21:40 ago) Statistics last cleared: 2019-07-25 14:49:21 PDT (00:04:41 ago) Traffic statistics: Input bytes : 537600 0 bps Output bytes : 539600 0 bps Input packets: 6400 0 pps Output packets: 6400 0 pps IPv6 transit statistics: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Dropped traffic statistics due to STP State: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Input errors: Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0, L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0, FIFO errors: 0, Resource errors: 0 Output errors: Carrier transitions: 0, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0, FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0 Egress queues: 8 supported, 4 in use Queue counters: Queued packets Transmitted packets Dropped packets 0 6400 6400 0 1 0 0 0 2 0 0 0 3 0 0 0 Queue number: Mapped forwarding classes 0 best-effort 1 expedited-forwarding 2 assured-forwarding 3 network-control Active alarms : None Active defects : None PCS statistics Seconds Bit errors 0 Errored blocks 0 MAC statistics: Receive Transmit Total octets 652800 652800 Total packets 6400 6400 Unicast packets 6400 6400 Broadcast packets 0 0 Multicast packets 0 0 CRC/Align errors 0 0 FIFO errors 0 0 MAC control frames 0 0 MAC pause frames 0 0 Oversized frames 0 Jabber frames 0 Fragment frames 0 VLAN tagged frames 0 Code violations 0 Total errors 0 0 Filter statistics: Input packet count 6400 Input packet rejects 0 Input DA rejects 0 Input SA rejects 0 Output packet count 6400 Output packet pad count 0 Output packet error count 0 CAM destination filters: 0, CAM source filters: 0 Packet Forwarding Engine configuration: Destination slot: 0 (0x00) CoS information: Direction : Output CoS transmit queue Bandwidth Buffer Priority Limit % bps % usec 0 best-effort 95 9500000000 95 0 low none 3 network-control 5 500000000 5 0 low none Preclassifier statistics: Traffic Class Received Packets Transmitted Packets Dropped Packets real-time 0 0 0 network-control 6400 6400 0 best-effort 0 0 0 Link Degrade : Link Monitoring : Disable Interface transmit statistics: Disabled Logical interface xe-2/0/0.0 (Index 353) (SNMP ifIndex 599) (Generation 175) Flags: Up SNMP-Traps 0x4004000 Encapsulation: ENET2 Traffic statistics: Input bytes : 537600 Output bytes : 539000 Input packets: 6400 Output packets: 6400 Local statistics: Input bytes : 0 Output bytes : 9800 Input packets: 0 Output packets: 100 Transit statistics: Input bytes : 537600 0 bps Output bytes : 529200 0 bps Input packets: 6400 0 pps Output packets: 6300 0 pps Protocol inet, MTU: 1500 Max nh cache: 75000, New hold nh limit: 75000, Curr nh cnt: 1, Curr new hold cnt: 0, NH drop cnt: 0 Generation: 206, Route table: 0 Flags: Sendbcast-pkt-to-re Addresses, Flags: Is-Preferred Is-Primary Destination: 10.108.120.0/30, Local: 10.108.120.1, Broadcast: 10.108.120.3, Generation: 146 Protocol multiservice, MTU: Unlimited, Generation: 207, Route table: 0 Policer: Input: __default_arp_policer__
意义
检查是否有任何错误统计信息。不应有任何输入或输出错误。如果持续存在任何输入或输出错误,请向瞻博网络技术援助中心 (JTAC) 提交案例,电话为 1-888-314-JTAC(美国境内) 或 1-408-745-9500(美国境外)。support@juniper.net
诊断可疑电路问题
目的
当您怀疑电路问题时,请务必与传输层工程师合作解决问题。传输层工程师可以从网络的各个点创建到路由器的环路。然后,您可以执行测试来验证从路由器到网络中该环路的连接。
操作
在传输层工程师创建从网络到路由器的环路后,您必须验证从路由器到网络中环路的连接。按照诊断疑似 千兆以太网接口硬件问题中的步骤 2 到步骤 8 进行操作。请记住,测试中遇到的任何问题都表明从路由器到网络中环回的连接存在问题。
通过在网络中的各个点对环回执行测试,可以隔离问题的根源。
本文档适用于 1Gb、10Gb、40Gb 和 100Gb 接口。