I read that CER has to send multiple vendor specific application ids to advertise all the applications that the diameter node supports. If that is true then what is the application id value in the diameter header. Also I dont understand when when the following three are to be used- Acct Application id AVP, vendor specific application id AVP and Auth Application id
ApplicationId in the header is always there no matter which Diameter request you are sending. Therefor its there also in CER (see RFC 3588 section 3)
In the CER:
You should use Acct-Application-Id AVP in packet of type Accounting (see RFC 3588 section 6.9) You should use Auth-Application-Id AVP in Authentication and Authorization type packet (see RFC 3588 section 6.8)
Vendor-Specific-Application-Id AVP is used to support of a vendor specific Diameter Application and in order to describe it you must add to it Acct-Application-Id AVP or Auth-Application-Id AVP (see RFC 3588 section 6.11)