拓扑图:
测试:
RSR_1#sh ip na tr
Pro Inside global Inside local Outside local Outside global
tcp 192.168.1.10:21 10.1.5.10:21 --- ---
tcp 192.168.1.10:80 10.1.5.10:80 --- ---
RSR_1#
VPCS 1 >1
VPCS 1 >dh
DORA, IP 10.1.1.2/24 GW 10.1.1.1
VPCS 1 >ping 192.168.1.100
192.168.1.100 icmp_seq=1 time=105.000 ms
192.168.1.100 icmp_seq=2 time=21.000 ms
192.168.1.100 icmp_seq=3 time=33.000 ms
192.168.1.100 icmp_seq=4 time=20.000 ms
192.168.1.100 icmp_seq=5 time=64.000 ms
VPCS 1 >2
VPCS 2 >dh
DORA, IP 10.1.2.2/24 GW 10.1.2.1
VPCS 2 >2
VPCS 2 >ping 192.168.1.100
192.168.1.100 icmp_seq=1 time=56.000 ms
192.168.1.100 icmp_seq=2 time=23.000 ms
192.168.1.100 icmp_seq=3 time=65.000 ms
192.168.1.100 icmp_seq=4 time=35.000 ms
192.168.1.100 icmp_seq=5 time=47.000 ms
VPCS 2 >3
VPCS 3 >dh
DORA, IP 10.1.3.2/24 GW 10.1.3.1
VPCS 3 >ping 192.168.1.100
192.168.1.100 icmp_seq=1 time=56.000 ms
192.168.1.100 icmp_seq=2 time=24.000 ms
192.168.1.100 icmp_seq=3 time=53.000 ms
192.168.1.100 icmp_seq=4 time=8.000 ms
192.168.1.100 icmp_seq=5 time=30.000 ms
VPCS 3 >4
VPCS 4 >dh
DORA, IP 10.1.4.2/24 GW 10.1.4.1
VPCS 4 >ping 192.168.1.100
192.168.1.100 icmp_seq=1 time=26.000 ms
192.168.1.100 icmp_seq=2 time=35.000 ms
192.168.1.100 icmp_seq=3 time=39.000 ms
192.168.1.100 icmp_seq=4 time=26.000 ms
192.168.1.100 icmp_seq=5 time=53.000 ms
VPCS 4 >5
VPCS 5 >dh
DORA, IP 10.1.6.2/24 GW 10.1.6.1
VPCS 5 >ping 192.168.1.100
192.168.1.100 icmp_seq=1 timeout
192.168.1.100 icmp_seq=2 timeout
192.168.1.100 icmp_seq=3 timeout
192.168.1.100 icmp_seq=4 timeout
192.168.1.100 icmp_seq=5 timeout
VPCS 5 >
VPCS 5 >show
NAME IP/CIDR GATEWAY MAC LPORT RPORT
PC1 10.1.1.2/24 10.1.1.1 00:50:79:66:68:00 20000 30000
PC2 10.1.2.2/24 10.1.2.1 00:50:79:66:68:01 20001 30001
PC3 10.1.3.2/24 10.1.3.1 00:50:79:66:68:02 20002 30002
PC4 10.1.4.2/24 10.1.4.1 00:50:79:66:68:03 20003 30003
PC5 10.1.6.2/24 10.1.6.1 00:50:79:66:68:04 20004 30004
PC6 0.0.0.0/0 0.0.0.0 00:50:79:66:68:05 20005 30005
PC7 0.0.0.0/0 0.0.0.0 00:50:79:66:68:06 20006 30006
PC8 0.0.0.0/0 0.0.0.0 00:50:79:66:68:07 20007 30007
PC9 0.0.0.0/0 0.0.0.0 00:50:79:66:68:08 20008 30008
VPCS 5 >
SR_1#sh ip na tr
Pro Inside global Inside local Outside local Outside global
icmp 192.168.1.2:44132 10.1.1.2:44132 192.168.1.100:44132 192.168.1.100:44132
icmp 192.168.1.2:44388 10.1.1.2:44388 192.168.1.100:44388 192.168.1.100:44388
icmp 192.168.1.2:44644 10.1.1.2:44644 192.168.1.100:44644 192.168.1.100:44644
icmp 192.168.1.2:44900 10.1.1.2:44900 192.168.1.100:44900 192.168.1.100:44900
icmp 192.168.1.2:45156 10.1.1.2:45156 192.168.1.100:45156 192.168.1.100:45156
icmp 192.168.1.2:40292 10.1.2.2:40292 192.168.1.100:40292 192.168.1.100:40292
icmp 192.168.1.2:40548 10.1.2.2:40548 192.168.1.100:40548 192.168.1.100:40548
icmp 192.168.1.2:40804 10.1.2.2:40804 192.168.1.100:40804 192.168.1.100:40804
icmp 192.168.1.2:41060 10.1.2.2:41060 192.168.1.100:41060 192.168.1.100:41060
icmp 192.168.1.2:41316 10.1.2.2:41316 192.168.1.100:41316 192.168.1.100:41316
RSR_1#wr
RSR_3#sh ip na tr
Pro Inside global Inside local Outside local Outside global
icmp 10.0.0.5:52589 10.1.6.2:52589 192.168.1.100:52589 192.168.1.100:52589
icmp 10.0.0.5:52845 10.1.6.2:52845 192.168.1.100:52845 192.168.1.100:52845
icmp 10.0.0.5:53101 10.1.6.2:53101 192.168.1.100:53101 192.168.1.100:53101
icmp 10.0.0.5:53357 10.1.6.2:53357 192.168.1.100:53357 192.168.1.100:53357
icmp 10.0.0.5:53613 10.1.6.2:53613 192.168.1.100:53613 192.168.1.100:53613
RSR_3#
RSR_4#sh ip na tr
Pro Inside global Inside local Outside local Outside global
icmp 192.168.1.4:19557 10.1.3.2:19557 192.168.1.100:19557 192.168.1.100:19557
icmp 192.168.1.4:19813 10.1.3.2:19813 192.168.1.100:19813 192.168.1.100:19813
icmp 192.168.1.4:20069 10.1.3.2:20069 192.168.1.100:20069 192.168.1.100:20069
icmp 192.168.1.4:20325 10.1.3.2:20325 192.168.1.100:20325 192.168.1.100:20325
icmp 192.168.1.4:20581 10.1.3.2:20581 192.168.1.100:20581 192.168.1.100:20581
icmp 192.168.1.4:22629 10.1.4.2:22629 192.168.1.100:22629 192.168.1.100:22629
icmp 192.168.1.4:22885 10.1.4.2:22885 192.168.1.100:22885 192.168.1.100:22885
icmp 192.168.1.4:23141 10.1.4.2:23141 192.168.1.100:23141 192.168.1.100:23141
RSR_4#wr
RSR_2#sh frame-relay route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial0/1 16 Serial0/3 36 active
Serial0/1 17 Serial0/2 26 active
Serial0/2 26 Serial0/1 16 active
Serial0/2 27 Serial0/3 37 active
Serial0/3 36 Serial0/1 17 active
Serial0/3 37 Serial0/2 27 active
RSR_2#
各设备配置文件:
RSR_4#ter len 0
RSR_4#sh run
Building configuration...
Current configuration : 1855 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RSR_4
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
ip ips po max-events 100
no ftp-server write-enable
!
!
!
!
!
interface Serial0/0
ip address 10.0.0.10 255.255.255.248
encapsulation frame-relay IETF
ip ospf network broadcast
serial restart-delay 0
frame-relay map ip 10.0.0.9 36 broadcast
frame-relay map ip 10.0.0.11 37 broadcast
no frame-relay inverse-arp
frame-relay lmi-type ansi
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 192.168.1.4 255.255.255.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet2/0
no ip address
duplex auto
speed auto
!
interface FastEthernet2/0.30
encapsulation dot1Q 30
ip address 10.1.3.1 255.255.255.0
ip helper-address 10.0.0.2
ip nat inside
ip virtual-reassembly
!
interface FastEthernet2/0.40
encapsulation dot1Q 40
ip address 10.1.4.1 255.255.255.0
ip helper-address 10.0.0.2
ip nat inside
ip virtual-reassembly
!
router ospf 1
log-adjacency-changes
network 10.0.0.8 0.0.0.7 area 0
network 10.1.3.0 0.0.0.255 area 0
network 10.1.4.0 0.0.0.255 area 0
default-information originate always
!
ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0
!
ip nat inside source list 1 interface FastEthernet1/0 overload
!
!
access-list 1 permit 10.1.3.0 0.0.0.255
access-list 1 permit 10.1.4.0 0.0.0.255
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
end
RSR_4#
RS_1#ter len 0
RS_1#sh run
Building configuration...
Current configuration : 2336 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RS_1
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
ip dhcp excluded-address 10.1.1.1
ip dhcp excluded-address 10.1.2.1
ip dhcp excluded-address 10.1.6.1
ip dhcp excluded-address 10.1.4.1
ip dhcp excluded-address 10.1.3.1
!
ip dhcp pool vlan10
network 10.1.1.0 255.255.255.0
default-router 10.1.1.1
!
ip dhcp pool vlan20
network 10.1.2.0 255.255.255.0
default-router 10.1.2.1
!
ip dhcp pool vlan60
network 10.1.6.0 255.255.255.0
default-router 10.1.6.1
!
ip dhcp pool vlan30
network 10.1.3.0 255.255.255.0
default-router 10.1.3.1
!
ip dhcp pool vlan40
network 10.1.4.0 255.255.255.0
default-router 10.1.4.1
!
!
ip ips po max-events 100
no ftp-server write-enable
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no switchport
ip address 10.0.0.2 255.255.255.252
!
interface FastEthernet0/1
switchport access vlan 10
no ip address
!
interface FastEthernet0/2
switchport access vlan 20
no ip address
interface FastEthernet0/15
switchport access vlan 50
no ip address
!
interface Vlan1
no ip address
!
interface Vlan10
ip address 10.1.1.1 255.255.255.0
!
interface Vlan20
ip address 10.1.2.1 255.255.255.0
!
interface Vlan50
ip address 10.1.5.1 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 10.0.0.0 0.0.0.3 area 0
network 10.1.1.0 0.0.0.255 area 0
network 10.1.2.0 0.0.0.255 area 0
!
ip http server
no ip http secure-server
ip classless
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
RS_1#
RS_2#ter len 0
RS_2#sh run
Building configuration...
Current configuration : 1411 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RS_2
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
ip ips po max-events 100
no ftp-server write-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
!
interface FastEthernet0/1
switchport access vlan 30
no ip address
!
interface FastEthernet0/2
switchport access vlan 40
no ip address
!
ip http server
no ip http secure-server
ip classless
line con 0
line aux 0
line vty 0 4
!
!
end
RS_2#
RS_3#ter len 0
RS_3#sh run
Building configuration...
Current configuration : 1597 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RS_3
!
boot-start-marker
boot-end-marker
!
!
interface FastEthernet0/0
no switchport
ip address 10.0.0.6 255.255.255.252
!
interface FastEthernet0/1
switchport access vlan 60
no ip address
!
interface Vlan60
ip address 10.1.6.1 255.255.255.0
ip helper-address 10.0.0.2
!
router ospf 1
log-adjacency-changes
network 10.0.0.4 0.0.0.3 area 0
network 10.1.6.0 0.0.0.255 area 0
!
ip http server
no ip http secure-server
ip classless
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
RS_3#
RS_4#ter len 0
RS_4#sh run
Building configuration...
Current configuration : 1314 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RS_4
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
ip ips po max-events 100
no ftp-server write-enable
interface FastEthernet0/0
no ip address
!
interface FastEthernet0/1
no ip address
!
interface FastEthernet0/2
no ip address
!
line con 0
line aux 0
line vty 0 4
!
!
end
RS_4#
RSR_1#sh run
Building configuration...
Current configuration : 1723 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RSR_1
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
ip ips po max-events 100
no ftp-server write-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
ip address 10.0.0.9 255.255.255.248
encapsulation frame-relay IETF
ip ospf network broadcast
ip ospf priority 0
serial restart-delay 0
frame-relay map ip 10.0.0.10 16 broadcast
frame-relay map ip 10.0.0.11 17 broadcast
no frame-relay inverse-arp
frame-relay lmi-type ansi
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 10.0.0.1 255.255.255.252
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 192.168.1.2 255.255.255.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 10.0.0.0 0.0.0.3 area 0
network 10.0.0.8 0.0.0.7 area 0
default-information originate always
!
ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0
!
ip nat inside source list 1 interface FastEthernet2/0 overload
ip nat inside source static tcp 10.1.5.10 21 192.168.1.10 21 extendable
ip nat inside source static tcp 10.1.5.10 80 192.168.1.10 80 extendable
!
!
access-list 1 permit 10.1.1.0 0.0.0.255
access-list 1 permit 10.1.2.0 0.0.0.255
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
RSR_1#
RSR_2#sh run
Building configuration...
Current configuration : 1366 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RSR_2
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
ip ips po max-events 100
frame-relay switching
no ftp-server write-enable
!
interface Serial0/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/1
no ip address
encapsulation frame-relay IETF
serial restart-delay 0
no frame-relay inverse-arp
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 16 interface Serial0/3 36
frame-relay route 17 interface Serial0/2 26
!
interface Serial0/2
no ip address
encapsulation frame-relay IETF
serial restart-delay 0
no frame-relay inverse-arp
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 26 interface Serial0/1 16
frame-relay route 27 interface Serial0/3 37
!
interface Serial0/3
no ip address
encapsulation frame-relay IETF
serial restart-delay 0
no frame-relay inverse-arp
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 36 interface Serial0/1 17
frame-relay route 37 interface Serial0/2 27
end
RSR_2#
RSR_3#ter len 0
RSR_3#sh run
Building configuration...
Current configuration : 1519 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RSR_3
!
boot-start-marker
boot-end-marker
!
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
!
ip cef
!
!
ip ips po max-events 100
no ftp-server write-enable
interface Serial0/0
ip address 10.0.0.11 255.255.255.248
encapsulation frame-relay IETF
ip ospf network broadcast
serial restart-delay 0
frame-relay map ip 10.0.0.9 26 broadcast
frame-relay map ip 10.0.0.10 27 broadcast
no frame-relay inverse-arp
frame-relay lmi-type ansi
!
interface FastEthernet1/0
ip address 10.0.0.5 255.255.255.252
ip nat inside
interface FastEthernet2/0
ip address 192.168.1.3 255.255.255.0
ip nat outside
router ospf 1
log-adjacency-changes
network 10.0.0.4 0.0.0.3 area 0
network 10.0.0.8 0.0.0.7 area 0
default-information originate always
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0
ip nat inside source list 1 interface FastEthernet1/0 overload
access-list 1 permit 10.1.6.0 0.0.0.255
RSR_3#
本文转自810105851 51CTO博客,原文链接:http://blog.51cto.com/4708948/1133287
,如需转载请自行联系原作者