串行接口
本主题讨论串行接口以及如何配置串行线路协议、串行时钟模式、串行信号处理、串行 DTR 电路、串行信号极性、串行环路功能和串行线路编码。
串行接口概述
通过串行接口进行通信的设备分为两类:数据终端设备 (DTE) 和数据电路终端设备 (DCE)。瞻博网络串行物理接口卡 (PIC) 每个 PIC 有两个端口,并支持全双工数据传输。这些 PIC 仅支持 DTE 模式。在串行 PIC 上。 表 1 指定串行接口的关键详细信息。
接口详细信息 |
说明 |
---|---|
接口名称 |
串行接口 |
支持 |
有关平台支持的信息,请参阅硬件兼容性工具 (HCT)。 |
串行接口类型配置标准 |
|
支持的功能 |
|
逻辑属性 |
没有串行接口特定的逻辑属性。有关可配置的常规逻辑属性的信息,请参阅 配置逻辑接口属性。串行接口上的这种支持与 T1 和 E1 接口上现有的 LFI 和 MLPPP 支持相同。 |
串行传输
在基本串行通信中,9 个信号对传输至关重要。每个信号都与 9 针或 25 针连接器中的一个针脚相关联。 表 2 列出并定义串行信号及其源。
信号名称 |
定义 |
信号源 |
---|---|---|
TD |
传输的数据 |
DTE |
RD |
收到的数据 |
DCE |
RTS |
请求发送 |
DTE |
CTS |
清除发送 |
DCE |
DSR |
数据集就绪 |
DCE |
信号接地 |
接通信号 |
- |
CD |
载波检测 |
- |
DTR |
数据终端就绪 |
DTE |
日 |
振铃指示器 |
- |
Serial line protocol guidelines:
DCE 将 DSR 信号传输给 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 时钟模式 — 使用 TXC 时钟,该时钟由 DCE 专门生成,由 DTE 用作 DTE 传输时钟。
内部时钟模式 — 也称为线路计时,使用内部生成的时钟。您可以通过在层级或
[edit interfaces se-fpc/pic/port dte-options]
层级包含clock-rate
语句[edit interfaces se-pim/0/port serial-options]
来配置此时钟的速度。有关 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 伏,在电缆负载端的信号导体和共同电路之间差异测得的电压将超过 +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 接口,请通过包括 dtr
和 语句、 rts
指定 assert
、 de-assert
或 normal
选项来配置到 DCE 信号:
dtr (assert | de-assert | normal); rts (assert | de-assert | normal);
对于 X.21 接口,通过包括 control-signal
语句、指定 assert
、 de-assert
或 normal
选项来配置 to-DCE 信号:
control-signal (assert | de-assert | normal);
断言 是指给定信号的正侧处于潜在的高水平电压 (Voh),而同一信号的负端处于潜在的低水平电压 (Vol)。当 给定信号的正侧处于潜在的 Vol,而同一信号的负侧处于潜在的 Voh 时,去肯定性是。
对于 DTR 信号,您可以配置正常信号处理,以便通过包括 dtr
语句并指定 auto-synchronize
选项来自动重新同步:
dtr { auto-synchronize { duration milliseconds; interval seconds; } }
重新同步的脉冲持续时间可以是 1 到 1000 毫秒。重新同步的偏移间隔可以是 1 到 31 秒。
对于 EIA-530 和 V.35 接口,请通过包括 cts
、 和语句、dsr
指定 ignore
normal
、 dcd
或require
选项来配置来自 DCE 信号:
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
选项来配置 from-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
、 de-assert
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]
层级显式启用其他信号处理选项时,才能ignore-all
在配置中包含[edit interfaces se-pim/0/port serial-options dce-options]
该语句。
您可以在以下control-signal
层次结构级别包括 、 dcd
cts
、 、 dtr
dsr
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
dtr-polarity
rts-polarity
dcd-polarity
dsr-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。
为需要在逻辑接口上配置的属性输入附加值,例如逻辑封装或协议家族。
在上
se-1/0/0
设置 IPv4 地址 10.10.10.10/24。
删除接口 se-1/0/0
时,接口将被禁用,并从软件配置中移除。网络接口保持物理存在,其标识符继续显示在 J-Web 页面上。
基本串行接口配置
在此示例中,您将创建一个名为 se-1/0/0 的串行接口,并将封装类型设置为 ppp。要快速配置此示例,请在层级使用 CLI 快速配置 [edit]
,并在配置模式下提交。
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) 上的所有 8 个端口均在 DTE 模式下配置,设备 2 (SRX650) 上各自的 8 个端口在 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 上的其他 7 个端口重复相同的配置。
完成设备配置后,提交配置。
[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 页面上的复选框。
物理链路已启动。链路状态关闭表示接口模块、接口端口或物理连接存在问题(链路层错误)。
上次翻动时间是预期值。它表示物理接口上一次不可用,然后再次可用。意外的翻动表示可能是链路层错误。
流量统计信息反映了预期的输入和输出速率。验证入站和出站字节和数据包的数量是否与物理接口的预期吞吐量匹配。要清除统计信息并仅看到新的更改,请使用
clear interfaces statistics se-1/0/0
命令。
要验证接口链路状态是否正常运行,请使用输入
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,则配置是正确的。