The set entry allows you to associate a string with a variable; the string will replace references to the variable later in the text. For example,
set ip = ip, ip vnet, vnet eth arp, arp eth, eth ethd, ethd sim; ... host h1n1; protocols = megtest vtcp, vtcp $ip;
means that the reference to $ip is replaced by the protocol stack on the right side of the set command, which is equivalent to the following
host h1n1; protocols = megtest vtcp, vtcp ip, ip vnet, vnet eth arp, arp eth, eth ethd, ethd sim;