How to Modify Protocol Parsers

Overview

The default packet parsers in Avi Vantage release 18.2.5 are called Default-Radius and Default-DHCP used for Remote Authentication Dial-In User Service (RADIUS) and Dynamic Host Configuration Protocol (DHCP) respectively. This article will show how to modify the protocol parser for RADIUS or DHCP packets in L4 DataScripts.

Although you can edit the default parsers, it is recommended to configure a new parser with the default one as template as discussed below.

Using an Existing Parser as a Template

The parser code in an existing default parser can be used as template to create the new parser.
To view the parser code,

  1. Navigate to Templates > Scripts > ProtocolParserScripts. Edit Parser
  2. Edit the required default parser to view the Edit ProtocolParserScript: screen. For example, Default-DHCP.
  3. Copy the contents from the Parser code field. Edit Parser
  4. Paste the copied contents into any text editor and modify the code as required.

Creating a New Parser

To create a new parser,

  1. Navigate to Templates > Scripts > ProtocolParserScripts.
  2. Click on Create.
  3. Enter a Name for the parser.
  4. Paste the copied Parser code. The NewProtocolParserScript: is as shown below: New Parser
  5. Click on Save.

Associating the Parser to the DataScript

To associate the parser to the Datascript,

  1. Navigate to Templates>Scripts>DataScripts Edit DS
  2. Click on the edit icon.
  3. Select the required Protocol Parser in the Edit DataScript Set: screen. Edit DS
  4. Click on Save.

Note: If the virtual service is in the Up state, disable it, and if the virtual service is down, enable it for the new parser to take effect.