Shoguns are at the top, daimyos are in the center, and peasants are at the bottom. The hierarchy is strict; even though the shogun was not a king, but rather the emperor's representative, no daimyo would ever think of rebelling against him.
The Japanese feudal system worked like this: The emperor appointed shuguns to rule over different provinces. The shuguns then picked (or were chosen by their clans) daimyos to serve under them. The daimyos in turn selected vassals called hatamoto to serve as military commanders. Last but not least, the hatamotos picked peasant soldiers called bugeis to fight for them.
In conclusion, shoguns were not the only ones who could declare war. Any lord able to raise an army large enough to be worth mentioning could also attack other countries. However many times have treaties been signed between countries? Yes, they could also make treaties too! Japan's wars during the Muromachi period were mostly due to internal politics; there were several attempts on shogunate's life by factions wanting to replace it with another leader.
The daimyo lords were the heads of the samurai and were at the pinnacle of the military elite, immediately behind the shoguns. The daimyo were seen as extraordinarily powerful characters, and they were frequently more powerful than shoguns, as the shoguns' authority was entirely based on how strong the daimyo were and how many of them they controlled. During times when the government was weak, there might be several daimyo at war with each other; but once the government became stronger, it would unite these forces against another enemy.
Daimyo usually means "great lord", and they were rulers of provinces who had considerable autonomy, although they could not refuse orders from above. Initially, there were only a few daimyo, but their numbers increased over time until there were about 250 during the Edo period (1603-1867).
They are often described as absolute monarchs, but this is incorrect. They ruled by legal right rather than by divine right or even kingly right, so they could be removed from office by their peers or even by their own ministers if they got into trouble. Although they didn't have an official role in diplomacy or international relations, some daimyo did take part in wars alongside their generals - for example, Oda Nobunaga fought alongside his soldiers instead of from a distance as did his rival Toyotomi Hideyoshi.
By the 1500s, a new class of territorial military rulers, known as daimyo, had formed; the daimyo constructed and maintained their domains (known as "han"), erected castles, and established cities around their castles where their samurai men lived and served in their armies. The daimyo also were responsible for sending their sons to be educated at home or at one of the many schools throughout Japan. When the boys came of age, they returned to serve their lord until they too became daimyo or retired to live on their land.
The responsibilities of the daimyo included making sure that their domains were well protected against attack from without and within their borders; keeping track of their vassals (men who worked land under them); arbitrating disputes between themselves or their subordinates; and ensuring that laws were not only enforced but also developed by their samurai councils or their own ministers.
In general, the daimyo ruled their territories peacefully although they did fight wars when necessary. They built weapons factories within their own lands so they would have the advantage in any battles that might arise. At times, however, they had to send letters requesting help from other lords or even the emperor himself. In return for this aid, the daimyo would give away parts of their land for use by the soldiers who helped them win their wars.
Daimyo (Lords and Nobles) were an important aspect of Japanese feudalism. They needed to guard their territory against incursions by rival daimyos, so they recruited samurais and awarded them with tiny plots of land. When all the available land had been given out and sold, the daimyo then went on a buying spree. The prices they paid for land were ridiculous; one estimate is that they spent about two years' worth of national income on themselves. The most famous example is Tokugawa Ieyasu, who built up a huge army to defeat Oda Nobunaga at the Battle of Sekigahara. After winning the battle, he was able to establish his own dynasty, the Tokugawa, which ruled over all of Japan for nearly 200 years.
So daimyo were both soldiers and farmers, but they also made money by selling government services, especially war, and renting out their land. In return for this money, the daimyo were required to supply a certain number of soldiers to the emperor. If they failed to do so, they would be punished by having some of their land confiscated or being forced to pay a fine.