1. 程式人生 > >靜態路由強化訓練

靜態路由強化訓練

拓撲:

                               

要點:

①三個路由呈環狀(環形路由),那麼環形路由之間的對應路由就有兩個下一跳(下一跳可以使IP地址,也可以是介面)

②R0和R2兩個路由之間用串列埠進行連線,為了保持同步要設定時鐘頻率(一般為64000)

③注意每臺PC之間的IP地址與閘道器的正確設定

詳細配置:

R0:

R0#show running-config

Building configuration...

 

Current configuration : 803 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname R0

!

!

!

!

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

spanning-tree mode pvst

!

!

!

!

interface FastEthernet0/0

 ip address 192.168.5.1 255.255.255.0

 duplex auto

 speed auto

!

interface FastEthernet0/1

 ip address 192.168.2.1 255.255.255.0

 duplex auto

 speed auto

!

interface Serial0/0/0

 ip address 192.168.1.1 255.255.255.0

 clock rate 64000

!

interface Vlan1

 no ip address

 shutdown

!

ip classless

ip route 192.168.3.0 255.255.255.0 192.168.1.2

ip route 192.168.3.0 255.255.255.0 192.168.2.2

ip route 192.168.4.0 255.255.255.0 192.168.1.2

ip route 192.168.6.0 255.255.255.0 192.168.2.2

!

!

!

!

!

!

!

line con 0

!

line aux 0

!

line vty 0 4

 login

!

!

!

end

R1:

R1#show running-config

Building configuration...

 

Current configuration : 825 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname R1

!

!

!

!

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

spanning-tree mode pvst

!

!

!

!

interface FastEthernet0/0

 ip address 192.168.2.2 255.255.255.0

 duplex auto

 speed auto

!

interface FastEthernet0/1

 ip address 192.168.3.1 255.255.255.0

 duplex auto

 speed auto

!

interface Ethernet0/0/0

 ip address 192.168.6.1 255.255.255.0

 duplex auto

 speed auto

!

interface Vlan1

 no ip address

 shutdown

!

router rip

!

ip classless

ip route 192.168.1.0 255.255.255.0 192.168.2.1

ip route 192.168.1.0 255.255.255.0 192.168.3.2

ip route 192.168.4.0 255.255.255.0 192.168.3.2

ip route 192.168.5.0 255.255.255.0 192.168.2.1

!

!

!

!

!

!

!

line con 0

!

line aux 0

!

line vty 0 4

 login

!

!

!

end

R2:

R2#show running-config

Building configuration...

 

Current configuration : 785 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname R2

!

!

!

!

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

spanning-tree mode pvst

!

!

!

!

interface FastEthernet0/0

 ip address 192.168.3.2 255.255.255.0

 duplex auto

 speed auto

!

interface FastEthernet0/1

 ip address 192.168.4.1 255.255.255.0

 duplex auto

 speed auto

!

interface Serial0/0/0

 ip address 192.168.1.1 255.255.255.0

!

interface Vlan1

 no ip address

 shutdown

!

ip classless

ip route 192.168.2.0 255.255.255.0 192.168.3.1

ip route 192.168.2.0 255.255.255.0 Serial0/0/0

ip route 192.168.5.0 255.255.255.0 Serial0/0/0

ip route 192.168.6.0 255.255.255.0 192.168.3.1

!

!

!

!

!

!

!

line con 0

!

line aux 0

!

line vty 0 4

 login

!

!

!

end

tips:

如果大家懶得看每臺路由器的詳細配置,那麼大家針對本文直接看詳細配置中紅色加粗字型即可

實際驗證效果(路由表):

R0:

 

R1:

R2: