Loopback Testing
The physical path of a leased line usually consists of a number of segments or spans
interconnected by devices that repeat and regenerate the signal. When a fault occurs
on the circuit that takes the form of either a break or signal corruption due to noise, it is
possible to localize the problem by testing the line on a segment-by-segment basis, or
end-to-end basis, as needed.
运营商的专线线路通常分成很多段,每一段有设备互联,用来重复和再生信号。如果电路出现问题,比如线路中断,或者是噪声引起的信号中断,通过采取逐段排查或者是端到到的方法,我们有可能定位故障点

Each circuit is symmetric in that a transmit path from one device connects to the
receive path on the remote side, and vise-versa. Looping is the process of connecting
the transmit path of a router or intermediate device to the receive path. If this device is
one of the routers, then the loop will either be detected if the looped segment is
operational, or not detected if there is a break. This detection is achieved by the router
detecting its own Data Link Layer Keepalive packets (for example, the magic number
when the encapsulation is PPP).
每条电路都是对称,这样一来本端设备上的发送路径连接着远端的接收路径,反过来也是这样。打环是将路由器或者是中间设备的发端连接到收端。假如设备是其中一台路由器,要是环起来的线路正常工作,则会检测到环路,如果是断的,就检测不到环路。这种检测是路由器检测自己的数据链路存活报文来实现的

If a loop is set back towards a router and it is not detected, then you can assume that
the problem lies somewhere between the router and where the loop was set by the
Telco/provider. The next step is to set a loop somewhere closer to the router to
localize the problem segment.
如果环路是朝路由器打的,但是又没有检测到环路,那你就可以认为问题在路由器和电信运营商打环的地方,下一步就是在靠近路由器的地方打环,进一步定位故障网段
It is usually possible to loop the router’s interface locally by connecting the PIC’s
transmit and receive ports. You should take care to attenuate signal strength when
dealing with intermediate- and long-reach fiber optic interfaces.
You can use a similar approach to track down noise on a line by combining the looping
process with a test that checks for bit rate errors, commonly known as BERT testing.
Many of the Juniper Networks routers’ interfaces support BERT testing.
对路由器接口打环通常是将PIC的收端的端口接发端的端口。在处理中继和长距离光纤接口故障的时候得小心一些,增加信号强度要特别小心。你可以用同样的方法跟踪线路的噪声,将打环检测和软件测试结合起来。这些软件测试可以检测误码率,通常叫做BERT测试。Juniper网络路由器的许多接口都支持BERT测试


Loopback Tests
For loopback local, you should set the PIC’s clocking to Internal, which is the default
setting. It is also possible to set a remote loopback—which is a line loopback towards
the network. This setting enables the Telco to run line tests on the local loop (also
called the tail) or allows end-to-end testing from the remote router. Note that setting
the interface to remote sets a line loop on the local router; it does not generate a
remote loopback request.
对于本地打环测试,你得将PIC的时钟设为内部,这个是默认设置。也可以设置远端打环,即朝着网络端进行线路打环。远端打环可以让电信在局端进行线路测试,或者从远端路由器进行端到端测试。注意将接口设成远程是在本地路由器设置线路环路,这样不会产生远端环路请求