Redistribute Giữa OSPF Và IGRP

  • View
    223

  • Download
    5

Embed Size (px)

DESCRIPTION

Redistribute Gia OSPF V IGRP

Transcript

Redistribute gia OSPF v IGRP

Redistribute gia OSPF v IGRP

Tc gi: Nguyn Th Bng Tm

Trong bi ny ta s thc hin redistribute gia hai giao thc hiu classfull l IGRP v giao thc hiu classless l OSPF .

Mc tiu bi lm :

T mt router bt k trong mng ping thy tt c cc a ch .

Gii quyt vn m classfull gp phi l discontiguous network v VLSM .

Kim tra metric ca hai giao thc .

M hnh mng nh hnh v di y , router R2 chy hai giao thc l OSPF v IGRP .Router ny s thc hin redistribute gia hai giao thc ny .

i ch ca cc interface trn cc router nh sau :

Router

Interface

a ch

Router R1

S0/0

F0/1

F0/0

Loopback 0

192.168.2.1/24

172.16.1.1/28

172.16.1.17/28

192.168.6.1/24

Router R2

S0/0

S0/1

E0/0

192.168.2.2/24

192.168.1.2/24

192.168.3.2/24

Router R3

S0/0

E0/0

Loopback 0

192.168.1.3/24

172.16.4.1/24

10.3.1.1/24

Router R4

E0/0

Loopback 0

Loopback 1

Loopback 2

192.168.3.4/24

10.1.1.1/24

10.1.2.160/24

172.16.5.1/24

Cu hnh ban u :

R1

!

Hostname R1

!

Interface Loopback0

Ip address 192.168.6.1 255.255.255.0

!

Interface fastethernet0/0

Ip address 172.16.1.16 255.255.255.240

!

Interface Serial0/0

Ip address 192.168.2.1 255.255.255.0

!

Interface fastethernet0/1

Ip address 172.16.1.1 255.255.255.240

!

End

R2

!

Hostname R2

!

Interface Ethernet0/0

Ip address 192.168.3.2 255.255.255.0

!

Interface Serial0/0

Ip address 192.168.2.2 255.255.255.0

Clockrate 64000

!

Interface Serial0/1

Ip address 192.168.1.2 255.255.255.0

!

End

R3

!

Hostname R3

!

Interface Loopback0

Ip address 10.3.1.1 255.255.255.0

! Interface Ethernet0/0

Ip address 172.16.4.1 255.255.255.0

!

Interface Serial0/0

Ip address 192.168.1.3 255.255.255.0

Clockrate 64000

!

Ip classless

!

End

R4

!

Hostname R4

!

Interface Loopback0

Ip address 10.1.1.1 255.255.255.0

!

Interface Loopback1

Ip address 10.1.2.160 255.255.255.0

!

Interface Loopback2

Ip address 172.16.5.1 255.255.255.0

!

Interface Ethernet0/0

Ip address 192.168.3.4 255.255.255.0

!

End

By gi ta tin hnh cu hnh tng bc cho cc router :

Cu hnh cho router R1 :

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R1

R1(config)#line console 0

R1(config-line)#password cisco

R1(config-line)#logging synchronous

R1(config-line)#line vty 0 4

R1(config-line)#no login

R1(config-line)#exit

R1(config)#interface s0/0

R1(config-if)#ip address 192.168.2.1 255.255.255.0

R1(config-if)#clock rate 64000

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface f0/1

R1(config-if)#ip address 172.16.1.1 255.255.255.240

R1(config-if)#no keepalive

R1(config-if)#no shutdown

00:15:24: %LINK-3-UPDOWN: Interface fastethernet0/1, changed state to up

00:15:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface fastethernet0/1, changed

State to up

R1(config-if)#interface f0/0

R1(config-if)#ip address 172.16.1.17 255.255.255.240

R1(config-if)#no keepalive

R1(config-if)#no shutdown

R1(config-if)#exit

00:15:45: %LINK-3-UPDOWN: Interface fastethernet0/0, changed state to up

00:15:46: %LINEPROTO-5-UPDOWN: Line protocol on Interface fastethernet0/0, changed state to up

R1(config)#interface loopback 0

R1(config-if)#ip address 192.168.6.1 255.255.255.0

R1(config)#exit

R1#copy running-config startup-config

Building configuration...

[OK]

(thc hin lu cu hnh)

Cu hnh cho router R2 :

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R2

