Let me preface this by saying the while I have *Mordenkainen's* I have not read this portion, and the following is based on 20+ years of reading novels and the such based in the Forgotten Realms.

Dwarven Clans are loosely based on the concept of Scottish Clans, and should be seen more like tribes than a large family group. A Clan is a collection of loosely related families, wherein one family has prominence as the the head and protector of the group. The Clan is typically named after the head family but exceptions exist.

Strongholds and cities are functionally the same thing for dwarves and are treated like nation City-States. He head of the Clan is a King and future leaders typically come from his bloodline. Families are loosely related to one another but the larger the populace is the more diverse this can become. But typically this strongholds host more than enough of a population to marry completely internally, and indeed many strongholds were isolated from one another for long periods of time.

WARNING: Spoilers ahead for some of the Drizzt series.

Mihtril Hall is a good example of this in action. Clan Battlehammer were the ancestral occupants of the city, but were driven out at some point (and suffering significant loss of population, and migrated north to Icewind Dale. They remained isolated from other dwarves for 200 or so years before they managed to return to Mithril hall. So in this time they would have had to marry exclusively internally.

Clans typically did not live with other Clans in a single city, but places like Mirabar would have individuals from several Clans, but observed a different government type (the city was shared with humans as well).

As for surnames, individual dwarven families had their own names, which may or may not indicate their Clan. Bruenor Battlehammer was the King of Clan Battlehammer, and his family was the head of the Clan for generation unto that point, however he passed the Kingship down to his next of kin Banak Brawnanvil, who was his cousin but not part of the head family, his heir Connerad Brawnanvil would sometimes add Battlehammer to his surname for formal events (as he was related by blood to the head family), but mostly kept his primary name. At this point the main bloodline not longer existed, but the Clan remained Battlehammer, despite no Battlehammers existing within it.

All dwarves would consider themselves as "Battlehammer Dwarves", e.g. Banak Brawnanvil of Clan Battlehammer. So their Clan was also their national identity.

TL:DR

Clans are collections of loosely related families, or families with a long shared history (similar to tribes). They became City-State Kingdoms and had populations capable of self-sustaining but also intermarried with other clans. Clans typically did not share cities, and individual families often had their own surnames, though the Clan had the name of the head family.

Sometimes families would also refer to themselves as a clan, so that can become confusing. Also I can not think of any specific inter-clan marriages, but I would assume they do happen, but intra-clan marriages certainly seem to be the norm.