CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 08:05:27 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=54b6fdffce079243f87b541700bea8d8129d04eff445c59105fca3a36745279da%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22Mq92g1TJKYGvU5cwS6b8d7lP87SCMHnW%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d5179c7bbc5917-BLR
Mininet/Python custom tree - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from mininet.topo import Topo
- from mininet.net import Mininet
- from mininet.util import dumpNodeConnections
- from mininet.log import setLogLevel
- class CustomTopo(Topo):
- "Simple Data Center Topology"
- "linkopts - (1:core, 2:aggregation, 3: edge) parameters"
- "fanout - number of child switch per parent switch"
- def __init__(self, depth=2, fanout=2, **opts):
- # Initialize topology and default options
- Topo.__init__(self, **opts)
- #core_switch = self.addSwitch('c1')
- switches = {} #map {depth_level : [list of nodes]}
- hosts = []
- parend_id = 0
- switches[0] = list()
- switches[0].append(self.addSwitch('s1'))
- for s in range(1, depth): #last is host level
- switches[s] = list() #initialize list for dict
- for sw in range(0,fanout**s):
- switch_id = fanout**s+sw
- switches[s].append(self.addSwitch('s%s'%(switch_id)))
- self.addLink(switches[s][-1],switches[s-1][sw//fanout])
- for h in range(0, fanout**depth):
- hosts.append(self.addHost('h%s'%(h+1)))
- self.addLink(hosts[-1],switches[depth-1][h//fanout])
- topos = { 'custom': ( lambda: CustomTopo(depth=2,fanout=2) ) }
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ L
JavaScript | 1 sec ago | 0.25 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ S
JavaScript | 10 sec ago | 0.25 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ P
JavaScript | 19 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ P
JavaScript | 1 min ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit⭐⭐
Java | 1 min ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ R
JavaScript | 1 min ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit T I⭐⭐
Java | 1 min ago | 0.10 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand