Wednesday 10 June 2009

OSPF lab configs

R1


username R1 password 0 CCNP
username R2 password 0 CCNP
isdn switch-type basic-ni


interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.15.1 255.255.255.0
duplex auto
speed auto
!
interface BRI0/0
no ip address
dialer pool-member 1
isdn switch-type basic-ni
!
interface Serial0/0
no ip address
encapsulation frame-relay
no frame-relay inverse-arp
frame-relay lmi-type cisco
!
interface Serial0/0.123 point-to-point
(choose point to poing Sub interface here so OSPF automatically will pick a network type of point to point)
ip address 192.168.13.1 255.255.255.0
frame-relay interface-dlci 123
!
interface Serial0/1
no ip address
shutdown
!
interface Dialer0
ip address 192.168.12.1 255.255.255.0
encapsulation ppp
ip ospf demand-circuit
(excellent command to prevent autodialling of circuits)
dialer pool 1
(links BRI to dialer0)
dialer idle-timeout 30
dialer string 21
(21 is the telephone number of R1)
dialer-group 1
(links with dialer list, number has to match)
no peer neighbor-route
(you need this to prevent needless dialup with rip redistribution and PPP)
ppp chap password 0 CCNP
!
router ospf 1
router-id 1.1.1.1
(not really needed bit it keeps me warm a fuzzy)
log-adjacency-changes
area 12 virtual-link 2.2.2.2
(Link back to Area 0 for R2s networks)
summary-address 16.0.0.0 252.0.0.0
(RIP networks)
redistribute connected metric-type 1 subnets
redistribute rip metric-type 1 subnets
network 1.1.1.1 0.0.0.0 area 1
network 192.168.12.0 0.0.0.255 area 12
network 192.168.13.0 0.0.0.255 area 0
!
router rip
version 2
redistribute connected metric 1
redistribute ospf 1 metric 1
network 192.168.15.0
no auto-summary

dialer-list 1 protocol ip permit



R2

username R1 password 0 CCNP
username R2 password 0 CCNP
isdn switch-type basic-ni
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.23.2 255.255.255.0
duplex auto
speed auto
!
interface BRI0/0
no ip address
ip ospf demand-circuit
dialer pool-member 1
isdn switch-type basic-ni
!
interface Serial0/0
no ip address
encapsulation frame-relay IETF
shutdown
frame-relay lmi-type cisco
!
interface Serial0/1
no ip address
shutdown
!
interface Dialer0
ip address 192.168.12.2 255.255.255.0
encapsulation ppp
dialer pool 1
dialer idle-timeout 30
dialer string 11
dialer-group 1
no peer neighbor-route
ppp chap password 0 CCNP
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 12 virtual-link 1.1.1.1
area 23 virtual-link 3.3.3.3
network 192.168.12.0 0.0.0.255 area 12
network 192.168.23.0 0.0.0.255 area 23
dialer-list 1 protocol ip permit



R3


interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0
ip address 192.168.23.3 255.255.255.0
!
interface Serial0
no ip address
encapsulation frame-relay
no frame-relay inverse-arp
!
interface Serial0.321 point-to-point
ip address 192.168.13.3 255.255.255.0
frame-relay interface-dlci 321
!
interface Serial1
ip address 192.168.34.3 255.255.255.0

router ospf 1
router-id 3.3.3.3
log-adjacency-changes
area 23 virtual-link 2.2.2.2
network 3.3.3.3 0.0.0.0 area 3
network 192.168.13.0 0.0.0.255 area 0
network 192.168.23.0 0.0.0.255 area 23
network 192.168.34.0 0.0.0.255 area 34



R4


interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Serial0
ip address 192.168.34.4 255.255.255.0
clock rate 4000000
(you need this on the DCE end of a direct serial connection)
no fair-queue

router ospf 1
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 34
network 192.168.34.0 0.0.0.255 area 34


NB: R4's loopback is in area 34 NOT 4


R5


interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Loopback16
ip address 16.0.0.1 255.255.255.0
!
interface Loopback17
ip address 17.0.0.1 255.255.255.0
!
interface Loopback18
ip address 18.0.0.1 255.255.255.0
!
interface Loopback19
ip address 19.0.0.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.15.5 255.255.255.0
duplex auto
speed auto
router rip
version 2
network 16.0.0.0
network 17.0.0.0
network 18.0.0.0
network 19.0.0.0
network 192.168.15.0
no auto-summary






To test I sent a ping whilst connected to R4 like this:
ping 19.0.0.1 repeat 9999 size 1500

I then unplugged the serial interface on R1.
Automagically R2's ISDN line dials and it only drops 2/3 packets.

When R1's serial cable is plugged back in, after a few second normally routing continues and the line is dropped after 30 seconds of idle time.

Remember ctrl+shift+6 (x2) to escape from pings...or you will be there for a while :)

1 comment:

Praveen said...

hi would you show the topology of this lab and have u did this on GNS3 or packet tracer pls let me know