其中幀中繼的設置:
其中設置端口的dlci號和名字(以後會用到,名字是隨意設置的)
Serial 1 的設置也是這樣但是dlci和名字不一樣
其中第一個路由器的配置如下:
封裝爲幀中繼並做靜態地址映射,即手工設置的(其中的ip地址爲自己本接口的地址 dlci號爲對方的)
第二個路由器的設置:
這樣兩臺路由器的設置就完成了
測試:
r1#show frame-relay map (查看映射表)
Serial2/0 (up): ip 192.168.1.2 dlci 100, static, broadcast, CISCO, status defined, active
此時可以互ping 對方了
這個實驗用的是手工配置的靜態地址映射
下面這個實驗是利用IARP(反向地址解析)動態獲得地址映射
還是如上的拓撲圖和地址和dlci號。
首先先刪除上面的配置:
r1(config-if)#no frame-relay map ip 192.168.1.2
r1(config-if)#frame-relay interface-dlci 100( 指定本地的dlci號是多少)
r2(config-if)#no frame-relay map ip 192.168.1.1
r2(config-if)#frame-relay interface-dlci 200
r1#show frame-relay map
Serial2/0 (up): ip 192.168.1.2 dlci 100, dynamic, broadcast, CISCO, status defined, active
幀中繼的子接口分爲點到點子接口和多點子接口。點到點子接口有自己獨立的dlci號和獨立的網絡地址,可以與其他物理接口或子接口建立虛電路連接(並且映射是動態映射)。多點子接口是用來與多個物理接口或多個子接口建立多個pvc的單個接都。所有參與的接口在同一個子網內。(映射是靜態映射)
我們先做點到點子接口的實驗吧
其中幀中繼的配置是:
路由器2的配置:
hostname r1
!
interface Serial2/0
no ip address
encapsulation frame-relay
!
interface Serial2/0.1 point-to-point
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 100
!
interface Serial2/0.2 point-to-point
ip address 192.168.2.1 255.255.255.0
frame-relay interface-dlci 400
!
line con 0
exec-timeout 0 0
password ghn
logging synchronous
login
line vty 0 4
password ghn
logging synchronous
login
!
!路由器3的配置:
hostname r2
no ip domain-lookup
interface Serial2/0
ip address 192.168.1.2 255.255.255.0
encapsulation frame-relay
frame-relay interface-dlci 200
line con 0
exec-timeout 0 0
password ghn
logging synchronous
login
line vty 0 4
password ghn
logging synchronous
login
路由器4的配置:
hostname r3
no ip domain-lookup
interface Serial2/0
no ip address
encapsulation frame-relay
!
interface Serial2/0.1 point-to-point
ip address 192.168.2.2 255.255.255.0
frame-relay interface-dlci 300
line con 0
exec-timeout 0 0
password ghn
logging synchronous
login
line vty 0 4
password ghn
logging synchronous
login
R1的地址映射:
r1# show frame-relay ma
r1# show frame-relay map
Serial2/0.1 (up): point-to-point dlci, dlci 100, broadcast, status defined, active
Serial2/0.2 (up): point-to-point dlci, dlci 400, broadcast, status defined, active
多點子接口實驗:
幀中繼的配置:
R5的配置:
hostname r1
no ip domain-lookup
interface Serial2/0
ip address 192.168.1.1 255.255.255.0
encapsulation frame-relay
frame-relay map ip 192.168.1.2 100 broadcast
frame-relay map ip 192.168.1.3 200 broadcast
e con 0
exec-timeout 0 0
password ghn
logging synchronous
login
line vty 0 4
password ghn
logging synchronous
login
R6的配置:
hostname r2
no ip domain-lookup
interface Serial2/0
no ip address
encapsulation frame-relay
!
interface Serial2/0.1 multipoint
ip address 192.168.1.2 255.255.255.0
frame-relay map ip 192.168.1.1 300 broadcast
line con 0
exec-timeout 0 0
password ghn
logging synchronous
login
line vty 0 4
password ghn
logging synchronous
login
R7的配置:
hostname r3
no ip domain-lookup
interface Serial2/0
no ip address
encapsulation frame-relay
!
interface Serial2/0.1 multipoint
ip address 192.168.1.3 255.255.255.0
frame-relay map ip 192.168.1.1 400 broadcast
line con 0
exec-timeout 0 0
password ghn
login
line vty 0 4
password ghn
logging synchronous
login
r1#show frame-relay ma
r1#show frame-relay map
Serial2/0 (up): ip 192.168.1.2 dlci 100, static, broadcast, CISCO, status defined, active
Serial2/0 (up): ip 192.168.1.3 dlci 200, static, broadcast, CISCO, status defined, active