Using the -i option in cg6kcon's ping command

Introduction

To send out pings from Dialogic® CG Series Media Boards, the "ping" command from the "cg6kcon" utility is used. This article describes how the -i (interface) option works in the case that IPv4 Ethernet redundancy is used.

Background

When using IPv4, a CG Series Board can be configured for ethernet redundancy by configuring only a single IP address in the CG configuration file. The configuration will look like this (with x.x.x.x, y.y.y.y, and z.z.z.z replaced by the IP address, netmask, and default gateway respectively):

IPC.AddRoute[0].DestinationAddress = x.x.x.x
IPC.AddRoute[0].Mask = y.y.y.y
IPC.AddRoute[0].Interface = 1
IPC.AddRoute[1].DestinationAddress = 0.0.0.0
IPC.AddRoute[1].Mask = 0.0.0.0
IPC.AddRoute[1].GatewayAddress = z.z.z.z  

In Ethernet redundancy mode, the first Ethernet interface is always used if it is available. If the first Ethernet interface is unplugged, then the CG board automatically moves the MAC address and IP address to the second Ethernet interface. When the first Ethernet interface is restored, the CG board automatically moves the MAC address and IP address back to the first Ethernet interface, even if the second Ethernet interface is still available. This is similar to the "active-backup bonding" mode in Linux, except that the CG board prefers the first Ethernet interface, always using it if available.

The cg6kcon utility includes a ping command whose usage is:

ping [-i interface number] [-s size] [-c count] [-t interval] v4 ip_addr 

 

Note that the ping responses or timeouts will not be shown in cg6kcon, but must be viewed with the oammon utility (usually run with the command line "oammon -L" in another window). The documentation for the -i option is "Network interface number (1 or 2).", which does not fully explain how the parameter works when used with IPv4 Ethernet redundancy mode.

Details

This is how the -i option works for IPv4 Ethernet redundancy mode:

The option "-i 0" and no -i option are the same thing. They mean "ping from either interface":

  • If interface 1 is up, the ping will go from interface 1.

  • If interface 1 is down, and interface 2 is up, the ping will go from interface 2.

  • If both interfaces are down, no ping will be sent, and the error "Board Error 0x1208: Ping request: no route to destination" will be seen in oammon.

 

The "-i 1" option means "check if ethernet 1 is up before pinging":

  • If interface 1 is up, the ping goes from interface 1.

  • If interface 1 is down, no ping will be sent, and the error "Board Error 0x1208: Ping request: interface address not found" will be seen in oammon.

 

The "-i 2" option means "check if ethernet 2 is up before pinging":

  • If interface 2 is up, the ping will be sent from the active interface (interface 1 if interface 1 is up, or interface 2 if interface 1 is down).

  • If interface 2 is down, no ping will be sent, and the error "Board Error 0x1208: Ping request: interface address not found" will be seen in oammon.

NOTE

if both interfaces are up, then the -i option doesn't do anything (the ping goes from interface 1)

Product List

Dialogic CG Series Media Boards

Return to Documentation Home I Return to Sangoma Support