Frame-relay配置實例

實驗環境
Dynamips模擬器
Cisco IOS Software, 3700 Software (C3745-ADVIPSERVICESK9-M), Version 12.4(4)T, RELEASE SOFTWARE (fc1)
 
拓撲結構
以下圖所示, R一、R二、R3三臺路由器經過幀中繼雲相互鏈接。
四臺設備都是C3475路由器,其中路由器R4用來模擬幀中繼交換機FR(注:在實驗環境中,模擬幀中繼交換機的路由器至少有三個廣域網串口)。
 

 
實驗要求
實現幀中繼網絡通訊;在幀中繼網絡上運行EIGRP路由選擇協議。
 
操做步驟
 
1、基本配置(路由器更名等,略)
 
2、配置幀中繼交換機
 
FR(config)#
FR(config)#frame-relay switching  ! 開啓frame 交換功能
FR(config)#int s3/1
FR(config-if)#encapsulation frame-relay ietf  ! 接口封裝幀中繼
FR(config-if)#frame-relay intf-type dce  ! 爲了幀中繼交換,將接口配置爲DCE
FR(config-if)#frame-relay lmi-type ansi !本地接口封裝類型由默認的cisco改成ansi
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 102 interface s3/2 201  ! 指定路由
FR(config-if)#frame-relay route 103 interface s3/3 301
FR(config-if)#no shutdown 
FR(config-if)#exit
FR(config)#
FR(config)#int s3/2
FR(config-if)#encapsulation frame-relay ietf
FR(config-if)#frame-relay intf-type dce
FR(config-if)#frame-relay lmi-type ansi
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 201 interface s3/1 102
FR(config-if)#frame-relay route 203 interface s3/3 302
FR(config-if)#no shutdown 
FR(config-if)#exit
FR(config)#
FR(config)#int s3/3
FR(config-if)#encapsulation frame-relay ietf
FR(config-if)#frame-relay intf-type dce
FR(config-if)#frame-relay lmi-type ansi
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 301 interface s3/1 103
FR(config-if)#frame-relay route 302 interface s3/2 203
FR(config-if)#no shutdown 
FR(config-if)#end
FR#
------------------------------------------------------
查看FR路由
FR#sh frame-relay route 
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial3/1       102             Serial3/2       201             inactive
Serial3/1       103             Serial3/3       301             inactive
Serial3/2       201             Serial3/1       102             inactive
Serial3/2       203             Serial3/3       302             inactive
Serial3/3       301             Serial3/1       103             inactive
Serial3/3       302             Serial3/2       203             inactive
能夠看到,此時的幀中繼鏈路是非激活的。
 
 
3、配置R一、R二、R3路由器
 
R1(config)#int s3/1
R1(config-if)#ip add 192.168.123.1 255.255.255.0
R1(config-if)#encapsulation frame-relay ietf 
R1(config-if)#no frame-relay inverse-arp !關閉ARP
R1(config-if)#frame-relay lmi-type ansi 
R1(config-if)#frame-relay map ip 192.168.123.2 102 broadcast !指定靜態映射
R1(config-if)#frame-relay map ip 192.168.123.3 103 broadcast
R1(config-if)#no shutdown 
R1(config-if)#exit
R1(config)#
------------------------------------------------------
R2(config)#int s3/2
R2(config-if)#ip add 192.168.123.2 255.255.255.0
R2(config-if)#encapsulation frame-relay ietf
R2(config-if)#no frame-relay inverse-arp 
R2(config-if)#frame-relay lmi-type ansi 
R2(config-if)#frame-relay map ip 192.168.123.1 201 broadcast
R2(config-if)#frame-relay map ip 192.168.123.3 203 broadcast
R2(config-if)#no shutdown 
R2(config-if)#exit
R2(config)#
------------------------------------------------------
R3(config)#int s3/3
R3(config-if)#ip add 192.168.123.3 255.255.255.0
R3(config-if)#encapsulation frame-relay ietf 
R3(config-if)#no frame-relay inverse-arp 
R3(config-if)#frame-relay lmi-type ansi 
R3(config-if)#frame-relay map ip 192.168.123.1 301 broadcast
R3(config-if)#frame-relay map ip 192.168.123.2 302 broadcast
R3(config-if)#no shutdown 
R3(config-if)#exit
R3(config)#
 
 
4、驗證配置
 
查看FR路由
FR#sh frame-relay route 
Input Intf      Input Dlci      Output Intf     Output Dlci     Status
Serial3/1       102             Serial3/2       201             active
Serial3/1       103             Serial3/3       301             active
Serial3/2       201             Serial3/1       102             active
Serial3/2       203             Serial3/3       302             active
Serial3/3       301             Serial3/1       103             active
Serial3/3       302             Serial3/2       203             active
配置好各路由器後,此時各幀中繼鏈路都自動變爲激活狀態(前提是配置無誤)。
------------------------------------------------------
查看映射
R1#sh frame-relay map
Serial3/1 (up): ip 192.168.123.2 dlci 102(0x66,0x1860), static,
              broadcast,
              IETF, status defined, active
