Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: basic_sysctl #32

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions examples/basic_sysctl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# sysctl example
```
tinet up | sh

tinet test all | sh
echo R1 sysctl state
docker exec R1 sysctl net.ipv4.ip_forward
docker exec R1 sysctl net.ipv4.ip_forward_use_pmtu
docker exec R1 sysctl net.ipv6.conf.all.forwarding
docker exec R1 sysctl net.ipv6.conf.all.disable_ipv6
echo R2 sysctl state
docker exec R2 sysctl net.ipv4.ip_forward
docker exec R2 sysctl net.ipv4.ip_forward_use_pmtu
docker exec R2 sysctl net.ipv6.conf.all.forwarding
docker exec R2 sysctl net.ipv6.conf.all.disable_ipv6
```
36 changes: 36 additions & 0 deletions examples/basic_sysctl/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

nodes:
- name: R1
image: slankdev/ubuntu:18.04
interfaces:
- { name: net0, type: direct, args: R2#net0 }
sysctls:
- { sysctl: net.ipv4.ip_forward=1 }
- { sysctl: net.ipv4.ip_forward_use_pmtu=1 }
- { sysctl: net.ipv6.conf.all.forwarding=1 }
- { sysctl: net.ipv6.conf.all.disable_ipv6=1 }

- name: R2
image: slankdev/ubuntu:18.04
interfaces:
- { name: net0, type: direct, args: R1#net0 }
sysctls:
- { sysctl: net.ipv4.ip_forward=0 }
- { sysctl: net.ipv4.ip_forward_use_pmtu=0 }
- { sysctl: net.ipv6.conf.all.forwarding=0 }
- { sysctl: net.ipv6.conf.all.disable_ipv6=0 }

test:
- name: all
cmds:
- cmd: echo R1 sysctl state
- cmd: docker exec R1 sysctl net.ipv4.ip_forward
- cmd: docker exec R1 sysctl net.ipv4.ip_forward_use_pmtu
- cmd: docker exec R1 sysctl net.ipv6.conf.all.forwarding
- cmd: docker exec R1 sysctl net.ipv6.conf.all.disable_ipv6
- cmd: echo R2 sysctl state
- cmd: docker exec R2 sysctl net.ipv4.ip_forward
- cmd: docker exec R2 sysctl net.ipv4.ip_forward_use_pmtu
- cmd: docker exec R2 sysctl net.ipv6.conf.all.forwarding
- cmd: docker exec R2 sysctl net.ipv6.conf.all.disable_ipv6