串行接口
本主题讨论串行接口以及如何配置串行线路协议、串行时钟模式、串行信号处理、串行 DTR 电路、串行信号极性、串行回传功能和串行线路编码。
串行接口概述
通过串行接口进行通信的设备分为两类:数据终端设备 (DTE) 和数据电路终端设备 (DCE)。瞻博网络串行物理接口卡 (PIC) 每个 PIC 有两个端口,支持全双工数据传输。这些 PIC 仅支持 DTE 模式。在串行 PIC 上。 表 1 指定串行接口的关键详细信息。
接口详细信息 |
说明 |
---|---|
接口名称 |
串行接口 |
受支持 |
有关平台支持的信息,请参阅 硬件兼容性工具 (HCT)。 |
配置串行接口类型的标准 |
|
支持的功能 |
|
逻辑属性 |
没有串行接口特定的逻辑属性。有关可配置的一般逻辑属性的信息,请参阅 配置逻辑接口属性。串行接口上的此支持与 T1 和 E1 接口上的现有 LFI 和 MLPPP 支持相同。 |
串行传输
在基本的串行通信中,九个信号对传输至关重要。每个信号都与 9 针或 25 针连接器中的引脚相关联。 表 2 列出并定义串行信号及其来源。
信号名称 |
定义 |
信号源 |
---|---|---|
TD |
传输的数据 |
DTE |
RD |
已收到的数据 |
DCE |
RTS |
请求发送 |
DTE |
CTS |
清除发送 |
DCE |
DSR |
数据集就绪 |
DCE |
信号接地 |
接地信号 |
– |
CD |
运营商检测 |
– |
DTR |
数据终端就绪 |
DTE |
日 |
环形指示器 |
– |
Serial line protocol guidelines:
DCE 将 DSR 信号传输至 DTE,DTE 使用 DTR 信号进行响应。这样就可以确定链路和信息流是否可以通过。
当 DTE 设备准备好接收数据时:
它将 RTS 信号设置为标记状态所有 1,以向 DCE 指示它可以传输数据。如果 DTE 因缓冲区条件而无法接收数据,则会将 RTS 信号设置为所有 0。
它将 CTS 信号设置为标记状态,以向 DTE 指示它可以传输数据。如果 DCE 无法接收数据,则会将 CTS 信号设置为所有 0。
发送信息时,它会跨传输的数据 (TD) 行传输数据,并跨接收的数据 (RD) 行接收数据:
TD 线路 — 数据从 DTE 设备传输到 DCE 设备的线路
RD 行 — 数据从 DCE 设备传输到 DTE 设备的线路
线名未指示数据流的方向。
当串行端口打开时,DTE 设备会将其 DTR 信号设置为标记的状态。同样,DCE 将其 DSR 信号设置为标记状态。但是,由于与 RTS 和 CTS 信号进行了协商,很难使用 DTR 和 DSR 信号。
运营商检测和环形指示信号检测到与远程调制解调器的连接,这些信号几乎没有使用。
SRX 设备上的 8 端口同步串行 GPIM
千兆位后面板 物理接口模块 (GPIM) 是一种网络接口卡 (NIC),您可以安装在 SRX550 服务网关的前插槽中,以提供与 LAN 或 WAN 的物理连接。8 端口同步串行 GPIM 提供与串行网络介质类型的物理连接,接收传入数据包并传输网络传出数据包。除了转发数据包进行处理外,GPIM 还执行成帧和线速信号。此 GPIM 提供 8 个同步模式下运行的端口,支持每个端口 64 Mbps 或 8 Mbps 的线速。
有关 8 端口串行 GPIM 配置的信息,请参阅 8 端口串行 GPIM 基本配置。
Features Supported on 8-Port Synchronous Serial GPIM
表 3 列出了 8 端口同步串行 GPIM 上支持的功能。
功能 |
说明 |
---|---|
操作模式(基于电缆自动选择,无需配置) |
|
时钟 |
|
时钟速率(波特率) |
1.2 KHz 到 8.0 MHz 注:
RS-232 串行接口可能导致时钟速率超过 200 KHz 的错误。 |
MTU |
9192 字节,默认值为 1504 字节 |
HDLC 功能 |
|
线路编码 |
NRZ 和 NRZI |
反转数据 |
启用 |
线路协议 |
EIA530/EIA530A, X.21, RS-449, RS-232, V.35 |
数据电缆 |
为每个线路协议分离电缆(DTE/DCE 模式) |
错误计数器(符合 ANSI 规范) |
启用 |
报警和缺陷 |
|
数据信号 |
Rx 时钟 |
控制信号 |
|
串行自动认证 |
|
诊断功能 |
|
2 层功能 |
封装
|
SNMP 功能 |
每个端口可收收 SNMP 信息
|
反计数者检查 |
启用 |
串行接口的优势
串行接口是连接传输和接收设备或 IC 的简单、经济高效的方式。与其他接口相比,串行接口需要的导电接线(通常只有一根)更少,从而简化了实施。
串行接口支持远距离通信。
配置串行线路协议
配置串行线路协议
默认情况下,串行接口使用 EIA-530 线路协议。您可独立配置 PIC 上的每个端口,以便使用以下一条线路协议:
EIA-530
V.35
X.21
要配置串行线路协议:
line-protocol
句,指定 eia530
, v.35
或 x.21
选项: line-protocol protocol;
您可以在以下层次结构级别中包含以下语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
有关串行接口的详细信息,请参阅以下部分:
串行接口默认设置
串行接口默认设置
EIA-530 接口默认设置
如果未包含语 line-protocol
句,或者明确配置默认 EIA-530 线路协议,则默认设置如下:
dce-options | dte-options { cts normal; dcd normal; dsr normal; dtr normal; rts normal; tm normal; } clock-rate 16.384mhz; clocking-mode loop; cts-polarity positive; dcd-polarity positive; dsr-polarity positive; dtr-circuit balanced; dtr-polarity positive; encoding nrz; rts-polarity positive; tm-polarity positive;
在 M 系列路由器上,您可以为 EIA-530 接口设置 DCE 时钟模式并提交。未显示错误消息,并且 CLI 未被阻止。
您可以在以下层次结构级别中包含 线路协议 语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
V.35 接口默认设置
如果包含 该 line-protocol v.35
语句,则默认设置如下:
dce-options | dte-options { cts normal; dcd normal; dsr normal; dtr normal; rts normal; } clock-rate 16.384mhz; clocking-mode loop; cts-polarity positive; dcd-polarity positive; dsr-polarity positive; dtr-circuit balanced; dtr-polarity positive; encoding nrz; rts-polarity positive;
您可以在以下层次结构级别中包含 线路协议 语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
X.21 接口默认设置
如果包含 该 line-protocol x.21
语句,则默认设置如下:
dce-options | dte-options { control-signal normal; indication normal; } clock-rate 16.384mhz; clocking-mode loop; control-polarity positive; encoding nrz; indication-polarity positive;
您可以在以下层次结构级别中包含 线路协议 语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
无效串行接口语句
以下部分显示每种串行接口类型的无效配置语句。如果在配置中包含以下语句,则错误消息将指示错误的位置,并且配置未激活。
无效的 EIA-530 接口语句
如果未包含语 line-protocol
句,或者明确配置默认 EIA-530 行协议,以下语句无效:
dce-options | dte-options { control-signal (assert | de-assert | normal); indication (ignore | normal | require); } control-polarity (negative | positive); indication-polarity (negative | positive);
您可以在以下层次结构级别中包含 线路协议 语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
无效 V.35 接口语句
如果包括该 line-protocol v.35
语句,以下语句无效:
dce-options | dte-options { control-signal (assert | de-assert | normal); indication (ignore | normal | require); tm (ignore | normal | require); } control-polarity (negative | positive); indication-polarity (negative | positive); loopback (dce-local | dce-remote); tm-polarity (negative | positive);
您可以在以下层次结构级别中包含 线路协议 语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
无效 X.21 接口语句
如果包括该 line-protocol x.21
语句,以下语句无效:
dce-options | dte-options { cts (ignore | normal | require); dcd (ignore | normal | require); dsr (ignore | normal | require); dtr (assert | de-assert | normal); rts (assert | de-assert | normal); tm (ignore | normal | require); } clocking-mode (dce | internal); cts-polarity (negative | positive); dce-polarity (negative | positive); dsr-polarity (negative | positive); dtr-circuit (balanced | unbalanced); dtr-polarity (negative | positive); loopback (dce-local | dce-remote); rts-polarity (negative | positive); tm-polarity (negative | positive);
您可以在以下层次结构级别中包含 线路协议 语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
配置串行时钟模式
配置串行时钟模式
默认情况下,串行接口使用环路时钟模式。对于 EIA-530 和 V.35 接口,您可以独立配置 PIC 上的每个端口,以便使用环路、DCE 或内部时钟模式。对于 X.21 接口,仅支持环路时钟模式。
三种时钟模式如下工作:
环路时钟模式 — 使用 DCE 的 RX 时钟为从 DCE 到 DTE 的数据时钟。
DCE 时钟模式 — 使用 DCE 专门由 DTE 生成的 TXC 时钟作为 DTE 的传输时钟。
内部时钟模式 — 又称为线路计时,使用内部生成的时钟。您可通过在或
[edit interfaces se-fpc/pic/port dte-options]
层次结构级别中[edit interfaces se-pim/0/port serial-options]
包括clock-rate
语句来配置此时钟的速度。有关 DTE 时钟速率的详细信息,请参阅 配置 DTE 时钟速率。
请注意,DCE 时钟模式和环路时钟模式使用由 DCE 生成的外部时钟。
图 1 显示了环路、DCE 和内部时钟模式的时钟源。
要配置串行接口的时钟模式,请包括以下 clocking-mode
语句:
clocking-mode (dce | internal | loop);
您可以在以下层次结构级别中包含此语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
反转串行接口传输时钟
使用外部定时时钟模式(DCE 或环路)时,长电缆可能会对 DTE 传输的时钟和数据进行相位转移。在高速下,此阶段转移可能会导致错误。反转传输时钟可纠正相位转移,从而降低错误率。
默认情况下,传输时钟不会反转。要反转传输时钟,请包括语 transmit-clock invert
句:
transmit-clock invert;
您可以在以下层次结构级别中包含此语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
配置 DTE 时钟速率
默认情况下,串行接口的时钟速率为 16.384 MHz。对于配置了内部时钟模式的 EIA-530 和 V.35 接口,可以配置时钟速率。
要配置时钟速率,请包括语 clock-rate
句:
clock-rate rate;
您可以在以下层次结构级别中包含此语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
您可以配置以下接口速度:
2.048 MHz
2.341 MHz
2.731 MHz
3.277 MHz
4.096 MHz
5.461 MHz
8.192 MHz
16.384 MHz
尽管串行接口以默认速率 16.384 MHz 使用,但如果存在以下任何条件,则可能需要使用较慢的速率:
互连电缆太长,无法有效运行。
互连电缆暴露在外部噪音源中,这可能导致意外电压超过 +1 伏,在信号导线和电缆负载端常见的电路之间测量,并更换为发电机的 50 欧姆电阻。
您需要最大程度地减少对其他信号的干扰。
您需要反转信号。
有关信号速率和接口电缆距离之间关系的详细信息,请参阅以下标准:
EIA-422-A, 平衡电压数字接口电路的电气特性
EIA-423-A, 不平衡电压数字接口电路的电气特性
配置串行信号处理
默认情况下,所有信号都启用正常信号处理。对于每个信号, normal
选项都适用于该信号的正常信号处理,如下标准定义:
TIA/EIA 标准 530
ITU-T 建议 V.35
ITU-T 建议 X.21
表 4 显示了支持每个信号类型的串行接口模式。
信号 |
串行接口 |
---|---|
从 DCE 信号 | |
清除发送 (CTS) |
EIA-530 和 V.35 |
数据载波检测 (DCD) |
EIA-530 和 V.35 |
数据集就绪 (DSR) |
EIA-530 和 V.35 |
指示 |
仅 X.21 |
测试模式 (TM) |
仅 EIA-530 |
到 DCE 信号 | |
控制信号 |
仅 X.21 |
数据传输就绪 (DTR) |
EIA-530 和 V.35 |
请求发送 (RTS) |
EIA-530 和 V.35 |
您可通过包括 dce-options
或 dte-options
语句来配置串行接口信号特征:
dce-options |dte-options { control-signal (assert | de-assert | normal); cts (ignore | normal | require); dcd (ignore | normal | require); dsr (ignore | normal | require); dtr signal-handling-option; ignore-all; indication (ignore | normal | require); rts (assert | de-assert | normal); tm (ignore | normal | require); }
您可以在以下层次结构级别中包含以下语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
对于 EIA-530 和 V.35 接口,配置到 DCE 信号,方法是包括 dtr
和 rts
语句,指定 assert
, de-assert
或 normal
选项:
dtr (assert | de-assert | normal); rts (assert | de-assert | normal);
对于 X.21 接口,通过包括control-signal
语句、指定assert
或de-assert
normal
选项来配置到 DCE 信号:
control-signal (assert | de-assert | normal);
断言 是指给定信号的正侧处于潜在的高级别输出电压 (Voh), 而相同信号的负端处于潜在的低水平输出电压 (Vol)。分解 是指给定信号的正侧处于潜在 V,而同一信号的负端处于潜在 Voh 状态。
对于 DTR 信号,您可以使用信号配置正常的信号处理,通过包含 dtr
语句自动重新同步,并指定 auto-synchronize
选项:
dtr { auto-synchronize { duration milliseconds; interval seconds; } }
重新同步的脉冲持续时间可以为 1 到 1000 毫秒。重新同步的偏移间隔可以为 1 至 31 秒。
对于 EIA-530 和 V.35 接口,可通过包括 cts
dcd
、 和 dsr
语句来配置从 DCE 信号,指定 : normal
require
ignore
cts (ignore | normal | require); dcd (ignore | normal | require); dsr (ignore | normal | require);
对于 X.21 接口,可通过包括indication
语句、指定ignore
或normal
require
选项来配置从 DCE 信号:
indication (ignore | normal | require);
仅对于 EIA-530 接口,可通过包括 tm
语句、指定 ignore
、 normal
或 require
选项来配置从 DCE 测试模式 (TM) 发出的信号:
tm (ignore | normal | require);
要指定必须维护从 DCE 信号,请在配置中包含 require
选项。要指定必须忽略从 DCE 信号,请在配置中包含 ignore
选项。
对于 V.35 和 X.21 接口,不能在配置中包含 tm
语句。
对于 X.21 接口,不能在配置中包括 cts
、 dcd
、 dsr
、 dtr
和 rts
语句。
对于 EIA-530 和 V.35 接口,不能在配置中包含 control-signal
和 indication
语句。
有关每个串行接口模式不支持的串行选项语句的完整列表,请参阅 无效串行接口语句。
要返回默认正常信号处理,require
请删除配置中的 、 ignore
、 assert
de-assert
、 或auto-synchronize
语句,如以下示例所示:
[edit] user@host# delete interfaces se-fpc/pic/port dte-options control-leads cts require
要显式配置正常信号处理,请将语句包括 control-signal
在选项中 normal
:
control-signal normal;
您可以通过包括 ignore-all
语句来配置串行接口以忽略所有控制导线:
ignore-all;
只有在未在或[edit interfaces se-fpc/pic/port serial-options dte-options]
层级明确启用其他信号处理选项时,才能在[edit interfaces se-pim/0/port serial-options dce-options]
配置中包含ignore-all
语句。
您可以在以下层次结构级别中包括 control-signal
、 cts
、 dcd
dsr
、 dtr
、 indication
、 rts
和 tm
语句:
[edit interfaces se-pim/0/port serial-options dte-options]
[edit interfaces se-fpc/pic/port serial-options dte-options]
配置串行 DTR 电路
平衡电路有两个电流,其幅度相等,相等于相等。不平衡的电路有一个电流和一个接地;如果一对端子不平衡,一侧连接到电气接地,另一侧承载信号。默认情况下,DTR 电路是平衡的。
对于 EIA-530 和 V.35 接口,请通过包括 dtr-circuit
语句来配置 DTR 电路:
dtr-circuit (balanced | unbalanced);
您可以在以下层次结构级别中包含此语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
配置串行信号极性
串行接口使用差异协议信号技术。在与电路关联的两个串行信号中,一个称为 A 信号的信号带有加号,而称为 B 信号的信号则表示为减减标志:例如 DTR+ 和 DTR-。如果 DTR 较低,则 DTR+ 对 DTR-是负极的。如果 DTR 较高,则 DTR+ 对 DTR- 是积极的。
默认情况下,所有信号极性均为正极。您可以在瞻博网络的串行界面上扭转这种极性。如果信号因反向极性而误连,则可能需要这样做。
对于 EIA-530 和 V.35 接口,通过包括cts-polarity
、 dcd-polarity
、 dsr-polarity
、 dtr-polarity
rts-polarity
和 tm-polarity
语句来配置信号极性:
cts-polarity (negative | positive); dcd-polarity (negative | positive); dsr-polarity (negative | positive); dtr-polarity (negative | positive); rts-polarity (negative | positive); tm-polarity (negative | positive);
您可以在以下层次结构级别中包含以下语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
对于 X.21 接口,通过包括 control-polarity
和 indication-polarity
语句来配置信号极性:
control-polarity (negative | positive); indication-polarity (negative | positive);
您可以在以下层次结构级别中包含以下语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
配置串行回传功能
从路由器上,远程线路接口单元 (LIU) 环路将 TX(传输)数据和 TX 时钟作为 RX(接收)数据和 RX 时钟回传至路由器。从线路上,LIU 回传将 RX 数据和 RX 时钟作为 TX 数据和 TX 时钟回传线路,如 中 图 2所示。

