4.6 X25典型配置
4.6.1将路由器接入到X.25公共分组网中
【需求】
Router A作为总部和分支Router B和C通过X25网络互连。
【组网图】
【配置脚本】
RouterA配置脚本 |
# sysname RouterA # radius scheme system # domain system # interface Serial1/0 link-protocol x25 /配置封装方式为X25/ x25 x121-address 30561001 /配置本地x121地址/ x25 vc-range bi-channel 1 16 /配置HTC=16/ x25 map ip 168.173.24.2 x121-address 30561002 /配置到RTB的静态地址映射/ x25 map ip 168.173.24.3 x121-address 30561003 /配置到RTA的静态地址映射/ ip address 168.173.24.1 255.255.255.0 # interface Ethernet0/0 ip address 192.168.1.1 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
RouterB配置脚本 |
# sysname RouterB # radius scheme system # domain system # interface Serial1/0/0 link-protocol
x25 /配置封装方式为X25/ x25 x121-address
30561001 /配置本地x121地址/ x25 vc-range bi-channel 1 16 /配置HTC=16/ x25 map ip 168.173.24.1
x121-address 30561001 /配置到RTA的静态地址映射/ x25 map ip 168.173.24.3
x121-address 30561003 /配置到RTC的静态地址映射/ ip address 168.173.24.2 255.255.255.0 # interface Ethernet0/0 ip address 192.168.2.1 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
RouterC配置脚本 |
# sysname RouterC # radius scheme system # domain system # interface Serial1/0/0 link-protocol x25 /配置封装方式为X25/ x25 x121-address 30561003 /配置本地x121地址/ x25 vc-range bi-channel 1 16 /配置HTC=16/ x25 map ip 168.173.24.1 x121-address 30561001 /配置到RTA的静态地址映射/ x25 map ip 168.173.24.2 x121-address 30561002 /配置到RTB的静态地址映射/ ip address 168.173.24.3 255.255.255.0 # interface Ethernet0/0 ip address 192.168.3.1 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
Switch配置脚本(SVC) |
# sysname switch # x25 switching /使能X25交换/ # radius scheme system # domain system # interface Serial2/0/0 link-protocol x25 dce
/配置X25工作模式为DCE/ # interface Serial2/0/1 link-protocol x25 dce
/配置X25工作模式为DCE/ # interface Serial2/0/2 link-protocol x25 dce /配置X25工作模式为DCE/ # interface NULL0 # x25 switch svc 30561001 interface Serial2/0/0 /配置SVC路由/ x25 switch svc 30561002 interface Serial2/0/1 x25 switch svc 30561003 interface Serial2/0/2 # user-interface con 0 user-interface vty 0 4 # return |
【验证】
总部可以实现和分部互通
RouterA上的X25 vc信息:
<RouterA>disp x25 vc
Interface: Serial1/0
SVC 15
State: P4(transmit)
Map: ip 168.173.24.3 to 30561003
Window size: input 2 output 2
Packet Size: input 128 output 128
Local PS: 1
Local PR: 1 Remote PS:
0 Remote PR: 1
Local Busy: FALSE
Reset times: 0
Input/Output:
DATA 1/1
INTERRUPT 0/0
RR 0/0 RNR
0/0 REJ 0/0
Bytes 84/84
Send Queue(Current/Max): 0/200
Interface: Serial1/0
SVC 16
State: P4(transmit)
Map: ip 168.173.24.2 to 30561002
Window size: input 2 output 2
Packet Size: input 128 output 128
Local PS: 1
Local PR: 1 Remote PS:
0 Remote PR: 1
Local Busy: FALSE
Reset times: 0
Input/Output:
DATA 1/1
INTERRUPT 0/0
RR 0/0 RNR
0/0 REJ 0/0
Bytes 84/84
Send Queue(Current/Max): 0/200
交换机上的X25 路由表信息:
<switch>disp x25 switch-table svc dynamic
#1 (In: Serial2/0/0 - SVC16 ) <--> (Out: Serial2/0/1 - SVC1 )
#2 (In: Serial2/0/0 - SVC15 ) <--> (Out: Serial2/0/2 - SVC1 )
【提示】
1、X121地址由运营商提供,具有全局意义,类似电话号码。
2、htc参数也是由运营商来提供,默认为[1,1024],必须使用“x25 vc-range bi-channel 1 16”修改为运营商提供的参数,否则导致无法ping通对方地址。
4.5.2 背靠背互联
【需求】
Router A和Router B通过串口直接相连,两台路由器简单地背靠背连接,串口之间使用X.25链路层协议并承载IP数据报进行传输。
【组网图】
【配置脚本】
RouterA配置脚本 |
# sysname RouterA # radius scheme system # domain system # interface Serial1/0 link-protocol x25 /配置封装方式为X25/ x25 x121-address 1111 /配置本地x121地址/ x25 map ip 1.1.1.2 x121-address 2222 /配置到RTB的静态地址映射/ ip address 1.1.1.1 255.255.255.0 # interface Ethernet0/0 ip address 192.168.1.1 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
RouterB配置脚本 |
# sysname RouterB # radius scheme system # domain system # interface Serial1/0 link-protocol x25 /配置封装方式为X25/ x25 x121-address 2222 /配置本地x121地址/ x25 map ip 1.1.1.1 x121-address 1111 /配置到RTA的静态地址映射/ ip address 1.1.1.2 255.255.255.0 # interface Ethernet0/0 ip address 192.168.2.1 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
【验证】
Router A和Router B之间可以互通
【提示】
1、 该组网主要用于背靠背的实验环境。
4.5.3 XOT典型配置
【需求】
路由器A和路由器D为X.25终端设备,接入到X.25交换路由器B和路由器C,在它们之间建立TCP连接,通过TCP连接传送X.25报文。
【组网图】
【配置脚本】
RTA配置脚本 |
# sysname RTA # radius scheme system # domain system # interface Serial2/0/0 link-protocol x25 x25 x121-address 1111
/配置本地x121地址/ x25 map ip 1.1.1.2 x121-address 2222 /配置到RTD的静态地址映射/ ip address 1.1.1.1 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
RTB配置脚本 |
# sysname RTB # x25 switching
/使能X25交换/ # radius scheme system # domain system # interface Serial2/0/0 link-protocol x25 dce
/配置X25工作模式为DCE/ # interface Serial2/0/1 link-protocol ppp ip address 10.1.1.1 255.255.255.0 # interface NULL0 # x25 switch svc 2222 xot 10.1.1.2
/配置X25的XOT交换/ x25 switch svc 1111 interface Serial2/0/0 /配置X25的本地交换/ # user-interface con 0 user-interface vty 0 4 # return |
RTC配置脚本 |
# sysname RTC # x25 switching
/使能X25交换/ # radius scheme system # domain system # interface Serial2/0/0 link-protocol ppp ip address 10.1.1.2 255.255.255.0 # interface Serial2/0/1 link-protocol x25 dce
/配置X25工作模式为DCE/ # interface NULL0 # x25 switch svc 2222 interface Serial2/0/1 /配置X25的本地交换/ x25 switch svc 1111 xot 10.1.1.1
/配置X25的XOT交换/ # user-interface con 0 user-interface vty 0 4 # return |
RTD配置脚本 |
# sysname RTD # radius scheme system # domain system # interface Serial2/0/0 link-protocol x25 x25 x121-address 2222
/配置本地x121地址/ x25 map ip 1.1.1.1 x121-address 1111 /配置到RTA的静态地址映射/ ip address 1.1.1.2 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
【验证】
RTA上的X25 vc信息:
<RTA>disp x25 vc
Interface: Serial2/0/0
SVC 1
State: P4(transmit)
Map: ip 1.1.1.2 to
2222
Window size: input
2 output 2
Packet Size: input
128 output 128
Local PS: 5 Local PR: 5 Remote PS: 5 Remote PR: 4
Local Busy:
FALSE Reset times: 0
Input/Output:
DATA 5/5 INTERRUPT 0/0
RR 0/0 RNR 0/0 REJ 0/0
Bytes
420/420
Send
Queue(Current/Max): 0/200
RTB上的X25 XOT信息:
[RTB]disp x25 xot
SVC 1024: ( ESTAB )
tcp peer ip:
10.1.1.2, peer port: 1025
tcp local ip:
10.1.1.1, local port: 1998
XoT interface name:
Serial2/0/0-10.1.1.2
X25 interface name:
Serial2/0/0
RTB上的X25 交换表信息:
[RTB]disp x25
switch-table svc dynamic
#1 (In:
Serial2/0/0-10.1.1.2 - SVC1024) <--> (Out: Serial2/0/0 - SVC1 )
[RTB]disp x25
switch-table svc sta
Number
Destination
Substitute-src Substitute-dst CUD
SwitchTo(type/name)
1 2222
T/10.1.1.2
2 1111
I/Serial2/0/0
Total of static svc
is 2.
The item type of
SwitchTo meaning:
I: interface H: hunt-group T: xot