IP6: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
= Links = | = Links = | ||
* https://mirrors.bieringer.de/Linux+IPv6-HOWTO-de/x494.html | |||
* [https://danrl.com/projects/ipv6-workshop/Dan%20L%C3%BCdtke%20-%20IPv6-Workshop%20[Dritte%20Auflage].pdf] | * [https://danrl.com/projects/ipv6-workshop/Dan%20L%C3%BCdtke%20-%20IPv6-Workshop%20[Dritte%20Auflage].pdf] | ||
Zeile 10: | Zeile 11: | ||
* scope link: nur lokal ansprechbar: fe80:* | * scope link: nur lokal ansprechbar: fe80:* | ||
* scope global: global ansprechbar: 2xxx:* | * scope global: global ansprechbar: 2xxx:* | ||
* Unique Local IPv6 Unicast: fdxx: | |||
* Abgekündigt: Site-lokale Adresse: fecx: | |||
* automatisch erzeugte Adresse: | |||
** Host-Anteil (hintere 64 Bit): wird aus MAC-Adresse gebildet: MAC=00:10:a4:01:23:45 -> 0210:a4ff:fe01:2345 | |||
<pre> | <pre> | ||
ip addr | ip addr | ||
Zeile 21: | Zeile 27: | ||
valid_lft forever preferred_lft forever | valid_lft forever preferred_lft forever | ||
</pre> | </pre> | ||
= Kommandos = | |||
<syntaxhighlight lang="bash"> | |||
ip link set dev eth0 up | |||
ip link set dev eth0 down | |||
ip -6 addr show dev enp2s0 | |||
# Hinzufügen einer Adresse: | |||
ip -6 addr add <ipv6address>/<prefixlength> dev <interface> | |||
ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0 | |||
# Entfernen: | |||
ip -6 addr del <ipv6address>/<prefixlength> dev <interface> | |||
ip -6 addr del 2001:0db8:0:f101::1/64 dev eth0 | |||
# Routing | |||
ip -6 route show [dev <device>] | |||
ip -6 route add <ipv6network>/<prefixlength> via <ipv6address> | |||
ip -6 route add <ipv6network>/<prefixlength> via [dev <device>] | |||
ip -6 route add default via 2001:0db8:0:f101::1 | |||
ip -6 route add default dev eth0 metric 1 | |||
ip -6 route del default via 2001:0db8:0:f101::1 | |||
ip -6 route del default dev eth0 | |||
# Nachbarn ermitteln: | |||
ip -6 neigh show | |||
ip -6 neigh add <IPv6 address> lladdr <link-layer address> dev <device> | |||
ip -6 neigh add fec0::1 lladdr 02:01:02:03:04:05 dev eth0 | |||
ip -6 neigh del fec0::1 lladdr 02:01:02:03:04:05 dev eth0 | |||
# | |||
ip addrlabel | |||
# Tunnel anzeigen: | |||
ip -6 tunnel show [<device>] | |||
</syntaxhighlight> | |||
= Tools = | = Tools = | ||
Zeile 32: | Zeile 68: | ||
= Globale Addressierung konfigurieren = | = Globale Addressierung konfigurieren = | ||
* Provider vergibt Präfix, z.B. 2a02:c207:0001:1691:0000:0000:0000:0001/64 | * Provider vergibt Präfix, z.B. 2a02:c207:0001:1691:0000:0000:0000:0001/64 | ||
* kurz: 2a02:c207:0001:1691::1 | |||
== Basishost ("Router") == | |||
* Temporär | |||
<pre>ip addr add 2a02:c207:0001:1691::1/64 dev eno1 | |||
ip route add default via fe80::1 dev eno1 | |||
</pre> | |||
* /etc/network/interfaces | * /etc/network/interfaces | ||
<pre>iface eno1 inet6 static | <pre>iface eno1 inet6 static | ||
Zeile 42: | Zeile 85: | ||
</pre> | </pre> | ||
== VM oder Intranet == | |||
* Temporär | |||
<pre>ip addr add 2a02:c207:0001:1691:2:04/64 dev eno1 | |||
ip route add default via 2a02:c207:0001:1691::1 dev eno1 | |||
</pre> | |||
== Sonstiges == | |||
* /etc/radvd.conf | * /etc/radvd.conf | ||
<pre>interface eth1 { | <pre>interface eth1 { |
Aktuelle Version vom 16. September 2022, 17:47 Uhr
Links[Bearbeiten]
Begriffe[Bearbeiten]
- Link: Entität, die IP6-Adresse haben kann, z.B. Interface
Adressen[Bearbeiten]
- scope link: nur lokal ansprechbar: fe80:*
- scope global: global ansprechbar: 2xxx:*
- Unique Local IPv6 Unicast: fdxx:
- Abgekündigt: Site-lokale Adresse: fecx:
- automatisch erzeugte Adresse:
- Host-Anteil (hintere 64 Bit): wird aus MAC-Adresse gebildet: MAC=00:10:a4:01:23:45 -> 0210:a4ff:fe01:2345
ip addr 2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8c:16:45:92:9a:c6 brd ff:ff:ff:ff:ff:ff inet 192.168.2.106/24 brd 192.168.2.255 scope global dynamic noprefixroute enp2s0 valid_lft 315350808sec preferred_lft 315350808sec inet6 2003:f2:6702:6800:9874:3612:5ea4:128c/64 scope global dynamic noprefixroute valid_lft 7129sec preferred_lft 1729sec inet6 fe80::d678:f5c8:cbd7:b8ee/64 scope link noprefixroute valid_lft forever preferred_lft forever
Kommandos[Bearbeiten]
ip link set dev eth0 up
ip link set dev eth0 down
ip -6 addr show dev enp2s0
# Hinzufügen einer Adresse:
ip -6 addr add <ipv6address>/<prefixlength> dev <interface>
ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0
# Entfernen:
ip -6 addr del <ipv6address>/<prefixlength> dev <interface>
ip -6 addr del 2001:0db8:0:f101::1/64 dev eth0
# Routing
ip -6 route show [dev <device>]
ip -6 route add <ipv6network>/<prefixlength> via <ipv6address>
ip -6 route add <ipv6network>/<prefixlength> via [dev <device>]
ip -6 route add default via 2001:0db8:0:f101::1
ip -6 route add default dev eth0 metric 1
ip -6 route del default via 2001:0db8:0:f101::1
ip -6 route del default dev eth0
# Nachbarn ermitteln:
ip -6 neigh show
ip -6 neigh add <IPv6 address> lladdr <link-layer address> dev <device>
ip -6 neigh add fec0::1 lladdr 02:01:02:03:04:05 dev eth0
ip -6 neigh del fec0::1 lladdr 02:01:02:03:04:05 dev eth0
#
ip addrlabel
# Tunnel anzeigen:
ip -6 tunnel show [<device>]
Tools[Bearbeiten]
ip neighbor show 10.10.10.1 dev ens18 lladdr 02:63:14:3c:51:cb REACHABLE fe80::dc82:96ff:fe7a:34ba dev ens18 lladdr 02:63:14:3c:51:cb STALE ip link show dev e
Globale Addressierung konfigurieren[Bearbeiten]
- Provider vergibt Präfix, z.B. 2a02:c207:0001:1691:0000:0000:0000:0001/64
- kurz: 2a02:c207:0001:1691::1
Basishost ("Router")[Bearbeiten]
- Temporär
ip addr add 2a02:c207:0001:1691::1/64 dev eno1 ip route add default via fe80::1 dev eno1
- /etc/network/interfaces
iface eno1 inet6 static address 2a02:c207:0001:1691::1 netmask 64 gateway fe80::1 accept_ra 0 autoconf 0 privext 0
VM oder Intranet[Bearbeiten]
- Temporär
ip addr add 2a02:c207:0001:1691:2:04/64 dev eno1 ip route add default via 2a02:c207:0001:1691::1 dev eno1
Sonstiges[Bearbeiten]
- /etc/radvd.conf
interface eth1 { AdvSendAdvert on; MinRtrAdvInterval 15; prefix 2a02:c207:0001:1691:0000:0000:0000:0001; };
- Installation Daemon (braucht obige Konfigurationsdatei)
apt-get install radvd