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
0885a4d4
Verified
Commit
0885a4d4
authored
1 month ago
by
iliya.saroukha
Browse files
Options
Downloads
Patches
Plain Diff
wip: setting up veth
parent
3c789d30
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
+42
-0
42 additions, 0 deletions
report/report.qmd
with
42 additions
and
0 deletions
report/report.qmd
+
42
−
0
View file @
0885a4d4
...
...
@@ -62,3 +62,45 @@ sleep 1
ssh R1 ./r1_nat.ruleset
sleep 1
```
## Routeur virtuel routé
### Préparation
- Création de `ns-default` et `ns2` sur R1
```bash
ip net netns add ns-default
ip net netns add ns2
```
- Création d'une paire d'interfaces virtuelles
```bash
ip link add default-veth1 type veth peer name ns2-veth1
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
```
- 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
```
```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
```
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