<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host router1
router1(config)#int e0
router1(config-if)#ip add 172.16.2.1 255.255.255.0
router1(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
router1(config-if)#int s0
router1(config-if)#ip add 172.16.1.1 255.255.255.0
router1(config-if)#encapsulation frame-relay
router1(config-if)#frame-relay intf-type dte //指定路由器的工作方式
router1(config-if)#frame-relay interface-dlci 102 //配置本地虚拟电路号
router1(config-if)#frame-relay lmi-type ansi //指定本地管理接口类型为ansi
router1(config-if)#frame-relay inverse-arp //配置r2的动态地址映射,当然也可以配置r2的静态地址映射:frame-relay map ip 172.16.1.2 102,如果这样不行,就换一下格式,因为在模拟器上做和实际的还是有些区别的:frame-relay map ip 172.16..1.1 201 broadcast
router1(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%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
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
21:49:39: %FR-5-DLCICHANGE: Interface Serial0 - DLCI 102 state changed to ACTIVE
router1(config-if)#
router1(config-if)#end
router1#sh frame-relay map //查看活动的映射
Serial0 (up): ip 172.16.1.2 dlci 102(0x66,0x1860), dynamic,
broadcast,CISCO, status defined, active
//下面是配置动态路由协议RIP
router1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router1(config)#router rip
router1(config-router)#version 2
router1(config-router)#network 172.16.1.0
router1(config-router)#network 172.16.2.0
router1(config-router)#end
router1#
router1#
router1#
router1#sh ip route //查看一下路由
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
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.2.0 is directly connected, Ethernet0
C 172.16.1.0 is directly connected, Serial0
R 172.16.3.0 [120/1] via 172.16.1.2, 00:05:24, Serial0
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host router2
router2(config)#int e0
router2(config-if)#ip add 172.16.3.1 255.255.255.0
router2(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
router2(config-if)#int s0
router2(config-if)#ip add 172.16.1.2 255.255.255.0
router2(config-if)#encapsulation frame-relay
router2(config-if)#frame-relay intf-type dce
router2(config-if)#frame-relay interface-dlci 201
router2(config-if)#frame-relay lmi-type ansi
router2(config-if)#clock rate 1000000
router2(config-if)#frame-relay inverse-arp
router2(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
router2(config-if)#exit
router2(config)#frame-relay switching //配置帧中继交换
router2(config)#end
router2#sh fr map
Serial0 (up): ip 172.16.1.1 dlci 201(0x66,0x1860), dynamic,
broadcast,CISCO, status defined, active
router2#
router2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router2(config)#router rip
router2(config-router)#version 2
router2(config-router)#network 172.16.1.0
router2(config-router)#network 172.16.3.0
router2(config-router)#end
IP 网关
PC1:172.16.2.10/24 172.16.2.1
PC2:172.16.3.10/24 172.16.3.1
转载于:https://blog.51cto.com/278891/81626