Q:

Nested classes inside a class cannot acces varibale from each other

Please take a look at the following snippet. You can understand what I am trying to do. The vlan_start of PairTwo class must be derived from the values of PortOne. How do I do that?
>>> class G8032:
...     class PairOne:
...         vlan_start = 1101
...         vlan_count = 600
...     class PairTwo:
...         vlan_start = G8032.PairOne.vlan_start + G8032.PairOne.vlan_count
...         vlan_count = 400
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 5, in G8032
  File "<stdin>", line 6, in PairTwo
NameError: name 'G8032' is not defined
>>> 

EDIT:
I have tried without G8032 in G8032.PairOne.vlan_***. it still doesn't work.

A:

Don't nest these classes. When the line vlan_start = G8032.PairOne.vlan_start + G8032.PairOne.vlan_count is executed, the G8032 class is not completely defined yet.
If you absolutely need to supporty the syntax you mentioned in the comments  (x = G8032.PairOne.vlan_start) then you could (but probably shouldn't) use the code below:
class PairOne:
    vlan_start = 1101
    vlan_count = 600

class PairTwo:
    vlan_start = PairOne.vlan_start + PairOne.vlan_count
    vlan_count = 40

class G8032:
    PairOne = PairOne
    PairTwo = PairTwo

print(G8032.PairOne.vlan_start)
print(G8032.PairTwo.vlan_start)
# 1101
# 1701

