6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
134 VMware, Inc.
YoucanperformthesemaintaskswithSAs:
CreateanSA.Youspecifythesource,thedestination,andtheauthenticationmode.Youalsospecifythe
authenticationalgorithmandauthenticationkeytouse.Youmustspecifyanencryptionalgorithmand
key,butyoucanspecifynullifyouwantnoencryption.Authenticationisrequiredandcannotbenull.
The
followingexampleincludesextralinebreaksforreadability.Thelastoption(sa_2intheexample)is
thenameoftheSA.
esxcli network ip ipsec sa add
--sa-source 2001:DB8:1::121
--sa-destination 2001:DB8:1::122
--sa-mode transport
--sa-spi 0x1000
--encryption-algorithm 3des-cbc
--encryption-key 0x6970763672656164796c6f676f336465736362636f757432
--integrity-algorithm hmac-sha1
--integrity-key 0x6970763672656164796c6f67736861316f757432
--sa-name sa_2
ListanSAwithesxcli network ip ipsec sa list.ThiscommandreturnsSAscurrentlyavailable
forusebyanSP.ThelistincludesSAsyoucreated.
RemoveasingleSAwithesxcli network ip ipsec sa remove.IftheSAisinusewhenyourunthis
command,thecommandcannotperformtheremoval.
RemoveallSAswithesxcli network ip ipsec sa remove--removeall.ThisoptionremovesallSAs
evenwhentheyareinuse.
Managing Security Policies
AfteryouhavecreatedoneormoreSAs,youcanaddsecuritypolicies(SPs)toyourESXihosts.WhiletheSA
specifiestheauthenticationandencryptionparameterstouse,theSPidentifiesandselectstraffic.
ThefollowingoptionsforSPmanagementaresupported.
ekey <key> encryption-key
<key>
Encryptionkeytobeusedbytheencryptionalgorithm.Aseries
ofhexadecimaldigitswitha0xprefixoranASCIIstring.
ialgo [hmac-sha1 |
hmac-sha2-256 ]
integrity-algorithm
[hmac-sha1 |
hmac-sha2-256 ]
Authenticationalgorithmtobeused.Choosehmac-sha1or
hmac-sha2-256.
ikey integrity-key Authenticationkeytobeused.Aseriesofhexadecimaldigitsor
anASCIIstring.
vicfg-ipsec Option esxcli Option Description
CAUTIONRunningesxcli network ip ipsec sa remove--removeallremovesallSAsonyour
systemandmightleaveyoursysteminaninconsistentstate.
vicfg-ipsec Option esxcli Option Description
sp-src <ip>/<p_len> sp-source
<ip>/<p_len>
SourceIPaddressandprefixlength.
sp-dst <ip>/<p_len> sp-destination
<ip>/<p_len>
DestinationIPaddressandprefixlength.
src-port <port> source-port <port> Sourceport(065535).Specifyanyforanyports.
dst-port <port> destination-port
<port>
Destinationport(065535).Specifyanyforanyports.If
ulprotoisicmp6,thisnumberreferstotheicmp6type.
Otherwise,thisnumberreferstothe
port.
ulproto [any | tcp
| udp | icmp6]
upper-layer-protocol
[any | tcp | udp |
icmp6]
Upperlayerprotocol.UsethisoptiontorestricttheSPtoonly
certainprotocols,oruseanytoapplytheSPtoallprotocols.