1. 组网需求
本例将IPsec和ADSL相结合,是目前实际中广泛应用的典型案例。(网络维护外包)
l Router B通过ADSL卡直接连接公网的DSLAM接入端,作为PPPoE的client端。RouterB从ISP动态获得的IP地址为私网地址,故Router A、Router B都需要配置NAT穿越。
l 总公司局域网通过Router A接入到ATM网络。
l 为了保证信息安全采用IPsec/IKE方式创建安全隧道。
2. 组网图
图2-5 ADSL与IPsec/IKE相结合的组网应用
3. 配置步骤
(1) 配置Router A
# 配置本端安全网关设备名称。
system-view
[RouterA] ike local-name routera
# 配置ACL。
[RouterA] acl number 3101
[RouterA-acl-adv-3101] rule 0 permit ip source 172.16.0.0 0.0.0.255 destination 192.168.0.0 0.0.0.255
[RouterA-acl-adv-3101] quit
# 配置IKE安全提议。(电脑桌面维护)
[RouterA] ike proposal 1
[RouterA-ike-proposal-1] authentication-algorithm sha
[RouterA-ike-proposal-1] authentication-method pre-share
[RouterA-ike-proposal-1] encryption-algorithm 3des-cbc
[RouterA-ike-proposal-1] dh group2
# 配置IKE对等体peer。
[RouterA] ike peer peer
# 配置IKE对等体peer。
[RouterA] ike peer peer
[RouterA-ike-peer-peer] exchange-mode aggressive
[RouterA-ike-peer-peer] pre-shared-key abc
[RouterA-ike-peer-peer] id-type name
[RouterA-ike-peer-peer] remote-name routerb
[RouterA-ike-peer-peer] nat traversal
[RouterA-ike-peer-peer] quit
# 创建IPsec安全提议prop。
[RouterA] ipsec proposal prop
[RouterA-ipsec-proposal-prop] encapsulation-mode tunnel
[RouterA-ipsec-proposal-prop] transform esp
[RouterA-ipsec-proposal-prop] esp encryption-algorithm 3des
[RouterA-ipsec-proposal-prop] esp authentication-algorithm sha1
[RouterA-ipsec-proposal-prop] quit
# 创建安全策略policy并指定通过IKE协商建立SA。
[RouterA] ipsec policy policy 10 isakmp
# 配置安全策略policy引用IKE对等体peer。
[RouterA-ipsec-policy-isakmp-policy-10] ike-peer peer
# 配置安全策略policy引用访问控制列表3101。
[RouterA-ipsec-policy-isakmp-policy-10] security acl 3101
# 配置安全策略policy引用IPsec安全提议prop。
[RouterA-ipsec-policy-isakmp-policy-10] proposal prop
[RouterA-ipsec-policy-isakmp-policy-10] quit
# 配置IP地址。
[RouterA] interface serial 2/0/1
[RouterA-Serial2/0/1] ip address 100.1.1.1 255.255.255.0
[RouterA-Serial2/0/1] ipsec policy policy
[RouterA-Serial2/0/1] quit
# 配置以太网口。
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] ip address 172.16.0.1 255.255.255.0
[RouterA-GigabitEthernet1/0/1] quit
# 配置到分公司局域网的静态路由。
[RouterA] ip route-static 192.168.0.0 255.255.255.0 serial 2/0/1
(2) 配置Router B
# 配置本端安全网关的名称。
system-view
[RouterB] ike local-name routerb
# 配置ACL。
[RouterB] acl number 3101
[RouterB-acl-adv-3101] rule 0 permit ip source 192.168.0.0 0.0.0.255 destination 172.16.0.0 0.0.0.255
[RouterB-acl-adv-3101] quit
# 配置IKE安全提议。(it外包)
[RouterB] ike proposal 1
[RouterB-ike-proposal-1] authentication-algorithm sha
[RouterB-ike-proposal-1] authentication-method pre-share
[RouterB-ike-proposal-1] encryption-algorithm 3des-cbc
[RouterB-ike-proposal-1] dh group2
# 配置IKE对等体peer。
[RouterB] ike peer peer
[RouterB-ike-peer-peer] exchange-mode aggressive
[RouterB-ike-peer-peer] pre-shared-key abc
[RouterB-ike-peer-peer] id-type name
[RouterB-ike-peer-peer] remote-name routera
[RouterB-ike-peer-peer] remote-address 100.1.1.1
[RouterB-ike-peer-peer] nat traversal
[RouterB-ike-peer-peer] quit
# 创建IPsec安全提议prop。
[RouterB] ipsec proposal prop
[RouterB-ipsec-proposal-prop] encapsulation-mode tunnel
[RouterB-ipsec-proposal-prop] transform esp
[RouterB-ipsec-proposal-prop] esp encryption-algorithm 3des
[RouterB-ipsec-proposal-prop] esp authentication-algorithm sha1
[RouterB-ipsec-proposal-prop] quit
# 创建安全策略policy并指定通过IKE协商建立SA。
[RouterB] ipsec policy policy 10 isakmp
# 配置安全策略policy引用IKE对等体peer。
[RouterB-ipsec-policy-isakmp-policy-10] ike-peer peer
# 配置安全策略policy引用访问控制列表3101。
[RouterB-ipsec-policy-isakmp-policy-10] security acl 3101
# 配置安全策略policy引用IPsec安全提议prop。
[RouterB-ipsec-policy-isakmp-policy-10] proposal prop
[RouterB-ipsec-policy-isakmp-policy-10] quit
# 配置拨号访问控制列表。
[RouterB] dialer-rule 1 ip permit
# 创建Dialer0,使用由ISP分配的用户名和密码进行拨号和PPP认证的相关配置,并配置MTU。
[RouterB] interface dialer 0
[RouterB-Dialer0] link-protocol ppp
[RouterB-Dialer0] ppp pap local-user test password simple 123456
[RouterB-Dialer0] ip address ppp-negotiate
[RouterB-Dialer0] dialer user 1
[RouterB-Dialer0] dialer-group 1
[RouterB-Dialer0] dialer bundle 1
[RouterB-Dialer0] ipsec policy policy
[RouterB-Dialer0] mtu 1492
[RouterB-Dialer0] quit
# 配置到总公司局域网的静态路由。
[RouterB] ip route-static 172.16.0.0 255.255.255.0 dialer 0
# 配置以太网口。
[RouterB] interface gigabitethernet 1/0/1
[RouterB-GigabitEthernet1/0/1] tcp mss 1450
[RouterB-GigabitEthernet1/0/1] ip address 192.168.0.1 255.255.255.0
[RouterB-GigabitEthernet1/0/1] quit
# 对ADSL卡的ATM口进行配置。
[RouterB] interface atm 1/0/1
[RouterB-Atm1/01/] pvc 0/100
[RouterB-atm-pvc-Atm1/0/1-0/100] map bridge virtual-ethernet 0
[RouterB-atm-pvc-Atm1/0/1-0/100] quit
# 配置VE口。
[RouterB] interface virtual-ethernet 0
[RouterB-Virtual-Ethernet0] pppoe-client dial-bundle-number 1
[RouterB-Virtual-Ethernet0] mac-address 0011-0022-0012
艾锑无限是中国领先IT外包服务商,专业为企业提供IT运维外包、电脑维护、网络维护、网络布线、办公设备维护、服务器维护、数据备份恢复、门禁监控、网站建设等多项IT服务外包,服务热线:400-650-7820 联系电话:010-62684652 咨询QQ1548853602 地址:北京市海淀区北京科技会展2号楼16D,用心服务每一天,为企业的发展提升更高的效率,创造更大的价值。
更多的IT外包信息尽在艾锑无限http://www.itbmw.com
相关文章