How to set IP Host and IP Arduino and send a built string on UDP protocol

First i make my apologise for ma incorret English.
Now i post the code that i have write for do that:

/*
IL CODICE CHE SEGUE SERVE PER SPEDIRE VIA UDP UNA O PIU' STRINGHE (CREATE AD HOC) A FRONTE DELL'ATTIVAZIONE
DI UN INGRESSO SETTANDO L'INDIRIZZO IP DI ARDUINO E RELATIVA PORTA ED ANCHE L'IP DELL'HOST CON RELATIVA PORTA
/
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <String.h>
//-----------------------------------------------------------------
// CONFIG_1
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ipArduino(100, 100, 100, 100);
unsigned int localPort = 5000;
IPAddress ipHost(99, 98, 97, 96);
unsigned int hostPort = 7500;
//-----------------------------------------------------------------
// CONFIG_2
/

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
byte ipArduino[] = {100, 100, 100, 100}; // Arduino
unsigned int localPort = 5000; // local port to listen on
byte ipHost[] = {99, 98, 97, 96};
unsigned int hostPort = 7500;
*/
//-----------------------------------------------------------------
boolean Attivo = false;
unsigned long time;
int Count = 0;
//-----------------------------------------------------------------
EthernetUDP Udp;
//-----------------------------------------------------------------
void setup() {
pinMode (31, INPUT); //Set Allarm
pinMode (33, INPUT); //Reset Allarm
pinMode (49, OUTPUT);

Ethernet.begin(mac,ipArduino);
Udp.beginMulticast(ipHost, hostPort);

Serial.begin(9600);
/*
//Queste righe vanno abilitate solo se uso la CONFIG_1
Serial.print("Ard. at IP ");
Serial.print(ipArduino);
Serial.print(" port: ");
Serial.println(localPort);
Serial.print("Host at IP ");
Serial.print(ipHost);
Serial.print(" port: ");
Serial.println(hostPort);
*/
}
//-----------------------------------------------------------------
void loop() {
// Rilevo attivazione ingresso 31 - Alarm
if (digitalRead(31) && !Attivo){
delay(1500);
if (digitalRead(31)){
digitalWrite(49, HIGH);
Attivo = true;
++Count;
Serial.print("Alarm on IN-31 for n. ");
Serial.print(Count);
Serial.println(" time.");

String num = String(Count, DEC);
String msgTosend = ("Alarm ON on IN-31 number " + num + "\nSecond line Alarm ON\nOff Line");

//SOLUZIONE 1 spedisco un'unica stringa (Verificare)
//int buffer_len = msgTosend.length()+1 ;
//char bufferTosend[buffer_len];
//msgTosend.toCharArray(bufferTosend, buffer_len);;

//SOLUZIONE 2 spedisco un'unica stringa (OK funziona)
char bufferTosend[msgTosend.length()+1];
msgTosend.toCharArray(bufferTosend, msgTosend.length()+1);
Udp.beginPacket(ipHost, hostPort);
Udp.write(bufferTosend);
Udp.endPacket();

delay(10);
}
}
// Rilevo attivazione ingresso 33 - Reset
if (!digitalRead(31) && digitalRead(33)){
delay(3000);
if (digitalRead(33)){
digitalWrite(49, LOW);
Attivo = false;
Serial.println("Alarm Reset Ok");
// Altro modo per spedire pacchetti
Udp.beginPacket(ipHost, hostPort);
Udp.write("OFF all Alarm\n");
Udp.write("Second line Alarm OFF\n");
Udp.write("Off Line");
Udp.endPacket();
delay(10);
}
}
delay(10);
}

Now i post the code that i have write for do that

Did you have a question? A problem with the code that you want to talk about?

Not sue what the question is but arduino and host appear to be on different subnets. ...