Wednesday , 26 April 2017

SAP Router with SNC Configuration

Download SAP Cryptographic Binary from SAP Market Place
Cryptographic Binary can be download from below link

  • Download
  • SAP Cryptographic Software

After click on SAP Cryptographic Software you will get new browser window, where you have to select the
file and download the file depend upon the OS platform on which you have to configure SAP Router

Register IP and SAP Router Hostname with SAP
First of all get Public IP address from your network team, Public IP need to be configured to you local SAP
Router IP address. (This Task will done by your Network Team)
Also get port 3299 & 3298 open from SAP router ip host to SAP AG.
SAP router use port 3298 & 3299 for communication
Raise an OSS with SAP under component XX-SER-NET-NEW with Description of registering Public IP
address and Host name of SAP router with SAP.

Create SAP Router Folder in C:\usr\sap
Goto location C:\usr\sap
Create saprouter folder with mkdir command
Copy downloaded Cryptographic Binary to saprouter folder and extract the binary using SAPCAR.exe

Set environmental variable SECUDIR=C:\usr\sap\saprouter
Set environmental variable SAPROUTTAB C:\usr\sap\saprouter

Generating the Registering the Key and Certificate
Go to the link


Click on Apply Now!

Copy the Distinguished name from above, which is required for executing below command Once you copied Distinguished name from above link then click on Continue TAB

Generate the certificate Request on SAP router OS with the Following command:

You will get “<Your Distinguished Name>” from SAP market Place, when you login with S-USER.
( This is generated after you raise an OSS with SAP for registering SAP router hostname )

After executing the above command you will get 2 additional files created in saprouter folder i.e local.pse and certreq
Certreq contain encrypted form of Key Request.
Copy the content of certreq and paste the certificate request into the text area of the same form in the SAP Service Marketplace
After Pasting the content click on REQUEST CERTIFICATE
In response you will receive the certificate signed by the CA in the Service Marketplace, cut & paste the text to a local file named srcert
After copying the content of import certificate to srcert file, copy the file in saprouter folder and provide the necessary rights.

Importing the Certificate & Creating Credential
Once file is copied to saprouter folder, run the import command to install the certificate in SAP Router. (Run the following import command)

Creating the credential for User responsible to start SAP Router
After importing the certificate create Credential for user <sid>adm who will be responsible to start and stop SAP Router (Run following command to do so)

Installation steps get completed after creating credential for <SID>adm

Verifying the Configuration
To confirm SAP Router is installed successfully, run the following command

Out of the command should show

After confirming SAP router has been configured successfully set the following environment, which is required read the cryptography will starting the SAP Router

Post Configuration Activity
Set environmental variable SNC_LIB=C:\usr\sap\saprouter\ sapcrypto.dll
Now once configuration is done, there is one of the important post installation steps which are to create
SAPROUTTAB is nothing but permission file which has information who should be communicate through SAP Router.
Create a file with name saprouttab and copy the same in C:\usr\sap\saprouter folder

Following is an example content of saprouttab

<SAP Server IP> is nothing but ip address of the SAP server which is need to be access via SAP Router.
<Port> is nothing but the port of SAP Application for e.g. 3200 (dispatcher port)
D * * * mean reject all the connection accept the entry of the server ip which mention in saprouttab.

How to Start & Stop SAP Router
Now one of the import command thing for which we have done all above exercise. i.e. how to start & stop Sap router

Run the following command to Start SAP Router

Above value of CN is nothing but Distinguished name which you check on SAP Market Place earlier.
Check the log file dev_rout in C:\usr\sap\saprouter folder which will give you exact idea of SAP Router started

Run the following command to Stop SAP Router


Example of a Route Permission Table with SNC
A route permission table using SNC could look like this:

P * * * pass
KT S:SR@host4 host4 3333
KT S:SR@host4 host9 *
KD S:SR@host4 host9 *
KP S:SR@host4 * * pass2
KS * host10 4444
KP * * *

This means:

  • Allow all connections if password pass is specified correctly.
  • Connections from this SAProuter to host4 (SNC name S:SR@host4), service 3333 should be SNC connections.
  • Connections from host9 (SNC name S:SR@host9) to this SAProuter should be SNC connections.
  • A SNC connection from SR@host4 to host9 through this SAProuter should not be set up.
  • A SNC connection from S:SR@host4 through this SAProuter (any target host) is allowed if the password pass2 is correct (unless the connection is to host9, since this is not allowed according to the previous entry – the first entry which “matches” is decisive).
  • All SAP to SAP connections (NI protocols) to host10, service 4444, which come in as SNC connections are passed on as non-SNC connections to host10 (no SNC host).
  • All SNC connections (for which the previous entries are not suitable) are allowed.


Sample saprouttab file


Check Also

HANA Log Volume is full

Symptom The logvolume is full and the database doesn’t accept any new requests. Other Terms …