ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

通过帧中继配置实现不同网段间通信的实验

2014-8-12 03:35| 发布者: admin| 查看: 1017| 评论: 0

摘要: 在一些特殊情况下,三个路由器组成一个简单的拓扑,分处不同的网段,除了使用DDN之外,还可以通过配置帧中继的方法,实现不同网段之间的数据通信。这是今天要进行的实验的目的,下面以公司内网和外网的实例来说明。 ...
在一些特殊情况下,三个路由器组成一个简单的拓扑,分处不同的网段,除了使用DDN之外,还可以通过配置帧中继的方法,实现不同网段之间的数据通信。这是今天要进行的实验的目的,下面以公司内网和外网的实例来说明。
公司总部和分支机构的通信除了用DDN之外,另外还可以采用帧中继。路由器A是总公司,B和C是分支机构,利用帧中继通信的具体配置可以如下:
试验环境:
 
 
首先要清楚全网示意图:
 
A:连接帧中继的端口:202.110.100.1   255.255.255.0
局域网端口192.168.10.1   255.255.255.0
B:连接帧中继的端口:202.110.100.2   255.255.255.0
局域网端口192.168.10.2   255.255.255.0
 
C:连接帧中继的端口:202.110.100.3   255.255.255.0
局域网端口192.168.10.3   255.255.255.0
 
通过对帧中继的配置,实现不同网段间的通信,那么试验就成功了。
 
 在A上做:


router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host A
A(config)#int e0
A(config-if)#ip addr 192.168.10.1 255.255.255.0
A(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
A(config-if)#int s0
A(config-if)#ip addr 202.110.100.1 255.255.255.0
A(config-if)#encap frame-relay
A(config-if)#frame-relay int
A(config-if)#frame-relay int
A(config-if)#frame-relay interface-dlci 102
A(config-if)#frame-relay interface-dlci 103
A(config-if)#bandwidth 64
A(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
A(config-if)#exit
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
21:49:39: %FR-5-DLCICHANGE: Interface Serial0
http://www.luyouqiwang.com/14163/ 
A(config)#router eigrp 100

A(config-router)#net 202.110.100.0
A(config-router)#net 192.168.10.0
A(config-router)#exit
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
A(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
 
再B上做:
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host B
B(config)#int e0
B(config-if)#ip addr 192.168.20.1 255.255.255.0
B(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
B(config-if)#int s0
B(config-if)#ip addr 202.110.100.2 255.255.255.0
B(config-if)#encap frame-relay
B(config-if)#frame-relay interface-dlci 201
B(config-if)#frame-relay interface-dlci 203
B(config-if)#bandwidth 64
B(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
B(config-if)#exit
B(config)#router eigrp 100
B(config-router)#net 192.168.20.0
B(config-router)#net 202.110.100.0
B(config-router)#exit
B(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
 
在C上做:
Router>
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host C
C(config)#int e0
C(config-if)#ip addr 192.168.30.1 255.255.255.0
C(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
C(config-if)#int s0
C(config-if)#ip addr 202.110.100.3 255.255.255.0
C(config-if)#encap frame-relay
C(config-if)#frame-relay int
C(config-if)#frame-relay interface-dlci 301
C(config-if)#frame-relay interface-dlci 302
C(config-if)#bandwidth 64
C(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
C(config-if)#exit
C(config)#router eigrp 100

C(config-router)#net 202.110.100.0
C(config-router)#net 192.168.30.0
C(config-router)#exit
C(config)#exit
 
在A上测试路由:
A#
A#show ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
 
Gateway of last resort is not set
 
C    192.168.10.0 is directly connected, Ethernet0
C    202.110.100.0 is directly connected, Serial0
D    192.168.20.0 [90/3061760] via 202.110.100.2, 00:03:43, Serial0
D    192.168.30.0 [90/3061760] via 202.110.100.3, 00:00:28, Serial0
在B上测试路由:
 
B#
B#show ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
 
Gateway of last resort is not set
 
C    192.168.20.0 is directly connected, Ethernet0
C    202.110.100.0 is directly connected, Serial0
D    192.168.10.0 [90/3061760] via 202.110.100.1, 00:02:27, Serial0
D    192.168.30.0 [90/3061760] via 202.110.100.3, 00:00:17, Serial0
 
在C上测试路由:
 
C#
C#
C#show ip ro

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
 
Gateway of last resort is not set
 
C    192.168.30.0 is directly connected, Ethernet0
C    202.110.100.0 is directly connected, Serial0
D    192.168.10.0 [90/3061760] via 202.110.100.1, 00:11:44, Serial0
D    192.168.20.0 [90/3061760] via 202.110.100.2, 00:11:44, Serial0
 
 
互通情况测试:
C#ping 192.168.30.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:


!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
C#ping 192.168.20.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
C#ping 192.168.10.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
C#ping 202.110.100.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.110.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
C#ping 202.110.100.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.110.100.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
C#ping 202.110.100.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.110.100.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
 

总结,已经就是不使用DDN而采用配置帧中继来实现不同网段的互联互通的全部配置命令。大家可以举一反三的利用这些知识来操作不同情况下的组网。
 

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-5-8 03:56 , Processed in 0.110706 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部