DCE 本地和 DCE 远程控制 EIA-530 接口特定信号,以在链路伙伴 DCE 上启用本地和远程回传。本地回传如 中 图 3所示。

对于 EIA-530 接口,您可以配置 DCE 本地、DCE 远程、本地和远程 (LIU) 回传功能。
对于 V.35,您可以配置远程 LIU 和本地回传功能。V.35 和 X.21 接口不支持 DCE 本地和 DCE 远程回传。X.21 接口不支持本地和远程回传。
要在串行接口上配置环路功能,请包括语 loopback
句,指定 dce-local
、 dce-remote
、 local
或 remote
选项:
loopback mode;
您可以在以下层次结构级别中包含此语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
要禁用回传功能,请从配置中卸下 loopback
语句:
[edit] user@host# delete interfaces se-fpc/pic/port serial-options loopback
您可以检查命令输出 show interface se-fpc/pic/port extensive
中的错误计数器,以确定是否存在内部或外部问题:
user@host> show interfaces se-fpc/pic/port extensive
要配置串行回传功能:
配置串行线路编码
默认情况下,串行接口使用不返回到零 (NRZ) 线路编码。如有必要,您可以将非回路配置为零反转 (NRZI) 线路编码。
要让接口使用 NRZI 线路编码,请包括语 encoding
句,指定 nrzi
选项:
encoding nrzi;
要显式配置默认 NRZ 线路编码,请包括该 encoding
语句,指定 nrz
选项:
encoding nrz;
您可以在以下层次结构级别中包含此语句:
[edit interfaces se-pim/0/port serial-options]
[edit interfaces se-fpc/pic/port serial-options]
设置线路编码参数时,您必须为成对的端口设置相同的值。端口 0 和 1 必须共享相同值。
在 SRX 设备上配置串行接口
在此示例中,您将了解如何完成串行接口上的初始配置、如何删除串行接口以及如何配置串行接口 8 端口同步串行 GPIM。
有关在 SRX 系列设备中安装串行 PIM 的信息,请参阅 分支物理接口模块的 SRX 系列服务网关硬件指南。
在此示例中:
在串行接口上创建新接口
se-1/0/0
。将封装类型设置为 ppp 并创建基本配置。
se-1/0/0
将逻辑接口设置为 0,逻辑单元编号范围为 0 到 16,384。
输入逻辑接口上需要配置的属性的附加值,例如逻辑封装或协议家族。
设置 IPv4 地址 10.10.10.10/24 上
se-1/0/0
。
删除 se-1/0/0
接口时,接口将被禁用,并从软件配置中删除。网络接口仍然实际存在,其标识符继续出现在 J-Web 页面上。
基本串行接口配置
在此示例中,您创建称为 se-1/0/0/0 的串行接口,并将封装类型设置为 ppp。要快速配置此示例,请在 [edit]
层次结构级别使用 CLI 快速配置,并从配置模式提交。
set interfaces se-1/0/0 encapsulation ppp unit 0 family inet address 10.10.10.10/24
要配置串行接口, se-1/0/0
请执行以下操作:
成功完成配置后,请使用 show interfaces se-1/0/0
命令查看参数。
删除串行接口
在此示例中,您删除了串行接口 se-1/0/0
。配置接口之前,无需设备初始化以外的配置。
要删除串行接口, se-1/0/0
请执行以下操作:
成功完成配置后,请使用 show interfaces
命令验证配置。
示例:在 8 端口同步串行 GPIM 上配置串行接口
在此示例中,您可以使用 8 端口同步串行 GPIM 执行基本的背靠背设备配置。这些设备同时显示为数据通信设备 (DCE) 和数据终端设备 (DTE)。在某些部署场景中,DTE 可以是串行调制解调器或加密器。
在这种情况下,您可以使用两个接口配置串行接口。您可以使用不同的封装配置所有端口,例如 Cisco 高级数据链路控制 (HDLC)、帧中继和点对点协议 (PPP)。设置帧中继时,还必须设置数据链路连接标识符(在此示例中,111)。设备 1 (SRX650) 上的所有八个端口均以 DTE 模式配置,其在设备 2 (SRX650) 上的相应八个端口均以 DCE 模式配置。
在此示例中,设备 1:
将封装类型设置为
ppp
和逻辑接口。0
逻辑单元编号范围为 0 到 16,384。输入逻辑接口上需要配置的属性的附加值,例如逻辑封装或协议家族。
在串行端口上将 IPv4 地址设置为 10.10.10.1/24。
对于设备 2,您遵循类似于设备 1 的过程,但将时钟模式设置为 dce。
图 4 显示了此示例中使用的拓扑。

