14
Applied Networking Research Workshop 2020 acm sigcomm NeST: Network Stack Tester Shanthanu S Rai, Narayan G, Dhanasekhar M, Leslie Monis, Mohit P. Tahiliani Wireless Information Networking Group (WiNG) Department of Computer Science and Engineering National Institute of Technology Karnataka, Surathkal, Mangalore, India July 30, 2020

NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

  • Upload
    others

  • View
    27

  • Download
    1

Embed Size (px)

Citation preview

Page 1: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

Applied Networking Research Workshop 2020

acm sigcomm

NeST: Network Stack TesterShanthanu S Rai, Narayan G, Dhanasekhar M,

Leslie Monis, Mohit P. Tahiliani

Wireless Information Networking Group (WiNG)Department of Computer Science and Engineering

National Institute of Technology Karnataka, Surathkal, Mangalore, IndiaJuly 30, 2020

Page 2: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

1Introduction

Network ExperimentationI Physical testbeds

Network NamespacesI Virtualize network stackI Complex virtual topologies can be createdI Minimal system resources

Existing toolsI MininetI Flexible Network Tester (Flent)I TransperfI NetestoI TEACUP

Applied Networking Research Workshop 2020 |

Page 3: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

2NeST: Network Stack Tester

I Python package to simplify the process of network experimentation byusing Linux network namespaces

I Intuitive APIs to: build a virtual network, run experiments and collectstatistics

I Simplifies the process to reproduce network experimentsI Less physical resources, less error prone and less prerequisitesI Multiple instances of the same network topology can co-exist, and

different experiments can be run in parallel on every instanceI Open source tool released under GPLv2 LicenseI Link: https://nitk-nest.github.io/

Applied Networking Research Workshop 2020 |

Page 4: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

3API

# Create two nodesn0 = Node('n0')n1 = Node('n1')

# Connect nodes and get corresponding interfaces(n0_n1, n1_n0) = connect(n0, n1)

# Assign addresses to the interfacesn0_n1.set_address('10.0.0.1/24')n1_n0.set_address('10.0.0.2/24')

# Set link propertiesn0_n1.set_attributes('5mbit', '5ms')

# Create an experiment named 'mytest' to run# on the built topologyexp = Experiment('mytest')

# Add 1 flow from n0 to n1 from time t=0s to t=10sexp.add_flow(Flow(n0, n1, n1_n0.get_address(), 0, 10, 1))

# Run the experimentexp.run()

Peer to peer topology

Applied Networking Research Workshop 2020 |

Page 5: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

4Architecture

Kernel

API

Engine Module

Invoke iproute2 andnetworking tools

Topology Map

Experiment ModuleTopology Module

2. Request Engine to buildtopology with iproute2

5. Request Engine to runnetworking tools to create

flows and obtain results

3. Store mapping betweenuser given names and NeST’sinternal names

6. Convert NeST’s internal names to user-given nameswhile displaying results.

1. Invoke topology relatedAPI

4. Invoke experiment relatedAPI

# Create two nodes

n0 = Node('n0')

n1 = Node('n1')

# Connect nodes and get corresponding interfaces

(n0_n1, n1_n0) = connect(n0, n1)

# Assign addresses to the interfaces

n0_n1.set_address('10.0.0.1/24')

n1_n0.set_address('10.0.0.2/24')

# Set link properties

n0_n1.set_attributes('5mbit', '5ms')

# Create an experiment named 'mytest' to run

# on the built topology

exp = Experiment('mytest')

# Add 1 flow from n0 to n1 from time t=0s to t=10s

exp.add_flow(Flow(n0, n1, n1_n0.get_address(), 0, 10, 1))

# Run the experiment

exp.run()

Peer to peer topology

Applied Networking Research Workshop 2020 |

Page 6: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

5Scope and Limitations

ScopeI Advanced traffic controlI TCP parametersI Netperf, ss, tcI Addition of new tools is easy (e.g., httperf)

LimitationsI Effects of hardware level optimizations are not seenI Lack of support for all implementations of network stacksI Lack of advanced debugging functions

Applied Networking Research Workshop 2020 |

Page 7: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

6Experiment 1

MotivationHow accurate are NeST results compared to a physical testbed?

Figure: Simple topology for NeST Validation

I 4 CUBIC TCP flows from Node0 to Node1I Two experiments run with two different qdiscs at Router: CoDel and

FIFO.

Applied Networking Research Workshop 2020 |

Page 8: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

7Experiment 1: Plots

CoDel

0

20

40

60

80

100

120

140

0 10 20 30 40 50 60

cwnd (

segm

ents

)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(a) cwnd: NeST

0

20

40

60

80

100

120

140

0 10 20 30 40 50 60

cwnd (

segm

ents

)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(b) cwnd: Physical Testbed

FIFO

0

50

100

150

200

250

300

350

400

450

0 10 20 30 40 50 60

