Bug 1352301: Use OrderedDict to preserve order of different subnets

Change-Id: I58f45ded6f2c78a20e0464189a04e8c2ff37cfb5
(cherry picked from commit c073eb93322d519d7f4c5992eea12717252b7d4b)
Merge "Bug 1352301: Use OrderedDict to preserve order of different subnets"