Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
lpi2:routing [2024/04/15 04:16] ingo_wichmann [5 Routen] |
lpi2:routing [2024/04/27 06:49] ingo_wichmann |
||
---|---|---|---|
Zeile 5: | Zeile 5: | ||
ip netns add b2 | ip netns add b2 | ||
ip netns add c | ip netns add c | ||
+ | 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 | ||
ip link add a-b2 type veth peer name b2-a | ip link add a-b2 type veth peer name b2-a | ||
Zeile 10: | Zeile 11: | ||
ip link add b1-c type veth peer name c-b1 | ip link add b1-c type veth peer name c-b1 | ||
ip link add b2-c type veth peer name c-b2 | ip link add b2-c type veth peer name c-b2 | ||
+ | ip link add c0 type dummy | ||
+ | ip link set dev a0 netns a | ||
ip link set dev a-b1 netns a | ip link set dev a-b1 netns a | ||
ip link set dev a-b2 netns a | ip link set dev a-b2 netns a | ||
Zeile 20: | Zeile 23: | ||
ip link set dev c-b1 netns c | ip link set dev c-b1 netns c | ||
ip link set dev c-b2 netns c | ip link set dev c-b2 netns c | ||
+ | ip link set dev c0 netns c | ||
+ | |||
+ | Terminal a: | ||
+ | ip netns exec a /bin/bash | ||
+ | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-a-:\w\$ " | ||
+ | sysctl -w 'net.ipv6.conf.all.forwarding=1' | ||
+ | ip link set up dev a0 | ||
+ | ip link set up dev a-b1 | ||
+ | ip link set up dev a-b2 | ||
+ | ip addr add fc0a::a/64 dev a0 | ||
+ | ip addr add fc01::a/64 dev a-b1 | ||
+ | ip addr add fc02::a/64 dev a-b2 | ||
+ | |||
+ | Terminal b1: | ||
+ | ip netns exec b1 /bin/bash | ||
+ | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-b1-:\w\$ " | ||
+ | sysctl -w 'net.ipv6.conf.all.forwarding=1' | ||
+ | ip link set up dev b1-a | ||
+ | ip link set up dev b1-b2 | ||
+ | ip link set up dev b1-c | ||
+ | ip addr add fc01::b1/64 dev b1-a | ||
+ | ip addr add fc03::b1/64 dev b1-b2 | ||
+ | ip addr add fc04::b1/64 dev b1-c | ||
+ | ping -qc1 fc01::a | ||
+ | |||
+ | Terminal b2: | ||
+ | ip netns exec b2 /bin/bash | ||
+ | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-b2-:\w\$ " | ||
+ | sysctl -w 'net.ipv6.conf.all.forwarding=1' | ||
+ | ip link set up dev b2-a | ||
+ | ip link set up dev b2-b1 | ||
+ | ip link set up dev b2-c | ||
+ | ip addr add fc02::b2/64 dev b2-a | ||
+ | ip addr add fc03::b2/64 dev b2-b1 | ||
+ | ip addr add fc05::b2/64 dev b2-c | ||
+ | ping -qc1 fc02::a | ||
+ | ping -qc1 fc03::b1 | ||
+ | |||
+ | Terminal c: | ||
+ | ip netns exec c /bin/bash | ||
+ | export PS1="${debian_chroot:+($debian_chroot)}\u@ns-c-:\w\$ " | ||
+ | sysctl -w 'net.ipv6.conf.all.forwarding=1' | ||
+ | ip link set up dev c-b1 | ||
+ | ip link set up dev c-b2 | ||
+ | ip link set up dev c0 | ||
+ | ip addr add fc04::c/64 dev c-b1 | ||
+ | ip addr add fc05::c/64 dev c-b2 | ||
+ | ip addr add fc0c::c/64 dev c0 | ||
+ | ping -qc1 fc04::b1 | ||
+ | ping -qc1 fc05::b2 | ||
+ | |||
====== 8 Routen ====== | ====== 8 Routen ====== | ||