Say, to what extent would a Roman soldier have a sense of being "Roman", or a French farmer in the 11th century have of being "French"? I read that they didn't really have on, but I always found this difficult to wrap my head around.
Nations are really creations of modernity. There are various ways of explaining their creation but the idea of a nation as an imagined community is a useful one. For nations to exist a couple of things have to be true. Firstly, there needs to be something of an awareness of the past and the future, nations posit themselves as uniting people across time. Secondly there needs to be an idea of shared community, think of how you could meet another person from your nation if you were travelling and share topics of conversation without ever having met.
In medieval times, universal claims on ontological truth came from the church or perhaps the monarch. People didn't see themselves as part of a "national" community so much as part of a local community (say a village or fiefdom) and of a universal religion.
with the advent of print media, roads and education nations could be constructed as people from across a state could share basic givens and national symbols. they could feel united by these as a nation.
FWIW Rome was an empire composed of many nations (much like the British empire). The communities within the Roman empire are a less anachronistic use of the word nation (Catalan, pict, etc) .
A great read on this would be Renan's Peasants into Frenchmen, Anderson's Imagined Communities or Narin's faces of nationalism