Gun salutes originated in the 17th century with maritime practice demanding that a defeated enemy ship expends its ammunition to render itself helpless.
The reason it’s the number '21', is because as it comes from the tradition of the galley ships emptying their guns as a sign of peace to foreign ports.
These ships had 3 rows of seven guns on the side of the ship amounting to 21 fired, so the tradition of firing 21 stems from this regardless of how many guns are present we fire 21 i.e our bty is 6 guns so all guns fire 3 times then gun 1,2 and 3 fire a 4th round.
This established a naval tradition, as any ship of war visiting a foreign nation would discharge all its guns to show that they where empty and the host port would return the salute to show their guns where also empty thus remonstrating the friendly intention displayed by the visiting ship.
The guns we use today to carry out these gun salutes joined the Irish Defence Forces in 1949. The army acquired 48 guns in total.
These were all ex-British army mark 3, 25 pounders, from the Royal Artillery Corp. These guns where used intensely throughout War World 2 and in battles such as Normandy.
The 25 pounder was considered by many to be the best artillery piece in use throughout the war. The Permanent Defence Forces replaced these guns in 1981 with the 105 mm light gun yet they where still used up until 2009 in service with the Reserve Defence Forces.
The Irish Defence Forces maintain a 6 gun ceremonial 25 pounder Battery in McKee barracks as well as 6 Coastal Defence 12 pounder guns based in Dun Laoighaire Harbour, under the control of the 2nd Field Artillery Regiment which were used to man the Presidential Mounted Escort more popularly known as the Blue Hussars which where established in 1931 and disbanded in 1948. These guns where re-conditioned in 2003 to their current condition of olive green, with original parts and chrome finish to the muzzle break.
The 2nd regiment conduct ceremonial salutes for Presidential inaugurations, visiting heads of states, saluting the most Blessed Sacrament, return of gun salute from foreign ships of war and military funerals for general officers or a military member of the council defence. The gun is operated by 4 gunners and one corporal on the gun and the Battery in controlled by one lieutenant, a Battery sergeant and timekeeper.
The timing for the interval of the shots is worked out by the two national anthem times add together and divided by 20 to allow to salute to continue for the whole duration of both anthems been played.