cwnd (

segm

ents

)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(a) cwnd: NeST

0

50

100

150

200

250

300

350

400

450

0 10 20 30 40 50 60

cwnd (

segm

ents

)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(b) cwnd: Physical Testbed

Applied Networking Research Workshop 2020 |

Page 9: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

7Experiment 1: Plots

CoDel

0

10

20

30

40

50

60

0 10 20 30 40 50 60

Thro

ughput

(Mbit

/s)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(a) Throughput: NeST

0

10

20

30

40

50

60

0 10 20 30 40 50 60

Thro

ughput

(Mbit

/s)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(b) Throughput: Physical Testbed

FIFO

0

10

20

30

40

50

60

70

80

0 10 20 30 40 50 60

Thro

ughput

(Mbit

/s)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(a) Throughput: NeST

0

10

20

30

40

50

60

70

80

0 10 20 30 40 50 60

Thro

ughput

(Mbit

/s)

Time (s)

Flow 1 Flow 2 Flow 3 Flow 4

(b) Throughput: Physical Testbed

Applied Networking Research Workshop 2020 |

Page 10: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

7Experiment 1: Plots

CoDel

0

20

40

60

80

100

120

0 10 20 30 40 50 60

Lin

k U

tilizati

on (

Mbit

/s)

Time (s)

Physical Testbed

NeST

(a) Link Utilization

0

20

40

60

80

100

0 10 20 30 40 50 60

Queue B

acklo

g (

Packets

)

Time (s)

Physical Testbed

NeST

(b) Queue Backlog

FIFO

0

20

40

60

80

100

120

0 10 20 30 40 50 60

Lin

k U

tilizati

on (

Mbit

/s)

Time (s)

Physical Testbed

NeST

(a) Link Utilization

0

200

400

600

800

1000

1200

1400

0 10 20 30 40 50 60Queue B

acklo

g (

Packets

)

Time (s)

Physical Testbed

NeST

(b) Queue Backlog

Applied Networking Research Workshop 2020 |

Page 11: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

8Experiment 2

MotivationHow does NeST perform in emulating and running experiments on a fairlycomplex topology?

Figure: Complex topology for NeST validation

Applied Networking Research Workshop 2020 |

Page 12: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

9Experiment 2: Plots

0

10

20

30

40

0 20 40 60 80 100 120

cwnd (

segm

ents

)

Time (s)

A(3)

Flow: 1Flow: 2Flow: 3

(a) cwnd: NeST

0

10

20

30

40

0 20 40 60 80 100 120

cwnd (

segm

ents

)

Time (s)

A(3)

Flow: 1Flow: 2Flow: 3

(b) cwnd: Flent

0

10

20

30

40

0 20 40 60 80 100 120Thro

ughput

(Mbit

/s)Time (s)

A(3)

Flow: 1Flow: 2Flow: 3

(a) Throughput: NeST

0

10

20

30

40

0 20 40 60 80 100 120

Thro

ughput

(Mbit

/s)

Time (s)

A(3)

Flow: 1Flow: 2Flow: 3

(b) Throughput: Flent

0

10

20

30

40

0 20 40 60 80 100 120

Round-T

rip T

ime (

ms)

Time (s)

A(3)

Flow: 1Flow: 2Flow: 3

(a) RTT: NeST

0

10

20

30

40

0 20 40 60 80 100 120

Round-T

rip T

ime (

ms)

Time (s)

A(3)

Flow: 1Flow: 2Flow: 3

(b) RTT: Flent

Applied Networking Research Workshop 2020 |

Page 13: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

9Experiment 2: Plots

0

20

40

60

80

100

0 20 40 60 80 100 120

Lin

k U

tilizati

on (

Mbit

/s)

Time (s)

Router0

FlentNeST

(a) Link Utilization: Router0

0

50

100

150

200

0 20 40 60 80 100 120

Lin

k U

tilizati

on (

Mbit

/s)

Time (s)

Router1

FlentNeST

(b) Link Utilization: Router1

0

50

100

150

200

0 20 40 60 80 100 120

Lin

k U

tilizati

on (

Mbit

/s)

Time (s)

Router3

FlentNeST

(c) Link Utilization: Router3

To view other plots, please check: https://gitlab.com/nitk-nest/nest-anrw20

Applied Networking Research Workshop 2020 |

Page 14: NeST: Network Stack Tester2 NeST: Network Stack Tester I Python package to simplify the process of network experimentation by using Linux network namespaces I Intuitive APIs to: build

10Epilogue

I NeST can be obtained from PyPI (Python Package Index)I NeST is open source software. Contributions are welcome.I Website: https://nitk-nest.github.io/

Contact us:Shanthanu S [email protected]

Narayan [email protected]

Dhanasekhar [email protected]

Leslie [email protected]

Mohit P. Tahilianitahiliani

@nitk.edu.in

Applied Networking Research Workshop 2020 |