# Configuring IPv4 Ethernet connections

The CG 6565 board has two 10/100/1000Base-T Ethernet connections that can be configured in several ways. This topic provides the following information about configuring IPv4 Ethernet interfaces:

- Using IPv4 Ethernet interface keywords

- Setting up the IPv4 Ethernet connections

## Using IPv4 Ethernet interface keywords

Use the following board keywords to configure the CG 6565 Ethernet interfaces:

Keyword | Description
--- | ---
IPC.AddRoute[x].DestinationAddress | Specifies the IPv4 address of an Ethernet interface. You can specify up to 32 destination addresses.
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.
IPC.AddRoute[x].VlanTag | Specifies a VLAN tag to be added to all packets sent to the IPv4 subnet specified by IPC.AddRoute[x].DestinationAddress and IPC.AddRoute[x].Mask.

Note: For these keywords, x represents an entry in the routing table.

CG 6565 Ethernet interfaces must be configured for Fusion systems. For more information about Fusion software, configurations, and programming models, refer to the Dialogic® NaturalAccess™ Fusion™ VoIP API Developer’s Manual.

## Setting up the IPv4 Ethernet connections

Use the IPC.AddRoute keywords to set the IPv4 addressing and static IPv4 routing table information for the CG 6565 board. You can configure up to 32 separate routing table entries for the CG 6565 board.

Depending upon the desired mode of operation, you can configure each Ethernet interface on the CG 6565 board with its own IP addressing information. To do this, specify the IPv4 address, the IPv4 subnet mask, and the particular Ethernet interface.

### IP addresses

To specify the IPv4 address of an Ethernet interface on the CG 6565 board, define the following keywords:

Keyword | Description
IPC.AddRoute[x].DestinationAddress | IPv4 address of Ethernet interface.
IPC.AddRoute[x].Mask | Subnet mask for IPv4 destination address.
IPC.AddRoute[x].Interface | Ethernet interface number (1 or 2).
IPC.AddRoute[x].VlanTag | VLAN tag (optional).

The combination of IPC.AddRoute[x].Mask and IPC.AddRoute[x].DestinationAddress defines a subnet. Multiple different subnets can be configured on the same interface.

### VLAN configuration

If a VLAN tag is specified, then all packets destined for the subnet will be tagged with a VLAN (IEEE 802.1Q Virtual LAN) ID. This does not affect handling of incoming packets; the board ignores the VLAN tag on incoming packets.

### Static IP routes

In addition, the CG 6565 board allows you to configure multiple static IPv4 routes by specifying the addresses of routers on the subnet. Once configured, the static IP routes manage the transfer of packets between the IPv4 subnet associated with the CG 6565 board and the IP network. The IP stack on the CG 6565 board uses standard IPv4 routing algorithms to determine how to route outbound packets.

To specify a static IPv4 route that the CG 6565 board IP stack uses, define the following keywords:

Keyword | Description
IPC.AddRoute[x].DestinationAddress | IPv4 address of Ethernet interface.
IPC.AddRoute[x].Mask | Subnet mask for IPv4 destination address.
IPC.AddRoute[x].GatewayAddress | IPv4 address of router.

### Example

The following example shows how to use IPC.Addroute statements to specify the board's IPv4 address, subnet mask, and gateway IPv4 address:

#CG 6565 Board IP Address, subnet mask, and gateway IPv4 address.
IPC.AddRoute[0].DestinationAddress = 10.102.64.151
IPC.AddRoute[0].Mask = 255.255.255.0
IPC.AddRoute[0].Interface = 1
#Gateway IP Address, subnet mask, and gateway IPv4 address.
IPC.AddRoute[1].DestinationAddress = 0.0.0.0
IPC.AddRoute[1].Mask = 0.0.0.0
IPC.AddRoute[1].GatewayAddress = 10.102.64.1

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

The IPv4 addressing and gateway configuration information for each CG 6565 board resides in the board keyword file. Every time you reboot the CG 6565 board with oamsys, oamsys reconfigures the IPv4 addressing information for the specified board.

The cgroute utility provides an alternative way to configure specific IPv4 addressing information without editing the CG 6565 board keyword file. cgroute is similar to the standard route utility found on most systems with IP processing capabilities. cgroute allows you to add, delete, and display routing information from the CG 6565 board. For more information, refer to cgroute - Setting up CG board IPv4 routing tables.