HSRP配置

 sautostart = False

[localhost]
    port = 7200
    udp = 10000


[[router r1]]
        image = ..\images\unzip-c3640-js-mz.124-10.bin
        model = 3640
        console = 3001
        ram = 128
        confreg = 0x2142
        exec_area = 64
        mmap = False
        slot0 = NM-1FE-TX
        slot1 = NM-1FE-TX
        f1/0 = r3 f1/0
        f0/0 = sw1 f0/0
        idlepc = 0x604ec6b0

[[router r2]]
        image = ..\images\unzip-c3640-js-mz.124-10.bin
        model = 3640
        console = 3002
        ram = 128
        confreg = 0x2142
        exec_area = 64
        mmap = False
        slot0 = NM-1FE-TX
        slot1 = NM-1FE-TX
        f1/0 = r3 f0/0
        f0/0 = sw1 f0/1
        idlepc = 0x604ec6b0


[[router r3]]
        image = ..\images\unzip-c3640-js-mz.124-10.bin
        model = 3640
        console = 3003
        ram = 128
        confreg = 0x2142
        exec_area = 64
        mmap = False
        slot0 = NM-1FE-TX
        slot1 = NM-1FE-TX
        idlepc = 0x604ec6b0

[[router sw1]]
        image = ..\images\unzip-c3640-js-mz.124-10.bin
        model = 3640
        console = 3004
        ram = 128
        confreg = 0x2142
        exec_area = 64
        mmap = False
        slot0 = NM-16ESW
        f0/2 = pc1 f0/0
        f0/3 = pc2 f0/0
        idlepc = 0x604ec6b0

[[router pc1]]
        image = ..\images\unzip-c3640-js-mz.124-10.bin
        model = 3640
        console = 3005
        ram = 128
        confreg = 0x2142
        exec_area = 64
        mmap = False
        slot0 = NM-1FE-TX
        slot1 = NM-1FE-TX
        idlepc = 0x604ec6b0


[[router pc2]]
        image = ..\images\unzip-c3640-js-mz.124-10.bin
        model = 3640
        console = 3006
        ram = 128
        confreg = 0x2142
        exec_area = 64
        mmap = False
        slot0 = NM-1FE-TX
        idlepc = 0x604ec6b0

 

 

配置IP
r1(config)#int f1/0
r1(config-if)#ip address 38.25.77.1 255.255.255.0
r1(config-if)#no shutdown
r1(config-if)#int f0/0
r1(config-if)#ip address 172.16.1.1 255.255.255.0
r1(config-if)#no shutdown
配置动态路由
r1(config)#router rip
r1(config-router)#network 38.25.77.0
r1(config-router)#network 172.16.1.0
配置HSRP
r1(config)#interface f0/0
r1(config-if)#standby 1 ip 172.16.1.11
r1(config-if)#standby 1 priority 120
r1(config-if)#standby 1 preempt
r1(config-if)#standby 1 authentication md5 key-string 123
r1(config)#interface f0/0
r1(config-if)#standby 2 ip 172.16.1.12
r1(config-if)#standby 2 preempt
r1(config-if)#standby 2 authentication md5 key-string 123

配置IP
r2(config)#int f1/0
r2(config-if)#ip address 38.25.78.1 255.255.255.0
r2(config-if)#no shutdown
r2(config-if)#int f0/0
r2(config-if)#ip address 172.16.1.2 255.255.255.0
r2(config-if)#no shutdown
配置动态路由
r2(config)#router rip
r2(config-router)#network 38.25.78.0
r2(config-router)#network 172.16.1.0
配置HSRP
r2(config)#interface f0/0
r2(config-if)#standby 1 ip 172.16.1.11
r2(config-if)#standby 1 preempt
r2(config-if)#standby 1 authentication md5 key-string 123
r2(config)#interface f0/0
r2(config-if)#standby 2 ip 172.16.1.12
r2(config-if)#standby 2 priority 121
r2(config-if)#standby 2 preempt
r2(config-if)#standby 2 authentication md5 key-string 123

配置IP
r3(config)#int f1/0
r3(config-if)#ip add 38.25.77.2 255.255.255.0
r3(config-if)#no shutdown
r3(config-if)#int f0/0
r3(config-if)#ip add 38.25.78.2 255.255.255.0
r3(config-if)#no shutdown
虚似IP
r3(config)#int loopback 0
r3(config-if)#ip add 10.0.0.1 255.255.255.0
r3(config-if)#no shutdown
配置动态路由
r3(config)#router rip
r3(config-router)#network 38.25.77.0
r3(config-router)#network 38.25.78.0
r3(config-router)#network 10.0.0.1

SW3  空


配置IP
pc1(config)#no ip routing
pc1(config)#ip default-gateway 172.16.1.1
pc1(config)#int f0/0
pc1(config-if)#ip add 172.16.1.3 255.255.255.0
pc1(config-if)#no shutdown
配置IP
pc2(config)#no ip routing
pc2(config)#ip default-gateway 172.16.1.1
pc2(config)#int f0/0
pc2(config-if)#ip add 172.16.1.4 255.255.255.0
pc2(config-if)#no shutdown

你可能感兴趣的:(it)