OSPF—Frame-Relay实验_交换
 
 
R1:s0/0--123.123.123.1/24  lo0:1.1.1.1/24
R3:s0/0--123.123.123.2/24  lo0:2.2.2.2/24
R4:s0/0--123.123.123.3/24  lo0:3.3.3.3/24
 
 
 
NON_BROADCAST:
R2:
Router>en
Router#conf t
Router(config)#ho ISP
ISP(config)#no ip do lo
ISP(config)#lin con 0
ISP(config-line)#exec-t 0 0
ISP(config-line)#loggin sy
ISP(config-line)#exi
ISP(config)#frame-relay switching
ISP(config)#int s0/0
ISP(config-if)#encapsulation frame-relay
ISP(config-if)#frame-relay lmi-type ansi
ISP(config-if)#frame-relay intf-type dce
ISP(config-if)#clock rate 64000                
ISP(config-if)#frame-relay route 102 int s0/1 201
ISP(config-if)#frame-relay route 103 int s0/2 301
ISP(config-if)#no sh
ISP(config-if)#int s0/1
ISP(config-if)#encapsulation frame-relay
ISP(config-if)#frame-relay lmi-type ansi
ISP(config-if)#frame-relay intf-type dce
ISP(config-if)#clock rate 64000
ISP(config-if)#frame-relay route 201 int s0/0 102
ISP(config-if)#no sh
 
R1:
Router>en
Router#conf t
central(config)#ho Central
Central(config)#no ip do lo
Central(config)#lin con 0
Central(config-line)#exec-t 0 0
Central(config-line)#loggin sy
Central(config-line)#exi
Central(config)#int lo0
Central(config-if)#ip add 1.1.1.1 255.255.255.0
Central(config-if)#ip ospf network point-to-point
Central(config-if)#int s0/0
Central(config-if)#encapsulation frame-relay
Central(config-if)#no frame-relay inverse-arp
Central(config-if)#no arp frame-relay
Central(config-if)#frame-relay lmi-type ansi
Central(config-if)#ip add 123.123.123.1 255.255.255.0
Central(config-if)#frame-relay map ip 123.123.123.2 102 b
Central(config-if)#frame-relay map ip 123.123.123.3 103 b
Central(config-if)#no sh

Central(config)#router ospf 1
Central(config-router)#network 123.123.123.1 0.0.0.0 a 0
Central(config-router)#network 1.1.1.1 0.0.0.0 a 0
Central(config-router)#neighbor 123.123.123.2
Central(config-router)#neighbor 123.123.123.3
 
R3:
Router>en
Router#conf t
Router(config)#ho Branch1
Branch1(config)#no ip do lo
Branch1(config)#lin con 0
Branch1(config-line)#exec-t 0 0
Branch1(config-line)#loggin sy
Branch1(config-line)#exi
Branch1(config)#int lo0
Branch1(config-if)#ip add 2.2.2.2 255.255.255.0
Branch1(config-if)#ip ospf network point-to-p
Branch1(config-if)#int s0/0
Branch1(config-if)#en fr 
Branch1(config-if)#frame-relay lmi-type ansi
Branch1(config-if)#no frame-relay inverse-arp
Branch1(config-if)#no arp frame-relay
Branch1(config-if)#ip add 123.123.123.2 255.255.255.0
Branch1(config-if)#frame-relay map ip 123.123.123.1 201 b
Branch1(config-if)#frame-relay map ip 123.123.123.3 201 b
Branch1(config-if)#no sh
Branch1(config)#router ospf 1
Branch1(config-router)#network 123.123.123.2 0.0.0.0 a 0
Branch1(config-router)#network 2.2.2.2 0.0.0.0 a 0
Branch1(config)#int s0/0    
Branch1(config-if)#ip ospf priority 0
 
R4:
Router>en
Router#conf t
Router(config)#hostname Branch2
Branch2(config)#no ip do lo
Branch2(config)#lin con 0
Branch2(config-line)#exec-t 0 0
Branch2(config-line)#loggin sy
Branch2(config-line)#exi
Branch2(config)#int lo0
Branch2(config-if)#ip add 3.3.3.3 255.255.255.0
Branch2(config-if)#ip ospf network point-to-p
Branch2(config-if)#int s0/0
Branch2(config-if)#ip add 123.123.123.3 255.255.255.0
Branch2(config-if)#encapsulation frame-relay
Branch2(config-if)#no frame-relay inverse-arp
Branch2(config-if)#no arp frame-relay
Branch2(config-if)#frame-relay lmi-type ansi
Branch2(config-if)#frame-relay map ip 123.123.123.1 301 b
Branch2(config-if)#frame-relay map ip 123.123.123.2 301 b
Branch2(config-if)#no sh
Branch2(config)#router ospf 1
Branch2(config-router)#network 123.123.123.3 0.0.0.0 a 0
Branch2(config-router)#network 3.3.3.3 0.0.0.0 a 0
Branch2(config)#int s0/0    
Branch2(config-if)#ip ospf priority 0
 
Central#sh ip ospf int s0/0
Serial0/0 is up, line protocol is up
  Internet Address 123.123.123.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 1.1.1.1, Interface address 123.123.123.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:07
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
Central# sh ip os ne
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/DROTHER    00:01:59    123.123.123.2   Serial0/0
3.3.3.3           0   FULL/DROTHER    00:01:59    123.123.123.3   Serial0/0
 
 
POINT_TO_MULTIPOINT:
 
Branch1(config)#int s0/0
Branch1(config-if)#no  frame-relay map ip 123.123.123.3 201 b
Branch2(config)#int s0/0
Branch2(config-if)#no frame-relay map ip 123.123.123.2 301 b
 
Central(config)#router ospf 1
Central(config-router)#no neighbor 123.123.123.2
Central(config-router)#no neighbor 123.123.123.3
Central(config)#int s0/0
Central(config-if)#ip ospf network point-to-multipoint
 
Central#sh ip ospf int s0/0
Serial0/0 is up, line protocol is up
  Internet Address 123.123.123.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:22
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 2
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 2.2.2.2
    Adjacent with neighbor 3.3.3.3
  Suppress hello for 0 neighbor(s)
 
Central#sh ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -        00:01:57    123.123.123.2   Serial0/0
3.3.3.3           0   FULL/  -        00:01:57    123.123.123.3   Serial0/0