Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
lpi2:routing [2024/04/27 07:07] ingo_wichmann |
lpi2:routing [2024/04/27 13:00] ingo_wichmann |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== 5 Routen ====== | ====== 5 Routen ====== | ||
{{ :lpi2:routing5.svg |}} | {{ :lpi2:routing5.svg |}} | ||
+ | ===== "Router" anlegen ===== | ||
ip netns add a | ip netns add a | ||
ip netns add b1 | ip netns add b1 | ||
ip netns add b2 | ip netns add b2 | ||
ip netns add c | ip netns add c | ||
+ | ===== "Kabel" verlegen ===== | ||
ip link add a0 type dummy | ip link add a0 type dummy | ||
ip link add a-b1 type veth peer name b1-a | ip link add a-b1 type veth peer name b1-a | ||
Zeile 25: | Zeile 27: | ||
ip link set dev c0 netns c | ip link set dev c0 netns c | ||
- | Terminal a: | + | ===== Terminal a konfigurieren ===== |
ip netns exec a /bin/bash | ip netns exec a /bin/bash | ||
export PS1="${debian_chroot:+($debian_chroot)}\u@ns-a-:\w\$ " | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-a-:\w\$ " | ||
Zeile 35: | Zeile 37: | ||
ip addr add fc01::a/64 dev a-b1 | ip addr add fc01::a/64 dev a-b1 | ||
ip addr add fc02::a/64 dev a-b2 | ip addr add fc02::a/64 dev a-b2 | ||
+ | |||
+ | Prüfen: | ||
ip -6 -c addr show | ip -6 -c addr show | ||
- | Terminal b1: | + | ===== Terminal b1 konfigurieren ===== |
ip netns exec b1 /bin/bash | ip netns exec b1 /bin/bash | ||
export PS1="${debian_chroot:+($debian_chroot)}\u@ns-b1-:\w\$ " | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-b1-:\w\$ " | ||
Zeile 47: | Zeile 51: | ||
ip addr add fc03::b1/64 dev b1-b2 | ip addr add fc03::b1/64 dev b1-b2 | ||
ip addr add fc04::b1/64 dev b1-c | ip addr add fc04::b1/64 dev b1-c | ||
+ | |||
+ | Prüfen: | ||
ip -6 -c addr show | ip -6 -c addr show | ||
ip -6 -c route show | ip -6 -c route show | ||
ping -qc1 fc01::a | ping -qc1 fc01::a | ||
- | Terminal b2: | + | ===== Terminal b2 konfigurieren ===== |
ip netns exec b2 /bin/bash | ip netns exec b2 /bin/bash | ||
export PS1="${debian_chroot:+($debian_chroot)}\u@ns-b2-:\w\$ " | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-b2-:\w\$ " | ||
Zeile 61: | Zeile 67: | ||
ip addr add fc03::b2/64 dev b2-b1 | ip addr add fc03::b2/64 dev b2-b1 | ||
ip addr add fc05::b2/64 dev b2-c | ip addr add fc05::b2/64 dev b2-c | ||
+ | |||
+ | Prüfen: | ||
ip -6 -c addr show | ip -6 -c addr show | ||
ip -6 -c route show | ip -6 -c route show | ||
Zeile 66: | Zeile 74: | ||
ping -qc1 fc03::b1 | ping -qc1 fc03::b1 | ||
- | Terminal c: | + | ===== Terminal c konfigurieren ===== |
ip netns exec c /bin/bash | ip netns exec c /bin/bash | ||
export PS1="${debian_chroot:+($debian_chroot)}\u@ns-c-:\w\$ " | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-c-:\w\$ " | ||
Zeile 76: | Zeile 84: | ||
ip addr add fc05::c/64 dev c-b2 | ip addr add fc05::c/64 dev c-b2 | ||
ip addr add fc0c::c/64 dev c0 | ip addr add fc0c::c/64 dev c0 | ||
+ | |||
+ | Prüfen: | ||
ip -6 -c addr show | ip -6 -c addr show | ||
ip -6 -c route show | ip -6 -c route show |