An optical network comprising: a transmitting station (170; 718) configured to transmit an optical signal having a group of spectrally phase-encoded optical code division multiple access, SPE OCDMA, coded optical signals, the group comprising the coded optical signals sharing a group of codes (W 1 W 2, W 1 W 2, W 1 W 2, W 1 W 2) defining a code subset pattern, wherein the remaining coded optical signals of the group serve as group member identifiers differentiating members of the group; an encoder (710, 712, 714, 716; 740, 742, 744) coupled to the transmitting station configured to label, with a code group label (W 1 W 2, W 1 W 2, W 1 W 2, W 1 W 2), the optical signal having the group of coded optical signals, the code group label being the shared group of codes defining the code subset pattern; and a receiving station (180, 730, 732, 734, 736) configured to receive the labeled optical signal, the receiving station is operable to read the labeled optical signal if the code group label used to label the group of codes corresponds to a code group label associated with the receiving station, the optical network further comprising: a variable coder (721, 722, 723, 724; 900) coupled in between the encoder and the receiving station, the variable coder being configured to re-label the incoming optical signal having a group of codes with a new group of codes corresponding to the receiving station, wherein the variable coder is configured to affect the code label and not to affect the group member identifiers of the coded optical signals. a transmitting station (170; 718) configured to transmit an optical signal having a group of spectrally phase-encoded optical code division multiple access, SPE OCDMA, coded optical signals, the group comprising the coded optical signals sharing a group of codes (W 1 W 2, W 1 W 2, W 1 W 2, W 1 W 2) defining a code subset pattern, wherein the remaining coded optical signals of the group serve as group member identifiers differentiating members of the group; an encoder (710, 712, 714, 716; 740, 742, 744) coupled to the transmitting station configured to label, with a code group label (W 1 W 2, W 1 W 2, W 1 W 2, W 1 W 2), the optical signal having the group of coded optical signals, the code group label being the shared group of codes defining the code subset pattern; and a receiving station (180, 730, 732, 734, 736) configured to receive the labeled optical signal, the receiving station is operable to read the labeled optical signal if the code group label used to label the group of codes corresponds to a code group label associated with the receiving station, the optical network further comprising: a variable coder (721, 722, 723, 724; 900) coupled in between the encoder and the receiving station, the variable coder being configured to re-label the incoming optical signal having a group of codes with a new group of codes corresponding to the receiving station, wherein the variable coder is configured to affect the code label and not to affect the group member identifiers of the coded optical signals. a variable coder (721, 722, 723, 724; 900) coupled in between the encoder and the receiving station, the variable coder being configured to re-label the incoming optical signal having a group of codes with a new group of codes corresponding to the receiving station, wherein the variable coder is configured to affect the code label and not to affect the group member identifiers of the coded optical signals.