This article provides information about the length of the hostname in aggressive mode site-to-site IPSec VPN.
The maximum allowed length of the hostname is 20 characters; inclusive of special characters (such as: @,.,-, ....). If the length of the hostname is increased, the VPN tunnel will not come up. Config example : Dynamic Side :
[edit security ike] gateway HQ { ike-policy LA-remote; address 10.0.1.2; local-identity hostname jtac-juniper-srx-100; external-interface fe-0/0/3.0;
Static Side :
[edit security ike] gateway LA-remote-gw { ike-policy LA-remote; dynamic hostname jtac-juniper-srx-100; external-interface fe-0/0/3.0;