Does the Interface with a Dynamic IP Address Support IPSec?
When the local interface has a dynamic IP address and the peer interface has a fixed IP address, configure an IPSec policy template on the peer interface to implement IPSec.
The following uses the 3G interface as an example to implement IKE auto negotiation.
Dynamic IP address
ike peer peer_3g_1 v1
pre-shared-key cipher %@%@:A(|N&D21)L2L0Z2WlVE9.-u%@%@ //Set the pre-shared key to huawei.
remote-address 10.5.39.160 //Specify a fixed IP address for the peer end.
ipsec proposal ipsec //Use the default security parameters.
ipsec policy ipsec 1 isakmp //Configure an IPSec policy and import the policy on a 3G interface.
security acl 3000
interface Cellular0/0/0 ipsec policy ipsec //Configure the IPSEC policy on the 3G interface.
acl 3000 //Configure ACL rules. The IPSec policy protects packets that match ACL rules.
Fixed IP address
ipsec proposal ipsec
ike peer peer_3g_2 v1 //The peer end uses a dynamic IP address.
pre-shared-key cipher %@%@$[#m$/7qa7Vn`H6SF1jQdbCM%@%@ //Set the pre-shared key to huawei.
ipsec policy-template temp 1 //Configure an IPSec policy template.
ipsec policy ipsec 1 isakmp template temp //Configure an IPSec policy and bind the policy to the template.
interface GigabitEthernet 1/0/0 //This interface uses a fixed IP address.
ipsec policy ipsec
ip address 10.5.39.160 255.255.255.255
In V200R002C00 and earlier versions, run the pre-shared-key huawei command to set the pre-shared key to huawei.