Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
namespaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ISC3
vres
namespaces
Commits
9e447e4e
Verified
Commit
9e447e4e
authored
4 weeks ago
by
iliya.saroukha
Browse files
Options
Downloads
Patches
Plain Diff
fix: setting up correctly ns, still having an issue tho
parent
3df61eaa
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
report/report.qmd
+26
-9
26 additions, 9 deletions
report/report.qmd
with
26 additions
and
9 deletions
report/report.qmd
+
26
−
9
View file @
9e447e4e
...
...
@@ -48,9 +48,13 @@ ssh H1 ip route add default via 10.0.0.2
sleep 1
echo "======= H1 and R1: Installing tcpdump ======="
ssh H1 apt update
sleep 1
ssh H1 apt install -y tcpdump
sleep 1
ssh R1 apt update
sleep 1
ssh R1 apt install -y tcpdump
sleep 1
...
...
@@ -70,8 +74,7 @@ sleep 1
- Création de `ns-default` et `ns2` sur R1
```bash
ip net netns add ns-default
ip net netns add ns2
ip netns add ns2
```
- Création d'une paire d'interfaces virtuelles
...
...
@@ -83,11 +86,6 @@ ip link add default-veth0 type veth peer name ns2-veth0
- Assignation des interfaces virtuelles aux namespaces
```bash
ip link set default-veth0 netns ns-default
ip link set default-veth1 netns ns-default
```
```bash
ip link set ns2-veth0 netns ns2
ip link set ns2-veth1 netns ns2
...
...
@@ -96,11 +94,30 @@ ip link set ns2-veth1 netns ns2
- Configuration IP des interfaces virtuelles
```bash
ip netns exec ns-default
ip addr add 192.168.0.1/24 dev default-veth0
ip netns exec ns-default
ip addr add 192.168.1.1/24 dev default-veth1
ip addr add 192.168.0.1/24 dev default-veth0
ip addr add 192.168.1.1/24 dev default-veth1
```
```bash
ip netns exec ns2 ip addr add 192.168.0.2/24 dev ns2-veth0
ip netns exec ns2 ip addr add 192.168.1.2/24 dev ns2-veth1
```
- Upping the interfaces
```bash
ip link set dev default-veth0 up
ip link set dev default-veth1 up
```
```bash
ip netns exec ns2 ip link set dev ns2-veth0 up
ip netns exec ns2 ip link set dev ns2-veth1 up
```
- In `ns2` adding default route
```bash
ip netns exec ns2 ip r add default via 192.168.0.1
ip netns exec ns2 ip r add 10.0.0.0/24 via 192.168.1.1
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment