实验拓扑图:

实验过程

1.R1的配置

Router>en

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#no ip domain-lookup

Router(config)#line console 0

Router(config-line)#no exec-timeout

Router(config-line)#loggin syn

Router(config-line)#exit

Router(config)#host R1

R1(config)#interface s0/0

R1(config-if)#no shut

R1(config-if)#encapsulation frame-relay //封装帧中继

R1(config-if)#no frame-relay inverse-arp  //关闭反向ARP

R1(config-if)#exit

R1(config)#interface s0/0.1 point-to-point 

R1(config-subif)#frame-relay interface-dlci 102 //配置s0/0.1dlci

R1(config-fr-dlci)#ip add 172.16.0.1 255.255.255.0

R1(config-subif)#exit

R1(config)#interface s0/0.2 point-to-point 

R1(config-subif)#frame-relay interface-dlci 103

R1(config-fr-dlci)#ip add 192.168.0.1 255.255.255.0

R1(config-subif)#end

2.R2的配置

Router>en

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#no ip domain-lookup

Router(config)#line console 0

Router(config-line)#no exec-timeout

Router(config-line)#loggin syn

Router(config-line)#exit

Router(config)#host R2

R2(config)#interface s0/0

R2(config-if)#no shut

R2(config-if)#ip add 172.16.0.2 255.255.255.0 

R2(config-if)#encapsulation frame-relay //封装帧中继

R2(config-if)#frame-relay map ip 172.168.0.1 201 br  //配置映射表

R2(config-if)#no frame-relay inverse-arp  //关闭反向ARP

R2(config-if)#end

3.R3的配置

Router>en

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#no ip domain-lookup

Router(config)#line console 0

Router(config-line)#no exec-timeout

Router(config-line)#loggin syn

Router(config-line)#exit

Router(config)#host R3

R3(config)#interface s0/0

R3(config-if)#no shut

R3(config-if)#encapsulation frame-relay 

R3(config-if)#no frame-relay inverse-arp 

R3(config-if)#frame-relay map ip 192.168.0.1 301 br

R3(config-if)#ip add 192.168.0.2 255.255.255.0

R3(config-if)#end

4.查看帧中继map

R1#show frame-relay map

Serial0/0.2 (up): point-to-point dlci, dlci 103(0x67,0x1870), broadcast

          status defined, active

Serial0/0.1 (up): point-to-point dlci, dlci 102(0x66,0x1860), broadcast

          status defined, active

5.测试连通性

R2#ping 172.16.0.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/36/84 ms

R3#ping 192.168.0.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 20/52/104 ms

R2#show frame-relay map

Serial0/0 (up): ip 172.168.0.1 dlci 201(0xC9,0x3090), static,

              broadcast,

              CISCO, status defined, active

R2#ping 192.168.0.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:

.....  //因为R2没有到R3的映射,所以不通

Success rate is 0 percent (0/5)

6.配置R2R3的静态映射

R2(config)#interface s0/0

R2(config-if)#frame-relay map ip 192.168.0.2 201 br

R2(config-if)#end

R3(config)#interface s0/0

R3(config-if)#frame-relay map ip 172.16.0.2 301 br

R3(config-if)#end

7.测试R1R2连通性

R2#show frame-relay map

Serial0/0 (up): ip 172.168.0.1 dlci 201(0xC9,0x3090), static,

              broadcast,

              CISCO, status defined, active

Serial0/0 (up): ip 192.168.0.2 dlci 201(0xC9,0x3090), static,

              broadcast,

              CISCO, status defined, active

R2#ping 192.168.0.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/48/116 ms