172.16.10.0/24 該網絡主機能夠經過×××訪問總公司開發數據服務器web
思路與配置:服務器
1.配置R0:網絡
0端口ip:172.16.20.254 255.255.255.0ide
1端口ip:172.16.10.254 255.255.255.0加密
2端口ip:172.16.30.1 255.255.255.0spa
配置默認路由3d
ip route 0.0.0.0 0.0.0.0 172.16 30.254orm
2.配置R1:server
0端口ip:172.16.30.254 255.255.255.0接口
1端口ip:100.0.0.1 255.255.255.252
配置默認路由
ip route 0.0.0.0 0.0.0.0 100.0.0.2
配置靜態路由
ip route 172.16.10.0 255.255.255. 0 172.16.30.1
ip route 172.16.20.0 255.255.255. 0 172.16.30.1
3.配置ISP:
0端口ip:100.0.0.2 255.255.255.252
1端口ip:200.0.0.2 255.255.255.252
4.配置R2:
0端口ip:200.0.0.1 255.255.255.252
1端口ip:10.10.33.254 255.255.255.0
配置默認路由
ip route 0.0.0.0 0.0.0.0 200.0.0.2
5.此時pc機只能ping到R1 而不能到達外網
在R1上配置NAT 使pc0能夠訪問外網
access-list 1 permit 172.16.20.0 0.0.0.255
ip nat inside sourse list 1 interface f0/1 overload
interface f0/1
ip nat outside
interface f0/0
ip nat inside
此時pc0能夠訪問外網 即 ping同外網
6.在R1和R2上配置××× 是研發小組能夠ping 通研發服務器
配置R1
配置ISKMP策略
cryption isakmp policy 1
encryption 3des
hash sha
authentication pre-share
group 2
cryption isakmp key tedu address 200.0.0.1
配置ACL
access-list 100 permit ip 176.16.10.0 0.0.0.255 10.10.33.0 0.0.0.255
配置IPsec策略(轉換集)
crypto ipsec transform-set yf-set esp-des esp-sha-hmac
配置加密映像集
crypto map yf-map 1 ipsec-isakmp
set peer 200.0.0.1
set transform-set yf-set
match address 100
將映射集應用在接口
interface f0/1
crypto map yf-map
配置R2
配置ISKMP策略
cryption isakmp policy 1
encryption 3des
hash sha
authentication pre-share
group 2
crypto isakmp key tedu address 100.0.0.1
配置ACL
access-list 100 permit ip 10.10.33.0 0.0.0.255 172.16.10.0 0.0.0.255
配置IPsec策略(轉換集)
crypto ipsec transform-set yf-set esp-des esp-sha-hmac
配置加密映像集
crypto map yf-map 1 ipsec-isakmp
set peer 100.0.0.1
set transform-set yf-set
match address 100
將映射集應用在接口
interface f0/0
crypto map yf-map
此時pc1研發小組 能夠 ping 通 server0研發服務器
此時pc1研發小組 能夠 訪問 server0研發服務器的web
1.流量走PAT 不走×××
配置R1
accecc-list 1 permit 172.16.10.0 0.0.0.255
ip nat inside source list 1 interface f0/1 overload
interface f0/1
ip nat outside
interface f0/0
ip nat inside
2.流量能夠走PAT, 也能夠走×××
配置R1
access-list 110 deny ip 172.16.10.0 0.0.0.255 10.10.33.0 0.0.0.255
access-list 110 permit ip any any
ip nat inside source list 110 interface f0/1 overload
interface f0/1
ip nat outside
interface f0/0
ip nat inside