1- if any one know how to test ethernet ping,
2 - i have another board that has Rs232 communication so i need to send char caractere in the Rs232 terminal from my arduino mega to the other board ,
For your second problem have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.
The technique in the 3rd example will be the most reliable.
You can send data in a compatible format with code like this