I want to know if I use two diff. AS no. in EIGRP then cant communicate but in OSPF we can use two diff. Process ID then we can communicate??
your understanding is correct:
two EIGRP routers become neighbors if :
their EIGRP hello packets contain the same AS number and the same K values (used for EIGRP metric), same IP subnet
The two don't need to have matching timers.
the OSPF process-id is an internal tag that allows Cisco routers to run multiple instances of OSPF with separated databases.
In OSPF version 2 the process-id is not exported in OSPF hello packets
to build an OSPF neighborship:
same area number, same area type, same timers (but they can have different OSPF cost on the interface)
in both protocols neighborship is built only on primary address not on secondary addresses and authentication type and password must match if used.
So EIGRP AS number is a domain-wide parameter.
Hope to help