Octane number is the percentage of isooctane in the mixture of isooctane and n-heptane. Octane number is for gasoline (petrol) fuel. A gasoline with octane number of 80 means 80% of isooctane and 20% of n-heptane, i.e., branched-chain alkane is more, so knocking is less.
Branched-chain hydrocarbons burn more smoothly to form more stable, less reactive 3° radicals, whereas straightchain hydrocarbons (e.g. n-heptane) from less stable, more reactive 1° and 2° radicals In contrast, cetane number is used for diesel fuel and is defined as the percentage of cetane in a mixture of cetane and α -methyl naphthalene. A diesel fuel with cetane number 80 means 80% of cetane (C6 H34) (a straight chain hydrocarbon) and 20% of α -methyl naphthalene (aromatic compound). So, it will not burn smoothly and produce high knocking
But straight –chain hydrocarbons, e.g., cetane, ignite spontaneously in comparison to aromatic compounds.
So, cetane number determines the ignition of fuel. Higher cetane number means fuel will ignite faster but will produce higher knocking. Lower cetane number means fuel will ignite slowly and will produce knocking (rattling sound).