cnp3 / ipmininet

Mininet extension to make experimenting with IP networks easy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abstraction for interface parameters

jadinm opened this issue · comments

I think that it would be interesting to have an abstraction for interface parameters (IP addresses, tc parameters, radvd parameters,...) like with have for daemons (router.addDaemon()).

Instead of

self.addLink(r1, r2, params1={"ip": ("2001:1341::1/64", "2001:2141::1/64"), "delay": "1ms","bw": 10}, params2={"ip": ("2001:1341::2/64", "2001:2141::2/64"), "delay": "1ms","bw": 10})

we could have

l = self.addLink(r1, r2)
l[r1].addParams(ip=("2001:1341::1/64", "2001:2141::1/64"), delay="1ms", bw=10)
l[r2].addParams(ip=("2001:1341::2/64", "2001:2141::2/64"), delay="1ms", bw=10)

or when we have parameters for both interfaces

l.addSymParams(delay="1ms", bw=10)

We could also have a separate abstraction for adding IP subnets (with first interface address always ending by ::1 and the second one ending by ::2)

l.addSubnets("2001:1341::/64", "2001:2141::/64")

Do you have any though on this @oliviertilmans ?