Serial3/1 (up): ip 192.168.123.3 dlci 103(0x67,0x1870), static,
              broadcast,
              IETF, status defined, active
------------------------------------------------------
R2#sh frame-relay map
Serial3/2 (up): ip 192.168.123.1 dlci 201(0xC9,0x3090), static,
              broadcast,
              IETF, status defined, active
Serial3/2 (up): ip 192.168.123.3 dlci 203(0xCB,0x30B0), static,
              broadcast,
              IETF, status defined, active
------------------------------------------------------
R3#sh frame-relay map
Serial3/3 (up): ip 192.168.123.1 dlci 301(0x12D,0x48D0), static,
              broadcast,
              IETF, status defined, active
Serial3/3 (up): ip 192.168.123.2 dlci 302(0x12E,0x48E0), static,
              broadcast,
              IETF, status defined, active
------------------------------------------------------
查看永久虛電路,以R3爲例
R3#sh frame-relay pvc
 
PVC Statistics for interface Serial3/3 (Frame Relay DTE)
 
              Active     Inactive      Deleted       Static
  Local          2            0            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0
 
DLCI = 301, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial3/3
 
  input pkts 9             output pkts 8            in bytes 540       
  out bytes 476            dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 2         out bcast bytes 128       
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:01:39, last time pvc status changed 00:01:39
          
DLCI = 302, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial3/3
 
  input pkts 8             output pkts 13           in bytes 448       
  out bytes 676            dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 1         out bcast bytes 64        
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:01:21, last time pvc status changed 00:01:21
 
 
5、測試網絡連通性
 
R1#ping 192.168.123.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/55/72 ms
------------------------------------------------------
R1#ping 192.168.123.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/40/68 ms
------------------------------------------------------
R2#ping 192.168.123.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/42/68 ms
------------------------------------------------------
 
至此,路由器之間能正常通信。
但此時,路由器ping本身是ping不通的。好比R1:
R1#ping 192.168.123.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
------------------------------------------------------
爲何呢?由於frame-relay map裏面並無相關信息。須要手工添加,好比在R1上添加:
R1(config)#int s3/1
R1(config-if)#frame-relay map ip 192.168.123.1 102
 
而後咱們再看一下R1上的映射
R1#sh frame-relay map 
Serial3/1 (up): ip 192.168.123.1 dlci 102(0x66,0x1860), static,
              IETF, status defined, active
Serial3/1 (up): ip 192.168.123.2 dlci 102(0x66,0x1860), static,
              IETF, status defined, active
Serial3/1 (up): ip 192.168.123.3 dlci 103(0x67,0x1870), static,
              IETF, status defined, active
 
此時再R1ping本身,便能ping通了。
R1#ping 192.168.123.1 
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/97/140 ms
 
 
6、啓動迴環口,配置EIGRP
 
R1(config)#int loop 0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#exit
R1(config)#router eigrp 50
R1(config-router)#net 192.168.123.0 0.0.0.255
R1(config-router)#net 1.1.1.0 0.0.0.255
R1(config-router)#no auto-summary 
R1(config-router)#exit
------------------------------------------------------
R2(config)#int loop 0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#exit
R2(config)#router eigrp 50
R2(config-router)#net 192.168.123.0 0.0.0.255
R2(config-router)#net 2.2.2.0 0.0.0.255
R2(config-router)#no auto-summary
R2(config-router)#exit
------------------------------------------------------
R3(config)#int loop 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#exit
R3(config)#router eigrp 50
R3(config-router)#net 192.168.123.0 0.0.0.255
R3(config-router)#net 3.3.3.0 0.0.0.255 
R3(config-router)#no auto-summary 
R3(config-router)
 
 
7、查看EIGRP路由
 
配置完成後,查看R1發現的eigrp鄰居及其學習到的路由
R1#sh ip eigrp neighbors 
IP-EIGRP neighbors for process 50
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   192.168.123.3           Se3/1            162 00:09:26 1041  5000  0  6
0   192.168.123.2           Se3/1            163 00:09:26   75   450  0  6
------------------------------------------------------
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
C    192.168.123.0/24 is directly connected, Serial3/1
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/2297856] via 192.168.123.2, 00:07:26, Serial3/1
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2297856] via 192.168.123.3, 00:07:26, Serial3/1
------------------------------------------------------
進行ping測試
R1#ping 3.3.3.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/37/64 ms
 
注:前面在配置映射時,設定了採用廣播方式broadcast(若是不增長這個字段,表示採用非廣播方式,則本實驗是不能成功的),好比R1,
R1(config-if)#frame-relay map ip 192.168.123.2 102 broadcast
R1(config-if)#frame-relay map ip 192.168.123.3 103 broadcast
因爲EIGRP默認是支持廣播的,因此EIGRP能自動的發現鄰居。
若是運行OSPF,默認是NBMA環境,不支持廣播,於是不能自動發現鄰居,須要靜態的指定鄰居,才能學習到其餘路由器上的路由。
相關文章
相關標籤/搜索