Well, iran intrest in Afghanistan is more in line with having a secure border in east of our country . also when it come to iran - pakistan inttest in Afghanistan honestly I don't see much hope that they see matters in the same light .for some reasons Iran tends to favor hazareh and tajic ethnicity in Afghanistan and Pakistan tends to favor pashtoons in it's calculations about Afghanistan . Another problem is the ideology that is not indigenous to afghanistan and exported from some some countries in south of persian gulf into pashtoons dominate area of Afghanistan it seems pakistan can live with this ideology but Iran see it as a major deestabilizing factor in the region .
If these two difference somehow don't get solved I can't see how in future Pakistan and Iran follow the same approach in Afghanistan. And honestly it would be hard to imagine we can have a peaceful and stable Afghanistan in future without solving these differences or afghan government fix it's act and actually do something about corruption in it's rank and start to solve the big problem of warlords. Right now it seems in afghanistan everybody is investing in one warlord to increase its influence and share
i don't know the exact religious, ethnic mix that so complicates iran-pakistan relations and complicates any possible coordination of their postures in afghanistan. i only know that it is far more complex than i can possibly know (it is continental eurasia, after all, when all borders are results of long-drawn and long-entrenched ethnic and religious forces, unlike in africa and latin america where borders can be arbitrarily painted and repainted on european whims).
i only ask that iran and pakistan consider the simple fact that neither iran nor pakistan could ever hope to secure themselves against each other. and there are two layers to what i mean. first, there is no need for iran and pakistan to seek alliances that can shore up oneself against and at the expense of the other because there is no amount of self-augmentation that either iran or pakistan could do that can put one or the other definitively above the other and completely, irreversibly prevail over the other. therefore, iran-pak relation isn't like pak-india relationship: with the latter, india clearly aspires to total domination and is always just one successful campaign away from totally dominating pakistan and the entire subcontinent. with iran-pak relationship, it would be more like france and germany: there is no amount of conflict, no amount of self-augmentation that can put either definitively and permanently on the top, and it is utterly meaningless for either iran or pakistan to even try to do that by creating certain ethnic alliances or political coalitions in afghanistan close to iranian or pakistani borders. In the case of iran-pak relations, iranians can think it is nice to have tajiks seize more territory and power in afghanistan and pakistanis can think it is nice to reinforce the pathans, but ultimately the balance of power is between the demographic and economic strengths of iranians and pakistanis and not the smaller ethnicities and nations in the area. So iran and pakistan both think it is nice to have their respective allies gain more ground in afghanistan, even though ultimately iranians and pakistanis can both fend for themselves even if all their smaller allies fail. So this jockeying in afghanistan is helpful to both iran and pakistan but is ultimately unnecessary to iran and pakistans security vis-a-vis each other.
this leads to the second layer of my meaning. afghanistan in this sense is more like belgium: the absorption of belgium by either france or germany would be too small of an impact to tilt the balance of power permanently and decisively in favor of either germany or france but too big NOT to provoke a reaction from the other party and thus a total war, which nevertheless will never settle anything between france and germany (exactly because absorption of belgium is really not that a big deal and the party that lost belgium would not be hurt so much that it could not mount a comeback). So any advantage iran and pakistani can seek over each other will be temporary and fleeting and will necessarily provoke a response from the other party to do something else in afghanistan. Because neither iran nor pakistan can strike a blow so fatal that it can completely disable the other side (again, this is NOT like the indian threat to pakistan), then both sides will forever exchange blows after blows. Each blow will hurt, just not so much that the party that suffered the blow couldnt return a blow. So iran and pakistan can never secure themselves against each other not only because they dont need to but also because they really cannot: if they keep hitting each other, then they will keep hitting each other to no end, both in terms of time and of purpose.
with their physical promixity, iran and pakistan can also really hurt each other; as two neighbors of similar size and capabilities, iran and pakistan can never overthrow each other. So it is always to be a hurt, but not that hurt cycle. Again, this is the difference between iran-pak and india-pak relations: pakistan must secure itself with nuclear weapons against india because india really does want to overthrow pakistan and any blow from a conventional, large scale indian attack can be annihilitory for pakistan.
Therefore, it would be silly if the two sides dont try to work something out and accommodate each other (just like it would be silly for pakistan and india or china and vietnam, china and taiwan, or US and mexico, or russia and georgia - to try to accommodate each other because these pairs are not geopolitical and military equals). Now pak-iran relation is also going to be different from pak-china relationship because china wants almost nothing from afghanistan and doesnt lose much if china completely subordinates its own diplomatic goals in afghanistan to pakistani goals in afghanistan. Iran does have independent security interests - and very big ones at that, unlike china, which only wants to mine the whole damn country (and as a chinese I dont even feel the need to be defensive about it) - in afghanistan, and so pakistan cannot simply expect iran to accept pakistans diktats and terms in afghanistan. The iranian and pakistani sides really need to have a cordial talk about what constitutes eachs most vital interests in afghanistan and how these interests can be mutually accommodated. As the two biggest stakeholders in afghanistan bigger than russians and chinese, bigger than all the afghans themselves, and much, much bigger than angloamericans and yindoos iran and pakistan need to show the sense of responsibility, maturity and mutual respect to settle their differences in afghanistan. If they can do that, then all other chips will fall into place because combined, iran and pakistan exercise unparalleled influence in afghanistan that can decisively shape how other players fare in afghanistan. For two countries unequal in size, security competition brings total dominion for the big power (e.g., india) and brings independence and dignity for the small (e.g. pakistan), but for two equals that can really hurt each other because of geographic access and ethnic and religious intercourse, security competition will only bring endless frustration to all parties, just like europe in the modern era. I am sure the age and wisdom of the two civilizations of persia and indus valley can figure out ways to coexist and fairly divide their interests in afghanistan and central asia.