Can the interface on the AR be configured with IPSec when it dynamically obtains an IP address

The interface can be configured with IPSec when it dynamically obtains an IP address. When the local interface is configured with a dynamic IP address and the remote interface is configured with a fixed IP address, you can configure an IPSec policy template on the remote end to implement IPSec.
The 3G interface is used as an example. IKE negotiation is used. The key configuration is as follows:
Interface with a dynamic IP address
#
ike peer peer_3g_1 v1
pre-shared-key cipher %^%#JvZxR2g8c;a9~FPN~n'$7`DEV&=G(=Et02P/%\*!%^%# //Set the preshared key to huawei.
remote-address 10.5.39.160 //Specify the fixed IP address for the remote end.
#
ipsec proposal ipsec //Use default security parameters.
#
ipsec policy ipsec 1 isakmp //Configure an IPSec policy.
security acl 3000
ike-peer peer_3g_1
proposal ipsec
#
interface Cellular0/0/0
ipsec policy ipsec //Apply the IPSec policy to the 3G interface. Other configurations of the 3G interface are not mentioned.
#
acl 3000 //Configure an ACL. IPSec protects the packets matching the ACL.
...
#

Interface with a fixed IP address
#
ipsec proposal ipsec
#
ike peer peer_3g_2 v1 //The remote interface is configured with a dynamic IP address, so there is no need to specify an IP address for the remote interface.
pre-shared-key cipher %^%#K{JG:rWVHPMnf;5\|,GW(Luq'qi8BT4nOj%5W5=)%^%# //Set the pre-shared key to huawei.
#
ipsec policy-template temp 1 //Configure an IPSec policy template.
ike-peer peer_3g_2
proposal ipsec
#
ipsec policy ipsec 1 isakmp template temp //Bind the IPSec policy to the IPSec policy template.
#
interface GigabitEthernet 1/0/0 //The interface uses a fixed IP address.
ipsec policy ipsec
ip address 10.5.39.160 255.255.255.255
#

Scroll to top