# Configuring CG board Ethernet interfaces

The CG boards provide two Ethernet connections that can be configured to operate in IPv4 stack mode, IPv6 stack mode, or dual stack mode. There are several methods you can use to set the board's IP addresses and configure its Ethernet interfaces. The method you use depends on the application's requirements and the way you use the board.

You can configure the CG board's Ethernet interface through keywords in the board keyword file using the oamsys utility. Every time you use oamsys to re-configure the board, the IP address information is re-configured for the board.

Other methods for configuring the Ethernet interface include:

- Using the cgroute utility. For information, refer to the CG board manual.

- Using the OAM service API to configure the board from an application. For information, refer to the Dialogic® NaturalAccess™ OAM API Developer's Manual.

This topic describes:

- Setting Ethernet interfaces to use the IPv4 stack

- Setting Ethernet interfaces to use the IPv6 stack

- Setting up the board to run in dual IPv4 and IPv6 stack mode

For more information about configuring the CG board Ethernet interfaces, refer to the appropriate CG board manual.

## Setting Ethernet interfaces to use the IPv4 stack

When configured in IPv4 stack mode, the IPv4 addressing and gateway configuration information for each CG board resides in a separate board keyword file. Each time you use oamsys to re-configure the board, the IP address information is re-configured for the board. In addition, if the application uses RTP IPv4 endpoints, the associated CG board Ethernet interfaces must be configured in either IPv4 stack mode or dual IPv4 and IPv6 stack mode.

The following CG board keywords configure CG board Ethernet interfaces in IPv4 stack mode:

Keyword | Description
IPC.AddRoute[x].DestinationAddress | Specifies the IPv4 address of a CG board Ethernet interface. There are 30 routes available in dual subnet mode and 15 routes available in redundancy mode.
IPC.AddRoute[x].GatewayAddress | Specifies the IPv4 address of the network router.
IPC.AddRoute[x].Interface | Specifies the number (1 or 2) of the Ethernet interface you are configuring.
IPC.AddRoute[x].Mask | Specifies the subnet mask for the IPv4 address specified in IPC.AddRoute[x].DestinationAddress.

The following example shows how to use IPC.AddRoute statements in a sample CG board keyword file to specify the board's IPv4 address, subnet mask, and gateway IPv4 address:

IPC.AddRoute[0].DestinationAddress = 10.102.64.151
IPC.AddRoute[0].Mask = 255.255.191.0
IPC.AddRoute[0].Interface = 1
#Gateway IPv4 Address, subnet mask, and gateway IP address.
IPC.AddRoute[1].DestinationAddress = 0.0.0.0
IPC.AddRoute[1].Mask = 0.0.0.0
IPC.AddRoute[1].GatewayAddress = 10.102.64.10

In this example, the first three IPC entries specify the IPv4 address and mask of a CG board. The second three entries configure the address of the gateway.

## Setting Ethernet interfaces to use the IPv6 stack

When the CG board is configured in IPv6 stack mode, Ethernet interfaces can use features such as address autoconfiguration neighbor discovery, and IP security.

The following CG board keywords are used to configure the CG board Ethernet interfaces in IPv6 stack mode:

Keyword | Description
--- | ---
IPv6.Link[x].Enable | Enables or disables IPv6 on the specified Ethernet interface.
IPv6.Link[x].IPSec | Enables or disables IPv6 security (IPSec) on the specified Ethernet interface.
IPv6.Link[x].MTU | Specifies the IPv6 maximum transmission unit (MTU) for the Ethernet interface.
IPv6.Link[x].HopLimit | Specifies the default IPv6 hop limit value (that is, the maximum number of routers through which a datagram travels) for the Ethernet interface.
IPv6.Link[x].EnablePing | Enables or disables IPv6 PING on the specified Ethernet interface.
IPv6.Link[x].ICMPRateLimit | Specifies the IPv6 ICMP rate limit (that is, the maximum amount of ICMP error messages per second that can be sent) for the Ethernet interface.
IPv6.Link[x].NDAttempts | Specifies the neighbor discovery attempt (NDA) limit for the Ethernet interface.
IPv6.Link[x].NDRetranTimer | Specifies in milliseconds, the neighbor discovery re-transmission timer for the Ethernet interface.
IPv6.Link[x].NDReachabilityTimer | Specifies, in milliseconds, the neighbor discovery reachability timer duration for the Ethernet interface.

If the application uses RTP IPv6 endpoints, the associated CG board Ethernet interfaces must be configured either in IPv6 stack mode or in dual IPv4 and IPv6 stack mode.

The following sample shows the segment of a CG board keyword file that specifies the board's Ethernet interfaces in IPv6 mode:

IPv6.Link[0].Enable = YES
IPv6.Link[0].IPSec = NO
IPv6.Link[0].MTU = 1500
IPv6.Link[0].HopLimit = 64
IPv6.Link[0].EnablePing = YES
IPv6.Link[0].ICMPRateLimit = 100
IPv6.Link[0].NDAttempts = 3
IPv6.Link[0].NDRetranTimer = 1000
IPv6.Link[0].NDReachabilityTImer = 30000
IPv6.Link[1].Enable = YES
IPv6.Link[1].IPSec = NO
IPv6.Link[1].MTU = 1500
IPv6.Link[1].HopLimit = 128
IPv6.Link[1].EnablePing = YES
IPv6.Link[1].ICMPRateLimit = 100
IPv6.Link[1].NDAttempts = 3
IPv6.Link[1].NDRetranTimer = 1000
IPv6.Link[1].NDReachabilityTImer = 30000

## Setting up the board to run in dual IPv4 and IPv6 stack mode

CG boards can implement a dual IPv4 and IPv6 stack that allows applications to configure the board in any of the following modes:

IP stack mode | Description
IPv4 only | CG board default mode. You configure specific IPv4 addresses and routing information with the IPC.AddRoute keywords.
IPv6 only | Enable by setting the IPv6.Link[x].Enable keyword to YES for a particular Ethernet interface The IPv4 stack remains passive if no IPv4 addresses are configured with IPC.AddRoute keywords.
Dual IPv4 and IPv6 stack | Add IPv4 addresses with IPC.AddRoute keywords, and enable IPv6 capability on a particular interface with the IPv6.Link[x].Enable keyword.

When CG board Ethernet interfaces are configured in dual IPv4 and IPv6 stack mode, applications can create both IPv4 and IPv6 endpoints associated with the interfaces. When IPv6 is enabled on the second port, IPv4 redundancy is disabled.

You can configure CG boards Ethernet interfaces in dual IPv4 and IPv6 stack mode in one of the following ways:

- Configure the Ethernet interface separately for IPv4 and IPv6 support.

- Configure separate protocols for separate Ethernet links.

- Configure both protocols for either or both links.

For more information about configuring CG boards in dual IPv4 and IPv6 mode, refer to the CG board manual.