天天看點

ospf下幀中繼網絡配置

 一直想寫篇文章關于幀中繼這方面的,一來這東西是個難點二來網上這東西配置的都不咋完全,那小弟就獻醜了。廢話不說 看圖

<a target="_blank" href="http://blog.51cto.com/attachment/201010/233204129.png"></a>

我們用r2模拟幀中繼交換機

frame-relay s

enable

conf t

no ip domain-lookup

ip classless

ip subnet-zero

hostname r2

line cons 0

exec-timeout 0 0

logg sy

exit

int s0/0

no sh

en fr 

frame-relay lmi-type cisco   ||: lmi 類型

frame-relay intf-type dce               :設為dce

frame-relay route 103 interface s0/1 301     :靜态路由映射

frame-relay route 104 interface s0/2 401

clock rate 64000

int s0/1 

en fr

frame-relay lmi-type cisco

frame-relay intf-type dce

frame-relay route 301 interface s0/0 103

int s0/2

frame-relay route 401 interface s0/0 104

r1配置

hostname r1

ip add 192.168.1.1 255.255.255.0

r2配置

int s0/1

ip add 192.168.1.3 255.255.255.0

r4配置

ip add 192.168.1.4 255.255.255.0

這樣我們我們就完成了r1 2 3 4 基本配置  

在r2  r4#show frame-relay r

Input Intf      Input Dlci      Output Intf     Output Dlci     Status

Serial0/0       103             Serial0/1       301             inactive

Serial0/0       104             Serial0/2       401             inactive

Serial0/1       301             Serial0/0       103             inactive

Serial0/2       401             Serial0/0       104             inactive

我們再在r1上配置ospf

int loo 0

ip add 1.1.1.1 255.255.255.0 

ip ospf netw point to point

ip ospf netw b

ip ospf pri 10

frame-re map ip 192.168.1.3 103 b                 :對端ip   自己的dlci     廣播類型

frame-re map ip 192.168.1.4 103 b

frame-re map ip 192.168.1.1 103     可以 ping 通自己

no frame-re inv

router ospf 1

router-id 1.1.1.1

netw 192168.1.0 0.0.0.255 area 0

netw  1.1.1.0 0.0.0.255 area 0

r3配置

ip add 3.3.3.3 255.255.255.0

ip ospf pri 

frame-relay map ip 192.168.1.1 301 b

frame-relay map ip 192.168.1.4 301 b

frame-relay map ip 192.168.1.3 301

netw 3.3.3.0 0.0.0.255 area 0

netw 192.168.1.0 0.0.0.255 area 0

router-id 3.3.3.3

int loop 0

ip add 4.4.4.4 255.255.255.0 

ip add 192.168.1.4 255.255.255.0 

frame-relay map ip 192.168.1.1 401 b

frame-relay map ip 192.168.1.3 401 b

frame-relay map ip 192.168.1.4 401

netw 4.4.4.0 0.0.0.255 area

router-id 4.4.4.4

我們測試下r4路由表

r4#show 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

     1.0.0.0/24 is subnetted, 1 subnets

O       1.1.1.0 [110/65] via 192.168.1.1, 00:28:02, Serial0/2

     3.0.0.0/24 is subnetted, 1 subnets

O       3.3.3.0 [110/65] via 192.168.1.3, 00:28:02, Serial0/2

     4.0.0.0/24 is subnetted, 1 subnets

C       4.4.4.0 is directly connected, Loopback0

C    192.168.1.0/24 is directly connected, Serial0/2

ping 1.1.1.1

r4#ping 1.1.1.1

Type escape sequence to abort.

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

!!!!!

實驗完成!

點到點子接口的配置

 FR

interface Serial2/0

 no ip address

 encapsulation frame-relay

 serial restart-delay 0

 clock rate 64000

 no fair-queue

 frame-relay lmi-type ansi

 frame-relay intf-type dce

 frame-relay route 103 interface Serial2/3 301

 frame-relay route 104 interface Serial2/1 401

 frame-relay route 105 interface Serial2/2 501

interface Serial2/1

 frame-relay route 401 interface Serial2/0 104

interface Serial2/2

 frame-relay route 501 interface Serial2/0 105

interface Serial2/3

 frame-relay route 301 interface Serial2/0 103

R1

interface Serial1/0

inerface Serial1/0.3 point-to-point

 ip address 172.16.2.1 255.255.255.0

 frame-relay interface-dlci 103   

interface Serial1/0.4 point-to-point

 ip address 172.16.2.10 255.255.255.0

 frame-relay interface-dlci 104   

interface Serial1/0.5 point-to-point

 ip address 172.16.2.11 255.255.255.0

 frame-relay interface-dlci 105

R3

 interface Serial0/3

interface Serial0/3.1 point-to-point

 ip address 172.16.2.3 255.255.255.0

 frame-relay interface-dlci 301   

router ospf 10

 log-adjacency-changes

 network 172.16.2.0 0.0.0.255 area 0

 R4

interface Serial0/2

interface Serial0/2.1 point-to-point

 ip address 172.16.2.4 255.255.255.0

 frame-relay interface-dlci 401   

R5

nterface Serial0/2

 ip address 172.16.2.5 255.255.255.0

 frame-relay interface-dlci 501   

 本文轉自q狼的誘惑 51CTO部落格,原文連結:http://blog.51cto.com/liangrui/408451,如需轉載請自行聯系原作者