幀中繼

NBMA實驗
實驗準備:
一、 四臺路由器,R2配置成幀中繼交換機。
二、 R1,R3,R4運行OSPF。
實驗配置:
R1:
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
 ip ospf network point-to-point            使路由正常。
interface Serial0/0
 ip address 134.1.1.1 255.255.255.0
 encapsulation frame-relay                封裝成幀中繼。
 ip ospf network non-broadcast            配置成NBMA的網絡。
 ip ospf priority 255                     使R1成爲DR。接口清閒級。
frame-relay map ip 134.1.1.3 103 broadcast   用廣播方式發送幀中繼信息。靜態映射。(注意:對方IP和己方DLCI)
 frame-relay map ip 134.1.1.4 104 broadcast
 no frame-relay inverse-arp                 關閉自動映射。
router ospf 1
 log-adjacency-changes
 network 1.1.1.0 0.0.0.255 area 0
 network 134.1.1.0 0.0.0.255 area 0
 neighbor 134.1.1.3 priority 3          在NBMA的網絡中,只能使用neighbor來指明鄰居還能夠指明鄰居的優先級。
 neighbor 134.1.1.4
SWITCH:
frame-relay switching                  配置成幀中繼交換機。此命令很重要。
interface Serial0/0
 no ip address
 encapsulation frame-relay              封裝成幀中繼
 clockrate 128000
 frame-relay lmi-type cisco              配置幀中繼的類型
 frame-relay intf-type dce                配置幀中繼爲DCE
 frame-relay route 103 interface Serial0/1 301    作幀中繼映射
 frame-relay route 104 interface Serial0/2 401
interface Serial0/1
 no ip address
 encapsulation frame-relay
 clockrate 128000
 frame-relay lmi-type cisco
 frame-relay intf-type dce
 frame-relay route 301 interface Serial0/0 103
interface Serial0/2
 no ip address
 encapsulation frame-relay
 clockrate 128000
 frame-relay lmi-type cisco
 frame-relay intf-type dce
 frame-relay route 401 interface Serial0/0 104
R3:
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
 ip ospf network point-to-point
interface Serial0/1
 ip address 134.1.1.3 255.255.255.0
 encapsulation frame-relay
 ip ospf network non-broadcast
 ip ospf priority 3
 frame-relay map ip 134.1.1.1 301 broadcast
 frame-relay map ip 134.1.1.4 301 broadcast  
no frame-relay inverse-arp
router ospf 1
 log-adjacency-changes
 network 3.3.3.0 0.0.0.255 area 0
 network 134.1.1.0 0.0.0.255 area 0
R4:
interface Loopback0
 ip address 4.4.4.4 255.255.255.0
 ip ospf network point-to-point
interface Serial0/1
 ip address 134.1.1.4 255.255.255.0
 encapsulation frame-relay
 ip ospf network non-broadcast
 ip ospf priority 0
 frame-relay map ip 134.1.1.1 401 broadcast
 frame-relay map ip 134.1.1.3 401 broadcast
no frame-relay inverse-arp
router ospf 1
 log-adjacency-changes
 network 4.4.4.0 0.0.0.255 area 0
 network 134.1.1.0 0.0.0.255 area 0
實驗結果:
R1#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           3   FULL/BDR        00:01:31    134.1.1.3       Serial0/0
4.4.4.4           0   FULL/DROTHER    00:01:57    134.1.1.4       Serial0/0
R1#show ip route ospf
     3.0.0.0/24 is subnetted, 1 subnets
O       3.3.3.0 [110/782] via 134.1.1.3, 00:11:56, Serial0/0
     4.0.0.0/24 is subnetted, 1 subnets
O       4.4.4.0 [110/782] via 134.1.1.4, 00:11:56, Serial0/0
R3:frame-relay map ip 134.1.1.4 301 broadcast  
R4:frame-relay map ip 134.1.1.3 401 broadcast
以上兩條命令的說明:
若是你加這兩條命令,在R3上和R4上都能看見帶O的路由,如:
R3#show ip route ospf
     1.0.0.0/24 is subnetted, 1 subnets
O       1.1.1.0 [110/782] via 134.1.1.1, 00:00:16, Serial0/1
     4.0.0.0/24 is subnetted, 1 subnets
O       4.4.4.0 [110/782] via 134.1.1.4, 00:00:16, Serial0/1
R3#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R4#show ip route ospf
     1.0.0.0/24 is subnetted, 1 subnets
O       1.1.1.0 [110/782] via 134.1.1.1, 00:00:35, Serial0/1
     3.0.0.0/24 is subnetted, 1 subnets
O       3.3.3.0 [110/782] via 134.1.1.3, 00:00:35, Serial0/1
R4#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 0 percent (0/5)
說明即便有路由,可是沒有幀中繼映射仍是不可以通訊。
加上這兩條命令後:
R3#show ip route ospf
     1.0.0.0/24 is subnetted, 1 subnets
O       1.1.1.0 [110/782] via 134.1.1.1, 00:04:15, Serial0/1
     4.0.0.0/24 is subnetted, 1 subnets
O       4.4.4.0 [110/782] via 134.1.1.4, 00:04:15, Serial0/1
R3#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms
R4#show ip route ospf      1.0.0.0/24 is subnetted, 1 subnets O       1.1.1.0 [110/782] via 134.1.1.1, 00:03:57, Serial0/1      3.0.0.0/24 is subnetted, 1 subnets O       3.3.3.0 [110/782] via 134.1.1.3, 00:03:57, Serial0/1 R4#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 = 56/57/60 ms
相關文章
相關標籤/搜索