R2(config)#line console 0

R2(config-line)#password cisco

R2(config-line)#logging synchronous

R2(config-line)#line vty 0 4

R2(config-line)#no login

R2(config-line)#exit

R2(config)#interface s0/0

R2(config-if)#ip address 192.168.2.2 255.255.255.0

R2(config-if)#clock rate 64000

R2(config-if)#no shutdown

R2(config-if)#interface s0/1

R2(config-if)#ip address 192.168.1.2 255.255.255.0

R2(config-if)#clock rate 64000

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#interface e0/0

R2(config-if)#ip address 192.168.3.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#exit

R2#

R2#wr

Building configuration...

[OK]

(thc hin lu cu hnh )

Cu hnh cho router R3 :

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R3

R3(config)#line console 0

R3(config-line)#password cisco

R3(config-line)#logging synchronous

R3(config-line)#line vty 0 4

R3(config-line)#no login

R3(config-line)#exit

R3(config)#interface s0/0

R3(config-if)#ip address 192.168.1.3 255.255.255.0

R3(config-if)#clock rate 64000

R3(config-if)#no shutdown

R3(config-if)#exit

R3(config)#interface e0/0

R3(config-if)#ip address 172.16.4.1 255.255.255.0

R3(config-if)#no keepalive

R3(config-if)#no shutdown

R3(config-if)#exit

R3(config)#int loopback 0

R3(config-if)#ip address 10.3.31.1 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#exit

R3(config)#exit

R3#write

Building configuration...

[OK]

(thc hin lu cu hnh)

Cu hnh cho router R4 :

Press RETURN to get started!

Router>enable

Router#configure t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R4

R4(config)#line console 0

R4(config-line)#password cisco

R4(config-line)#logging synchronous

R4(config-line)#line vty 0 4

R4(config-line)#no login

R4(config-line)#exit

R4(config)#interface e0/0

R4(config-if)#ip address 192.168.3.4 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#exit

*Mar 1 00:04:19.865: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up

R4(config)#interface loopback 0

R4(config-if)#ip address 10.1.1.1 255.255.255.0

R4(config-if)#interface loopback 1

R4(config-if)#ip address 10.1.2.160 255.255.255.0

R4(config-if)#interface loopback 2

R4(config-if)#ip address 172.16.5.1 255.255.255.0

R4(config-if)#exit

R4(config)#exit

R4#wr

Building configuration...

[OK]

(thc hin lu cu hnh)

Kim tra bng nh tuyn ca mi router :

R1#sh ip route

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 2 subnets, 1 masks

C 172.16.1.0/28 is directly connected, fastethernet0/1

C 172.16.1.16/28 is directly connected, fastethernet0/0

C 192.168.2.0/24 is directly connected, Serial0/0

C 192.168.6.0/24 is directly connected, Loopback0

R2#sh ip route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Serial0/1

C 192.168.2.0/24 is directly connected, Serial0/0

C 192.168.3.0/24 is directly connected, Ethernet0/0

R3#sh ip route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnets

C 172.16.4.0 is directly connected, Ethernet0/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.3.1.0 is directly connected, Loopback0

C 192.168.1.0/24 is directly connected, Serial0/0

R4#sh ip route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnets

C 172.16.5.0 is directly connected, Loopback2

10.0.0.0/24 is subnetted, 2 subnets

C 10.1.2.0 is directly connected, Loopback1

C 10.1.1.0 is directly connected, Loopback0

C 192.168.3.0/24 is directly connected, Ethernet0/0

trn bng nh tuyn ta ch thy cc connected network ,l do l v khng c giao thc nh tuyn no chy trn .Cu hnh cho cc router R1,R4 v interface s0/0 ca R2 chy OSPF vi process id l 1, area 0 . Router R3 v interface s0/1 ca R2 chy IGRP process 1.

Cu hnh nh sau :

R1(config)#router ospf 1

R1(config-router)#network 172.16.1.0 0.0.0.15 area 0

R1(config-router)#network 172.16.1.16 0 0.0.0.15 area 0

R1(config-router)#network 192.168.2.0 0.0.0.255 area 0

R1(config-router)#network 192.168.6.0 0.0.0.255 area 0

R2(config)#router ospf 1

R2(config-router)#network 192.168.2.0 0.0.0.255 area 0

R2(config-router)#network 192.168.3.0 0.0.0.255 area 0

R2(config-router)#exit

R2(config)#router igrp 1

R