When we went into Vietnam we were trying to push back communism from south Vietnam, at the time we were fighting to protect a collapsed government. We fought in Iraq as part of the war on Terror. Both wars were drawn out, there was massive civilian casualties, and none of our goal were ever achieved in them.
A general analogy cannot be drawn between the Vietnam War and the War in Iraq because they are from two very different time periods with very different technology. They occurred in two extremely different countries with different cultures, because of different circumstances and situations. The terrain, technology, people, culture, languages and many other details are not similar. The only similarity between wars is the devastation to innocent people, harm to the United States military and destruction of land.
While both of these wars may seem very similar if you add in the political climate for each it may drawn up a different image. With Vietnam, the cold war seems like it had a huge impact on that war and seems different from the Iraq war because of the motives for each.