Mô hình lab:
R1#show running-config
Building configuration...
Current configuration : 778 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
standby 1 ip 12.1.1.100
standby 1 priority 115
standby 1 preempt
standby 1 track FastEthernet1/0
!
interface FastEthernet1/0
ip address 10.1.1.1 255.255.255.252
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 10.1.1.2
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 10.1.1.2
R1#show stand
R1#show standby
FastEthernet0/0 - Group 1
State is Active
5 state changes, last state change 00:01:48
Virtual IP address is 12.1.1.100
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01 (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 2.956 secs
Preemption enabled
Active router is local
Standby router is 12.1.1.2, priority 110 (expires in 7.880 sec)
Priority 115 (configured 115)
Track interface FastEthernet1/0 state Up decrement 10
IP redundancy name is "hsrp-Fa0/0-1" (default)
R1#
R2#show running-config
Building configuration...
Current configuration : 788 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
standby 1 ip 12.1.1.100
standby 1 priority 120
standby 1 preempt
standby 1 track FastEthernet1/0
!
interface FastEthernet1/0
ip address 11.1.1.1 255.255.255.252
shutdown
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 11.1.1.2
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R2#show stand
R2#show standby
FastEthernet0/0 - Group 1
State is Standby
4 state changes, last state change 00:02:38
Virtual IP address is 12.1.1.100
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01 (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.564 secs
Preemption enabled
Active router is 12.1.1.1, priority 115 (expires in 9.656 sec)
Standby router is local
Priority 110 (configured 120)
Track interface FastEthernet1/0 state Down decrement 10
IP redundancy name is "hsrp-Fa0/0-1" (default)
R2#R2#show running-config
R3#show run
R3#show running-config
Building configuration...
Current configuration : 1058 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 10.1.1.2 255.255.255.252
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 11.1.1.2 255.255.255.252
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.1.101 255.255.255.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip route 12.1.1.0 255.255.255.0 10.1.1.1
ip route 12.1.1.0 255.255.255.0 11.1.1.1
!
!
ip nat inside source list 1 interface FastEthernet2/0 overload
!
access-list 1 permit any
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.1.1 to network 0.0.0.0
10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet0/0
11.0.0.0/30 is subnetted, 1 subnets
C 11.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
S 12.1.1.0 [1/0] via 11.1.1.1
[1/0] via 10.1.1.1
C 192.168.1.0/24 is directly connected, FastEthernet2/0
S* 0.0.0.0/0 [1/0] via 192.168.1.1
R3#
R3#show ip nat tran
R3#show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 192.168.1.101:1425 12.1.1.10:1425 123.30.53.19:80 123.30.53.19:80
tcp 192.168.1.101:1429 12.1.1.10:1429 74.125.71.101:80 74.125.71.101:80
tcp 192.168.1.101:1435 12.1.1.10:1435 222.255.27.197:80 222.255.27.197:80
tcp 192.168.1.101:1436 12.1.1.10:1436 222.255.27.197:80 222.255.27.197:80
udp 192.168.1.101:137 192.168.88.1:137 192.168.88.255:137 192.168.88.255:137
R3#
TEST
R1#show running-config
Building configuration...
Current configuration : 778 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
standby 1 ip 12.1.1.100
standby 1 priority 115
standby 1 preempt
standby 1 track FastEthernet1/0
!
interface FastEthernet1/0
ip address 10.1.1.1 255.255.255.252
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 10.1.1.2
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 10.1.1.2
R1#show stand
R1#show standby
FastEthernet0/0 - Group 1
State is Active
5 state changes, last state change 00:01:48
Virtual IP address is 12.1.1.100
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01 (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 2.956 secs
Preemption enabled
Active router is local
Standby router is 12.1.1.2, priority 110 (expires in 7.880 sec)
Priority 115 (configured 115)
Track interface FastEthernet1/0 state Up decrement 10
IP redundancy name is "hsrp-Fa0/0-1" (default)
R1#
R2#show running-config
Building configuration...
Current configuration : 788 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
standby 1 ip 12.1.1.100
standby 1 priority 120
standby 1 preempt
standby 1 track FastEthernet1/0
!
interface FastEthernet1/0
ip address 11.1.1.1 255.255.255.252
shutdown
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 11.1.1.2
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R2#show stand
R2#show standby
FastEthernet0/0 - Group 1
State is Standby
4 state changes, last state change 00:02:38
Virtual IP address is 12.1.1.100
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01 (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.564 secs
Preemption enabled
Active router is 12.1.1.1, priority 115 (expires in 9.656 sec)
Standby router is local
Priority 110 (configured 120)
Track interface FastEthernet1/0 state Down decrement 10
IP redundancy name is "hsrp-Fa0/0-1" (default)
R2#R2#show running-config
R3#show run
R3#show running-config
Building configuration...
Current configuration : 1058 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 10.1.1.2 255.255.255.252
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 11.1.1.2 255.255.255.252
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.1.101 255.255.255.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip route 12.1.1.0 255.255.255.0 10.1.1.1
ip route 12.1.1.0 255.255.255.0 11.1.1.1
!
!
ip nat inside source list 1 interface FastEthernet2/0 overload
!
access-list 1 permit any
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.1.1 to network 0.0.0.0
10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet0/0
11.0.0.0/30 is subnetted, 1 subnets
C 11.1.1.0 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
S 12.1.1.0 [1/0] via 11.1.1.1
[1/0] via 10.1.1.1
C 192.168.1.0/24 is directly connected, FastEthernet2/0
S* 0.0.0.0/0 [1/0] via 192.168.1.1
R3#
R3#show ip nat tran
R3#show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 192.168.1.101:1425 12.1.1.10:1425 123.30.53.19:80 123.30.53.19:80
tcp 192.168.1.101:1429 12.1.1.10:1429 74.125.71.101:80 74.125.71.101:80
tcp 192.168.1.101:1435 12.1.1.10:1435 222.255.27.197:80 222.255.27.197:80
tcp 192.168.1.101:1436 12.1.1.10:1436 222.255.27.197:80 222.255.27.197:80
udp 192.168.1.101:137 192.168.88.1:137 192.168.88.255:137 192.168.88.255:137
R3#
TEST
Không có nhận xét nào:
Đăng nhận xét