要快速配置此示例,层级 CLI [edit]
:
设备 1
set interfaces se-7/0/0 mtu 9192
set interfaces se-7/0/0 encapsulation ppp
set interfaces se-7/0/0 serial-options clocking-mode internal
set interfaces se-7/0/0 unit 0 family inet address 10.10.10.1/24
set interfaces se-7/0/1 mtu 9192
set interfaces se-7/0/1 encapsulation cisco-hdlc
set interfaces se-7/0/1 serial-options clocking-mode internal
set interfaces se-7/0/1 unit 0 family inet address 11.11.11.1/24
set interfaces se-7/0/2 dce
set interfaces se-7/0/2 mtu 9192
set interfaces se-7/0/2 encapsulation frame-relay
set interfaces se-7/0/2 serial-options clocking-mode internal
set interfaces se-7/0/2 unit 0 dlci 111
set interfaces se-7/0/2 unit 0 family inet address 12.12.12.1/24
set interfaces se-7/0/3 mtu 9192
set interfaces se-7/0/3 encapsulation ppp
set interfaces se-7/0/3 serial-options clocking-mode internal
set interfaces se-7/0/3 unit 0 family inet address 13.13.13.1/24
set interfaces se-7/0/4 mtu 9192
set interfaces se-7/0/4 encapsulation cisco-hdlc
set interfaces se-7/0/4 serial-options clocking-mode internal
set interfaces se-7/0/4 unit 0 family inet address 14.14.14.1/24
set interfaces se-7/0/5 dce
set interfaces se-7/0/5 mtu 9192
set interfaces se-7/0/5 encapsulation frame-relay
set interfaces se-7/0/5 serial-options clocking-mode internal
set interfaces se-7/0/5 unit 0 dlci 112
set interfaces se-7/0/5 unit 0 family inet address 15.15.15.1/24
set interfaces se-7/0/6 mtu 9192
set interfaces se-7/0/6 encapsulation cisco-hdlc
set interfaces se-7/0/6 serial-options clocking-mode internal
set interfaces se-7/0/6 unit 0 family inet address 16.16.16.1/24
set interfaces se-7/0/7 mtu 9192
set interfaces se-7/0/7 encapsulation ppp
set interfaces se-7/0/7 serial-options clocking-mode internal
set interfaces se-7/0/7 unit 0 family inet address 17.17.17.1/24
set routing-options static route 21.21.21.0/24 next-hop 10.10.10.2
set routing-options static route 23.23.23.0/24 next-hop 11.11.11.2
set routing-options static route 25.25.25.0/24 next-hop 12.12.12.2
set routing-options static route 27.27.27.0/24 next-hop 13.13.13.2
set routing-options static route 29.29.29.0/24 next-hop 14.14.14.2
set routing-options static route 31.31.31.0/24 next-hop 15.15.15.2
set routing-options static route 33.33.33.0/24 next-hop 16.16.16.2
set routing-options static route 35.35.35.0/24 next-hop 17.17.17.2
设备 2
set interfaces se-3/0/0 mtu 9192
set interfaces se-3/0/0 encapsulation ppp
set interfaces se-3/0/0 serial-options clocking-mode dce
set interfaces se-3/0/0 unit 0 family inet address 10.10.10.2/24
set interfaces se-3/0/1 mtu 9192
set interfaces se-3/0/1 encapsulation cisco-hdlc
set interfaces se-3/0/1 serial-options clocking-mode dce
set interfaces se-3/0/1 unit 0 family inet address 11.11.11.2/24
set interfaces se-3/0/2 dce
set interfaces se-3/0/2 mtu 9192
set interfaces se-3/0/2 encapsulation frame-relay
set interfaces se-3/0/2 serial-options clocking-mode dce
set interfaces se-3/0/2 unit 0 dlci 111
set interfaces se-3/0/2 unit 0 family inet address 12.12.12.2/24
set interfaces se-3/0/3 mtu 9192
set interfaces se-3/0/3 encapsulation ppp
set interfaces se-3/0/3 serial-options clocking-mode dce
set interfaces se-3/0/3 unit 0 family inet address 13.13.13.2/24
set interfaces se-3/0/4 mtu 9192
set interfaces se-3/0/4 encapsulation cisco-hdlc
set interfaces se-3/0/4 serial-options clocking-mode dce
set interfaces se-3/0/4 unit 0 family inet address 14.14.14.2/24
set interfaces se-3/0/5 dce
set interfaces se-3/0/5 mtu 9192
set interfaces se-3/0/5 encapsulation frame-relay
set interfaces se-3/0/5 serial-options clocking-mode dce
set interfaces se-3/0/5 unit 0 dlci 112
set interfaces se-3/0/5 unit 0 family inet address 15.15.15.2/24
set interfaces se-3/0/6 mtu 9192
set interfaces se-3/0/6 encapsulation cisco-hdlc
set interfaces se-3/0/6 serial-options clocking-mode dce
set interfaces se-3/0/6 unit 0 family inet address 16.16.16.2/24
set interfaces se-3/0/7 mtu 9192
set interfaces se-3/0/7 encapsulation ppp
set interfaces se-3/0/7 serial-options clocking-mode dce
set interfaces se-3/0/7 unit 0 family inet address 17.17.17.2/24
set routing-options static route 20.20.20.0/24 next-hop 10.10.10.1
set routing-options static route 22.22.22.0/24 next-hop 11.11.11.1
set routing-options static route 24.24.24.0/24 next-hop 12.12.12.1
set routing-options static route 26.26.26.0/24 next-hop 13.13.13.1
set routing-options static route 28.28.28.0/24 next-hop 14.14.14.1
set routing-options static route 30.30.30.0/24 next-hop 15.15.15.1
set routing-options static route 32.32.32.0/24 next-hop 16.16.16.1
set routing-options static route 34.34.34.0/24 next-hop 17.17.17.1
要在设备 1 上配置接口:
要在设备 2 上配置接口:
指定接口的 MTU 值。
[edit interfaces] user@host#
set se-3/0/0 mtu 9192
设置封装类型。
[edit interfaces] user@host#
set se-3/0/0 encapsulation ppp
设置串行选项,例如时钟模式。
[edit interfaces] user@host#
set se-3/0/0 serial-options clocking-mode dce
设置串行端口上的 IPv4 地址。
[edit interfaces] user@host#
set se-3/0/0 unit 0 family inet address 10.10.10.2/24
指定静态路由信息。
[edit routing-options] user@host#
set static route 20.20.20.0/24 next-hop 10.10.10.1
对设备 2 上的其他七个端口重复相同的配置。
完成设备配置后,提交配置。
[edit] user@host#
commit
验证
目的
显示有关串行接口上配置参数的信息。
行动
您可以使用网络中每个对等地址上的 ping 工具来验证设备上的所有接口是否正常运行。要验证所有接口的链路状态:
对于设备上的每个接口:
在 J-Web 界面中,选择
Troubleshoot > Ping Host
。在远程主机框中,键入要验证链路状态的接口地址。
单击
Start
。输出显示在单独的页面上。
PING 10.10.10.10 : 56 data bytes 64 bytes from 10.10.10.10: icmp_seq=0 ttl=255 time=0.382 ms 64 bytes from 10.10.10.10: icmp_seq=1 ttl=255 time=0.266 ms
如果接口正常运行,则会生成 ICMP 响应。如果收到此响应,则在时间段中列出了往返时间(以毫秒为单位)。
要验证接口属性正确,请使用
show interfaces detail
命令显示接口信息摘要。验证以下信息:已启用物理接口。如果接口显示为禁用,请执行以下操作之一:
在 CLI 配置编辑器中,删除
disable
配置层次结构的 [编辑接口 se-1/0/0] 级别中的语句。在 J-Web 配置编辑器中,清除
Disable
接口上的复选框> se-1/0/0 页。
物理链路已打开。Down 的链路状态表示接口模块、接口端口或物理连接存在问题(链路层错误)。
最后翻动的时间是预期值。它表示上次物理接口不可用,然后再次可用。意外翻动表示可能出现链路层错误。
信息流统计信息反映了预期的输入和输出速率。验证入站和出站字节数和数据包是否匹配物理接口的预期吞吐量。要清除统计数据并仅查看新更改,请使用 命令
clear interfaces statistics se-1/0/0
。
要验证接口链路状态是否正常,请使用 enter
show interface terse se-7/0/*
命令:user@srx650-1>
show interface terse se-7/0/*
Interface Admin Link Proto Local Remote se-7/0/0 up up se-7/0/0.0 up up inet 10.10.10.1/24 se-7/0/1 up up se-7/0/1.0 up up inet 11.11.11.1/24 se-7/0/2 up up se-7/0/2.0 up up inet 12.12.12.1/24 se-7/0/3 up up se-7/0/3.0 up up inet 13.13.13.1/24 se-7/0/4 up up se-7/0/4.0 up up inet 14.14.14.1/24 se-7/0/5 up up se-7/0/5.0 up up inet 15.15.15.1/24 se-7/0/6 up up se-7/0/6.0 up up inet 16.16.16.1/24 se-7/0/7 up up se-7/0/7.0 up up inet 17.17.17.1/24
输出显示配置的所有接口列表。如果链路列显示
up
为所有接口,则配置正确。这可以验证 GPIM 是否正常运行且端到端 ping 是否正常工作。要验证 DCE 的接口统计信息,请使用
show interface se-7/0/0 extensive | no-more
命令:user@srx650-1>
show interface se-7/0/0 extensive | no-more
Physical interface: se-7/0/0, Enabled, Physical link is Up Interface index: 161, SNMP ifIndex: 592, Generation: 164 Type: Serial, Link-level type: PPP, MTU: 1504, Maximum speed: 8mbps Device flags : Present Running Interface flags: Point-To-Point Internal: 0x0 Link flags : Keepalives Hold-times : Up 0 ms, Down 0 ms Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3 Keepalive statistics: Input : 123 (last seen 00:00:02 ago) Output: 123 (last sent 00:00:01 ago) LCP state: Opened NCP state: inet: Opened, inet6: Not-configured, iso: Not-configured, mpls: Not-configured CHAP state: Closed PAP state: Closed CoS queues : 8 supported, 8 maximum usable queues Last flapped : 2011-06-27 22:57:24 PDT (00:20:59 ago) Statistics last cleared: Never Traffic statistics: Input bytes : 23792 160 bps Output bytes : 22992 536 bps Input packets: 404 0 pps Output packets: 409 0 pps Input errors: Errors: 3, Drops: 0, Framing errors: 3, Runts: 0, Giants: 0, Policed discards: 0, Resource errors: 0 Output errors: Carrier transitions: 1, Errors: 0, Drops: 0, MTU errors: 0, Resource errors: 0 Egress queues: 8 supported, 4 in use Queue counters: Queued packets Transmitted packets Dropped packets 0 best-effort 0 0 0 1 expedited-fo 0 0 0 2 assured-forw 0 0 0 3 network-cont 409 409 0 Queue number: Mapped forwarding classes 0 best-effort 1 expedited-forwarding 2 assured-forwarding 3 network-control Serial media information: Line protocol: eia530 Resync history: Sync loss count: 0 Data signal: Rx Clock: OK Control signals: Local mode: DCE To DTE: CTS: up, DCD: up, DSR: up From DTE: DTR: up, RTS: up DCE loopback override: Off Clocking mode: internal Loopback: none Tx clock: non-invert Line encoding: nrz Packet Forwarding Engine configuration: Destination slot: 7 CoS information: Direction : Output CoS transmit queue Bandwidth Buffer Priority Limit % bps % usec 0 best-effort 95 7600000 95 0 low none 3 network-control 5 400000 5 0 low none continue................................................................................ ..........................................................................................
输出显示所有 DCE 验证参数和配置的模式的列表。如果本地模式显示 DCE,则配置正确。
要验证 DTE 的接口统计信息,请使用
show interface se-3/0/0 extensive | no-more
命令:user@srx650-2>
show interfaces se-3/0/0 extensive | no-more
Physical interface: se-3/0/0, Enabled, Physical link is Up Interface index: 168, SNMP ifIndex: 594, Generation: 171 Type: Serial, Link-level type: PPP, MTU: 1504, Maximum speed: 8mbps Device flags : Present Running Interface flags: Point-To-Point Internal: 0x0 Link flags : Keepalives Hold-times : Up 0 ms, Down 0 ms Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3 Keepalive statistics: Input : 242 (last seen 00:00:09 ago) Output: 242 (last sent 00:00:10 ago) LCP state: Opened NCP state: inet: Opened, inet6: Not-configured, iso: Not-configured, mpls: Not-configured CHAP state: Closed PAP state: Closed CoS queues : 8 supported, 8 maximum usable queues Last flapped : 2011-06-27 22:52:06 PDT (00:40:41 ago) Statistics last cleared: Never Traffic statistics: Input bytes : 44582 0 bps Output bytes : 42872 0 bps Input packets: 776 0 pps Output packets: 779 0 pps Input errors: Errors: 6, Drops: 0, Framing errors: 6, Runts: 0, Giants: 0, Policed discards: 0, Resource errors: 0 Output errors: Carrier transitions: 1, Errors: 0, Drops: 0, MTU errors: 0, Resource errors: 0 Egress queues: 8 supported, 4 in use Queue counters: Queued packets Transmitted packets Dropped packets 0 best-effort 2 2 0 1 expedited-fo 0 0 0 2 assured-forw 0 0 0 3 network-cont 777 777 0 Queue number: Mapped forwarding classes 0 best-effort 1 expedited-forwarding 2 assured-forwarding 3 network-control Serial media information: Line protocol: eia530 Resync history: Sync loss count: 0 Data signal: Rx Clock: OK Control signals: Local mode: DTE To DCE: DTR: up, RTS: up From DCE: CTS: up, DCD: up, DSR: up Clocking mode: loop-timed Loopback: none Tx clock: non-invert Line encoding: nrz Packet Forwarding Engine configuration: Destination slot: 3 CoS information: Direction : Output CoS transmit queue Bandwidth Buffer Priority Limit % bps % usec 0 best-effort 95 7600000 95 0 low none 3 network-control 5 400000 5 0 low none continue ........................................................................... .....................................................................................
输出显示所有 DTE 验证参数和配置的模式的列表。如果本地模式显示 DTE,则配置正确。