综合实验
实验拓扑:
|
拓扑说明:
R1为××× server,R2为××× server的L2L ×××,R3为远程访问的××× client,R4为软件拨号的网关路由器,R5没有使用。R1的外网地址为100.100.100.1,loopback口为192.168.1.1, R2的外网地址为100.100.100.2,loopback口为192.168.2.1,R3的外网地址为100.100.100.3,loopback口为192.168.3.1,R1的外网地址为100.100.100.4,f0/0为172.16.1.254,PC的地址为172.16.1.1网关为172.16.1.254. |
实验配置:
R1配置: aaa new-model aaa authentication login AUTHEN local aaa authorization network AUTHOR local username new password 0 cisco crypto keyring NEWCONF ! crypto isakmp policy 10 ! crypto isakmp client configuration group ××× crypto isakmp profile NEWPRO crypto isakmp profile EZPRO ! ! crypto ipsec transform-set ×××SET esp-3des esp-md5-hmac ! crypto dynamic-map DMAP 10 ! ! crypto map SMAP 10 ipsec-isakmp crypto map SMAP 20 ipsec-isakmp dynamic DMAP ! interface FastEthernet0/0 crypto map SMAP ! interface FastEthernet0/1 ! ip local pool ×××POOL 10.1.1.1 10.1.1.255 ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 ! ip access-list extended ×××ACL ! access-list 100 permit ip 192.168.1.0 0.0.0.255 any |
R2配置 ! crypto isakmp policy 10 crypto isakmp profile NEWPRO ! crypto ipsec transform-set ×××SET esp-3des esp-md5-hmac ! crypto map SMAP 10 ipsec-isakmp ! interface FastEthernet0/0 crypto map SMAP ! ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 ip access-list extended ×××ACL |
R3 配置: crypto ipsec client ezvpn MY××× interface Loopback0 crypto ipsec client ezvpn MY××× inside interface FastEthernet0/0 crypto ipsec client ezvpn MY××× ! ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 |
R4配置 ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 |
实验验证:
PC机拨号后可以ping通××× server 的内网 C:\Documents and Settings\Administrator>ping Pinging 192.168.1.1 with 32 bytes of data: Reply from 192.168.1.1: bytes=32 time=149ms TTL=255 Reply from 192.168.1.1: bytes=32 time=29ms TTL=255 Reply from 192.168.1.1: bytes=32 time=27ms TTL=255 Reply from 192.168.1.1: bytes=32 time=31ms TTL=255 Ping statistics for 192.168.1.1: Approximate round trip times in milli-seconds: L2L ×××的验证,加密可以互通 L2L# L2L#ping 192.168.1.1 source lo0 repeat 10 Type escape sequence to abort. Sending 10, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: Packet sent with a source address of 192.168.2.1 !!!!!!!!!! Success rate is 100 percent (10/10), round-trip min/avg/max = 24/34/44 ms L2L#sho crypto engine connections active Crypto Engine Connections 硬件拨号 ×××client# ×××client#ping 192.168.1.1 source lo0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: Packet sent with a source address of 192.168.3.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 32/40/48 ms ×××client#sho crypto engine connections active Crypto Engine Connections ×××SERVER的验证 ×××SERVER1#sho crypto engine connections active Crypto Engine Connections ×××SERVER1#sho ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP Gateway of last resort is 0.0.0.0 to network 0.0.0.0 C S S C S* ×××SERVER1#ping 192.168.2.1 source lo0 repeat 10 Type escape sequence to abort. Sending 10, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: Packet sent with a source address of 192.168.1.1 !!!!!!!!!! Success rate is 100 percent (10/10), round-trip min/avg/max = 28/36/68 ms |
说明:只有当×××SERVER的remote ×××配置为网络扩展模式×××SERVER才可以访问客户端的网络。因为client模式情况下,×××SERVER只能学习到客户端的一个IP地址,而network-extended模式×××SERVER可以学习到客户端的内部网络地址。 |