Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1538466
  • 博文数量: 416
  • 博客积分: 10061
  • 博客等级: 上将
  • 技术积分: 3287
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-05 11:12
个人简介

技术在于专研

文章分类

全部博文(416)

文章存档

2021年(3)

2015年(34)

2013年(2)

2012年(1)

2011年(2)

2010年(5)

2007年(344)

2006年(25)

分类: 系统运维

2007-02-09 14:37:22

要求:PC1 Windows系统的PCPC2Liunx系统的PC,从PC1发送出去的数据包以R2为主路由发送出去,R3为备份路由,从PC2发送出去的数据以R3为主路由发送数据,R2为备份路由,当其中要是有一台路由DOWN的时候数据全部从UP的那台路由转发送出去。

 

R2#sh ru

Building configuration...

 

Current configuration : 1327 bytes

!

version 12.1

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname R2

!

!

ip subnet-zero

ip cef

!

!

no ip domain-lookup

!

ip audit notify log

ip audit po max-events 100

ip ssh time-out 120

ip ssh authentication-retries 3

!

!

interface FastEthernet0/0

 ip address 192.168.0.1 255.255.255.0

 no ip redirects

 no ip proxy-arp           //关闭代理ARP

 duplex half

 standby 1 ip 192.168.0.6 //设置HSRP1,Windows组的PC指定网关,并配置优先级,抢占

 standby 1 priority 110

 standby 1 preempt

 standby 2 ip 192.168.0.7    //设置HSRP2

!

interface Serial2/0

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial2/1

 ip address 12.0.0.2 255.255.255.0

 serial restart-delay 0

!        

router rip

 version 2

 network 12.0.0.0

 network 192.168.0.0

!

ip classless

no ip http server

no ip http secure-server

!

!

line con 0

 exec-timeout 0 0

 password cisco

 logging synchronous

 login

 stopbits 1

line aux 0

 stopbits 1

line vty 5 15

!

!

End

 

 

 

 

R3#sh ru

Building configuration...

 

Current configuration : 1346 bytes

!

version 12.1

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname R5

!

!

ip subnet-zero

ip cef

!

!

no ip domain-lookup

!

ip audit notify log

ip audit po max-events 100

ip ssh time-out 120

ip ssh authentication-retries 3

!

interface FastEthernet0/0

 ip address 192.168.0.5 255.255.255.0

 no ip redirects

 no ip proxy-arp        //关闭代理ARP

 duplex half

 standby 1 ip 192.168.0.6  //设置HSRP1

 standby 1 preempt

 standby 2 ip 192.168.0.7 //设置HSRP2,Liunx系统PC允当网关,并配置优先级与抢占

 standby 2 priority 110

 standby 2 preempt

!

interface Serial2/0

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial2/1

 ip address 15.0.0.5 255.255.255.0

 serial restart-delay 0

!

router rip

 version 2

 network 15.0.0.0

 network 192.168.0.0

!

ip classless

no ip http server

no ip http secure-server

!

!

line con 0

 exec-timeout 0 0

 password cisco

 logging synchronous

 login   

 stopbits 1

line aux 0

 stopbits 1

line vty 5 15

!

!

 

现在在R2上看一下,发现组1R2是主路由而R3是主路由,说明配置已经成功

R2#sh standby bri  

                     P indicates configured to preempt.

                     |

Interface   Grp Prio P State    Active addr     Standby addr    Group addr    

Fa0/0       1   110  P Active   local           192.168.0.5     192.168.0.6   

Fa0/0       2   100    Standby  192.168.0.5     local           192.168.0.7

 

 

 

R3#sh standby bri

                     P indicates configured to preempt.

                     |

Interface   Grp Prio P State    Active addr     Standby addr    Group addr    

Fa0/0       1   100  P Standby  192.168.0.1     local           192.168.0.6   

Fa0/0       2   110  P Active   local           192.168.0.1     192.168.0.7

 

然后分别在PC1PC2上用扩展Ping测试一下数据包发送的路径,都能正常按照个自的主路由发送出去

PC1#ping ip

Target IP address: 1.1.1.1

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface: 192.168.0.2

Type of service [0]:

Set DF bit in IP header? [no]:

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]: re

Number of hops [ 9 ]:

Loose, Strict, Record, Timestamp, Verbose[RV]:

Sweep range of sizes [n]:

Type escape sequence to abort.

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

Reply to request 2 (856 ms).  Received packet has options

 Total option bytes= 40, padded length=40

 Record route:

   (192.168.0.2)

   (12.0.0.2)

   (1.1.1.1)

   (12.0.0.1)

   (192.168.0.1)

   (192.168.0.2) <*>

End of list

 

 

 

PC2#ping ip

Target IP address: 1.1.1.1

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface: 192.168.0.3

Type of service [0]:

Set DF bit in IP header? [no]:

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]: re

Number of hops [ 9 ]:

Loose, Strict, Record, Timestamp, Verbose[RV]:

Sweep range of sizes [n]:

Type escape sequence to abort.

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

Reply to request 0 (1016 ms).  Received packet has options

 Total option bytes= 40, padded length=40

 Record route:

   (192.168.0.3)

   (15.0.0.5)

   (1.1.1.1)

   (15.0.0.1)

   (192.168.0.5)

   (192.168.0.3) <*>

End of list

阅读(1333) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~