|
|
Zeile 50: |
Zeile 50: |
| </div> | | </div> |
|
| |
|
|
| |
| = TMP =
| |
| == Subnetze ==
| |
| ; Teilnetz
| |
| * Es fasst mehrere aufeinanderfolgende IP-Adressen mittels einer ''Subnetzmaske'' bei IPv4 zusammen
| |
| * Abtrennung erfolgt durch bitweise Maskierung eines Teils der IP-Adresses durch die ''Subnetzmaske''
| |
|
| |
| === Subnetzmaske ===
| |
| ; Gibt an, welche Bit der IP-Adresse Netzwerk- oder Hostanteil gehören
| |
| * <span style="color:green">Netzanteil</span> erstreckt sich lückenlos (ohne 0) von links nach rechts
| |
| * <span style="color:red">Hostanteil</span> erstreckt sich von rechts nach links
| |
|
| |
| {|
| |
| |
| |
| {|class="wikitable"
| |
| ! colspan="4"|Netzwerkteil
| |
| |-
| |
| | || IPv4-Adresse || <code>11000000.10101000.00000001.10000001</code> || <code>192.168.1.129</code>
| |
| |-
| |
| |AND|| Subnetzmaske || <code><span style="color:green">11111111.11111111.11111111.</span>00000000</code> || <code><span style="color:green">255.255.255.</span>0</code>
| |
| |-
| |
| | = || Netzadresse || <code><span style="color:green">11000000.10101000.00000001.</span>00000000</code> || <code><span style="color:green">192.168.1.</span>0</code>
| |
| |}
| |
| {|
| |
| |
| |
| {|class="wikitable"
| |
| ! colspan="4"|Geräteteil
| |
| |-
| |
| | || IPv4-Adresse || <code>11000000.10101000.00000001.10000001</code> || <code>192.168.1.129</code>
| |
| |-
| |
| |AND NOT|| Subnetzmaske || <code>00000000.00000000.00000000.<span style="color:red">11111111</span></code> || <code>0.0.0.<span style="color:red">255</span></code>
| |
| |-
| |
| | = || Hostadresse || <code>00000000.00000000.00000000.<span style="color:red">10000001</span></code> || <code>0.0.0.<span style="color:red">129</span></code>
| |
| |}
| |
| |}
| |
|
| |
| == CIDR-Notation ==
| |
| ; '''C'''lassless '''I'''nter-'''D'''omain '''R'''outing
| |
| Verfahren zur effizienteren Nutzung des Adressraumes von IPv4
| |
| * Feste Zuordnung einer IPv4-Adresse zu einer Netzklasse entfällt
| |
|
| |
| ; CIDR führt eine neue Notation ,''Suffixe'' (z.B. /24) ein.
| |
| * Das Suffix gibt die Anzahl der 1-Bit in der Netzmaske an.
| |
|
| |
| {| class="wikitable"
| |
| ! Dotted-Decimal-Notation
| |
| ! CIDR-Notation
| |
| |-
| |
| |172.17.0.0/255.255.128.0
| |
| |172.17.0.0/17
| |
| |}
| |
|
| |
| === Beispiele ===
| |
| ; IPv4-Adresse: 192.168.2.7'''/24'''
| |
| * Netzmaske
| |
| **'''255.255.255'''.0 (dezimale Schreibweise)
| |
| ** '''11111111'''.'''11111111'''.'''11111111'''.00000000 (duale Schreibweise)
| |
| * '''3 · 8 = 24''' gesetzte Bit, wie im CIDR-Suffix ('''/24''') angegeben
| |
|
| |
| ; IPv4-Adresse: 10.43.8.67'''/28'''
| |
| *Netzmaske
| |
| ** '''255.255.255.240'''
| |
| ** '''11111111'''.'''11111111'''.'''11111111'''.'''1111'''0000
| |
| * '''3 · 8 + 4 = 28''' gesetzte Bit, wie im Suffix angegeben
| |
|
| |
| == Subnet-Berechnung==
| |
| Beispiel: 192.168.11.54/24 soll in mind. 20 Subnetze geteilt werden
| |
|
| |
| ===Subnetzmaske in Bit-Form umwandeln===
| |
| # 24 = 255.255.255.0 = 3*8
| |
| # 1111 1111.1111 1111.1111 1111.0000 0000
| |
|
| |
| ===Netzwerkadresse ermitteln durch &-Operation===
| |
| {|class="wikitable"
| |
| | ||<code>IP-Adresse</code> ||<code><span style="color:green">1100 0000.1010 1000.0000 1011</span>.<span style="color:red">0011 0110</span></code>||<code><span style="color:green">192.168.11</span>.<span style="color:red">54</span></code>
| |
| |-
| |
| | & ||<code>Subnetzmaske</code>||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:red">0000 0000</span></code>||<code>255.255.255.0</code>
| |
| |-
| |
| | = ||<code>Netzwerkadresse</code>||<code><span style="color:green">1100 0000.1010 1000.0000 1011</span>.<span style="color:red">0000 0000</span></code>||<code><span style="color:green">192.168.11</span>.<span style="color:red">0</span></code>
| |
| |}
| |
|
| |
| ===2-er Potenz===
| |
| {|class="wikitable"
| |
| |+ 2-er Potenz-Tabelle
| |
| |-
| |
| | 2<sup>0</sup> || 2<sup>1</sup> || 2<sup>2</sup> || 2<sup>3</sup> || 2<sup>4</sup> || 2<sup>5</sup> || 2<sup>6</sup> || 2<sup>7</sup> || 2<sup>8</sup> || 2<sup>9</sup> || 2<sup>10</sup>
| |
| |-
| |
| | 1 || 2 || 4 || 8 || 16 || 32 || 64 || 128 || 256 || 512 || 1024
| |
| |}
| |
| #Von der gesuchten Anzahl die nächstgrößere 2-er Potenz heraussuchen
| |
| #20 Subnetze -> 2<sup>5</sup> = 32
| |
| #32 in Bit-Form umwandeln und 1 abziehen
| |
| #31 = <span style="color:lime">1 1111</span>
| |
|
| |
| ===Subnet-Bit an die Subnetzmaske anhängen===
| |
| {|class="wikitable"
| |
| | Vorher || <span style="color:green">1111 1111.1111 1111.1111 1111</span>.<span style="color:red">0000 0000</span> || 255.255.255.0
| |
| |-
| |
| | Nachher || <span style="color:green">1111 1111.1111 1111.1111 1111</span>.<span style="color:lime">1111 1</span><span style="color:red">000</span> || 255.255.255.248
| |
| |}
| |
|
| |
| ===IP-Ranges herausfinden===
| |
| *Erste Adresse im Subnetz ist die Netzadresse.
| |
| *Letzte Adresse ist als Broadcast-Adresse definiert.
| |
| *Die Host-IP-Adressen gehen von Netzadresse + 1 bis Broadcast – 1.
| |
| *Diese Adressen können nicht für Host-Computer verwendet werden.
| |
|
| |
| {|class="wikitable"
| |
| ! Subnetz !! Subnetzmaske !! Netzadresse !! Host-Adressen !! Broadcast
| |
| |-
| |
| | 1 ||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:lime">0000 0</span><span style="color:red">000</span> || <code><span style="color:green">192.168.11</span>.<span style="color:lime">0</span>/29 || <code>192.168.11.<span style="color:red">1</span> - 192.168.11.<span style="color:red">6</span> || <code>192.168.11.<span style="color:red">7</span>/29
| |
| |-
| |
| | 2 ||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:lime">0000 1</span><span style="color:red">000</span> || <code><span style="color:green">192.168.11</span>.<span style="color:lime">8</span>/29 || <code>192.168.11.<span style="color:red">9</span> - 192.168.11.<span style="color:red">14</span> || <code>192.168.11.<span style="color:red">15</span>/29
| |
| |-
| |
| | 3 ||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:lime">0001 0</span><span style="color:red">000</span> || <code><span style="color:green">192.168.11</span>.<span style="color:lime">16</span>/29 || <code>192.168.11.<span style="color:red">17</span> - 192.168.11.<span style="color:red">22</span> || <code>192.168.11.<span style="color:red">23</span>/29
| |
| |-
| |
| | 10 ||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:lime">0100 1</span><span style="color:red">000</span> || <code><span style="color:green">192.168.11</span>.<span style="color:lime">72</span>/29 || <code>192.168.11.<span style="color:red">73</span> - 192.168.11.<span style="color:red">78</span> || <code>192.168.11.<span style="color:red">79</span>/29
| |
| |-
| |
| | 20 ||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:lime">1001 1</span><span style="color:red">000</span> || <code><span style="color:green">192.168.11</span>.<span style="color:lime">152</span>/29 || <code>192.168.11.<span style="color:red">153</span> - 192.168.11.<span style="color:red">158</span> || <code>192.168.11.<span style="color:red">159</span>/29
| |
| |}
| |
|
| |
| ===Zusammenfassung===
| |
|
| |
| {|class="wikitable"
| |
| |-
| |
| !Schritt !! Beschreibung
| |
| |-
| |
| |1. ||
| |
| *Subnetzmaske in Bitform umwandeln
| |
| **255.255.255.0 = 11111111.11111111.11111111.00000000
| |
| |-
| |
| |2. ||
| |
| *&-Operation ausführen
| |
| *Netzwerkadresse herausfinden
| |
| |-
| |
| |3. ||
| |
| *Von der gesuchten Anzahl die nächstgrößere 2-er Potenz heraussuchen
| |
| *2-er Potenz in Bit umwandeln und 1 abziehen
| |
| |-
| |
| |4. ||
| |
| *Bit an die Subnetzmaske anhängen
| |
| |-
| |
| |5. ||
| |
| *IP-Ranges aufschreiben
| |
| {| class="wikitable"
| |
| |-
| |
| !Subnetz !! IP-Range
| |
| |-
| |
| |Netz 1 ||192.168.0.0 – 192.168.0.7
| |
| |-
| |
| |Netz 2 || 192.168.0.8 – 192.168.0.15
| |
| |-
| |
| |Netz 3 || 192.168.0.16 – 192.168.0.23
| |
| |-
| |
| |Netz 20 || 192.168.0. – 172.30.255.255
| |
| |}
| |
| |}
| |
|
| |
| ----
| |
|
| |
| ===Anzahl bestimmter Hosts===
| |
| *Dasselbe Netz soll aufgeteilt, sodass 100 Hosts passen
| |
| *Vorgehen ähnlich wie die Schritte 3.1 - 3.6
| |
| *Nur zeigen die Bit an, wieviele Nullen vom <span style="color:red">Hostanteil</span> übrigbleiben sollen
| |
|
| |
| #Von der gesuchten Anzahl die nächstgrößere 2-er Potenz heraussuchen
| |
| #100 Hosts -> 2<sup>7</sup> = 128
| |
| #128 in Bit-Form umwandeln und 1 abziehen
| |
| #127 = <span style="color:lime">111 1111</span>
| |
|
| |
| {|class="wikitable"
| |
| | Vorher || <span style="color:green">1111 1111.1111 1111.1111 1111</span>.<span style="color:red">0000 0000</span> || 255.255.255.0
| |
| |-
| |
| | Nachher || <span style="color:green">1111 1111.1111 1111.1111 1111</span>.<span style="color:lime">1</span><span style="color:red">000 0000</span> || 255.255.255.128
| |
| |}
| |
|
| |
| *Dann wie bei Kapitel 3.5 die IP-Ranges herausfinden
| |
|
| |
| {|class="wikitable"
| |
| ! Subnetz !! Subnetzmaske !! Netzadresse !! Host-Adressen !! Broadcast
| |
| |-
| |
| | 1 ||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:lime">0</span><span style="color:red">000 0000</span> || <code><span style="color:green">192.168.11</span>.<span style="color:lime">0</span>/25 || <code>192.168.11.<span style="color:red">1</span> - 192.168.11.<span style="color:red">126</span> || <code>192.168.11.<span style="color:red">127</span>/25
| |
| |-
| |
| | 2 ||<code><span style="color:green">1111 1111.1111 1111.1111 1111.</span><span style="color:lime">1</span><span style="color:red">000 0000</span> || <code><span style="color:green">192.168.11</span>.<span style="color:lime">128</span>/25 || <code>192.168.11.<span style="color:red">129</span> - 192.168.11.<span style="color:red">245</span> || <code>192.168.11.<span style="color:red">255</span>/25
| |
| |}
| |
|
| |
| Weitere Beispiele und Aufgaben sind in der [[Netzwerke:IPv4/Subnetting:Aufgaben|Aufgabenseite]] zu finden.
| |
|
| |
| ==Übersicht für IPv4==
| |
|
| |
| Allgemein gilt:
| |
| * Anzahl der IPv4-Adressen = 2<sup>32 - Länge der Netzadresse</sup>
| |
| * Erste und letzte IPv4-Adresse ist reserviert für Netzwerk- bzw. Broadcast-Adresse
| |
|
| |
| {| class="wikitable"
| |
| !Notation
| |
| !Anzahl der Adressen
| |
| !Nutzbare<br />Host-Adressen
| |
| !Subnetzmaske<br />dezimal
| |
| !Subnetzmaske<br />binär
| |
| !Kommentar
| |
| |-
| |
| |/0
| |
| |4.294.967.296
| |
| |– <ref group="Anm." name="0-7" />
| |
| |0.0.0.0
| |
| |<code><span style="color:#bbb">00000000.00000000.00000000.00000000</span></code>
| |
| | Vollständiger IPv4-Adressraum
| |
| |-
| |
| |/1
| |
| |2.147.483.648
| |
| |–
| |
| |128.0.0.0
| |
| |<code>1<span style="color:#bbb">0000000.00000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/2
| |
| |1.073.741.824
| |
| |–
| |
| |192.0.0.0
| |
| |<code>11<span style="color:#bbb">000000.00000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/3
| |
| |536.870.912
| |
| |–
| |
| |224.0.0.0
| |
| |<code>111<span style="color:#bbb">00000.00000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/4
| |
| |268.435.456
| |
| |–
| |
| |240.0.0.0
| |
| |<code>1111<span style="color:#bbb">0000.00000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/5
| |
| |134.217.728
| |
| |–
| |
| |248.0.0.0
| |
| |<code>11111<span style="color:#bbb">000.00000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/6
| |
| |67.108.864
| |
| |–
| |
| |252.0.0.0
| |
| |<code>111111<span style="color:#bbb">00.00000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/7
| |
| |33.554.432
| |
| |–
| |
| |254.0.0.0
| |
| |<code>1111111<span style="color:#bbb">0.00000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/8
| |
| |16.777.216
| |
| |16.777.214
| |
| |255.0.0.0
| |
| |<code>11111111.<span style="color:#bbb">00000000.00000000.00000000</span></code>
| |
| |„Class A“-Größe
| |
| |-
| |
| |/9
| |
| |8.388.608 (128x65.536)
| |
| |8.388.606
| |
| |255.128.0.0
| |
| |<code>11111111.1<span style="color:#bbb">0000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/10
| |
| |4.194.304 (64x65.536)
| |
| |4.194.302
| |
| |255.192.0.0
| |
| |<code>11111111.11<span style="color:#bbb">000000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/11
| |
| |2.097.152 (32x65.536)
| |
| |2.097.150
| |
| |255.224.0.0
| |
| |<code>11111111.111<span style="color:#bbb">00000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/12
| |
| |1.048.576 (16x65.536)
| |
| |1.048.574
| |
| |255.240.0.0
| |
| |<code>11111111.1111<span style="color:#bbb">0000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/13
| |
| |524.288 (8x65.536)
| |
| |524.286
| |
| |255.248.0.0
| |
| |<code>11111111.11111<span style="color:#bbb">000.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/14
| |
| |262.144 (4x65.536)
| |
| |262.142
| |
| |255.252.0.0
| |
| |<code>11111111.111111<span style="color:#bbb">00.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/15
| |
| |131.072 (2x65.536)
| |
| |131.070
| |
| |255.254.0.0
| |
| |<code>11111111.1111111<span style="color:#bbb">0.00000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/16
| |
| |65.536 (1x65.536)
| |
| |65.534
| |
| |255.255.0.0
| |
| |<code>11111111.11111111.<span style="color:#bbb">00000000.00000000</span></code>
| |
| |„Class B“-Größe
| |
| |-
| |
| |/17
| |
| |32.768 (128x256)
| |
| |32.766
| |
| |255.255.128.0
| |
| |<code>11111111.11111111.1<span style="color:#bbb">0000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/18
| |
| |16.384 (64x256)
| |
| |16.382
| |
| |255.255.192.0
| |
| |<code>11111111.11111111.11<span style="color:#bbb">000000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/19
| |
| |8.192 (32x256)
| |
| |8.190
| |
| |255.255.224.0
| |
| |<code>11111111.11111111.111<span style="color:#bbb">00000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/20
| |
| |4.096 (16x256)
| |
| |4.094
| |
| |255.255.240.0
| |
| |<code>11111111.11111111.1111<span style="color:#bbb">0000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/21
| |
| |2.048 (8x256)
| |
| |2.046
| |
| |255.255.248.0
| |
| |<code>11111111.11111111.11111<span style="color:#bbb">000.00000000</span></code>
| |
| |
| |
| |-
| |
| |/22
| |
| |1.024 (4x256)
| |
| |1.022
| |
| |255.255.252.0
| |
| |<code>11111111.11111111.111111<span style="color:#bbb">00.00000000</span></code>
| |
| |
| |
| |-
| |
| |/23
| |
| |512 (2x256)
| |
| |510
| |
| |255.255.254.0
| |
| |<code>11111111.11111111.1111111<span style="color:#bbb">0.00000000</span></code>
| |
| |
| |
| |-
| |
| |/24
| |
| |256 (1x256)
| |
| |254
| |
| |255.255.255.0
| |
| |<code>11111111.11111111.11111111.<span style="color:#bbb">00000000</span></code>
| |
| |„Class C“-Größe
| |
| |-
| |
| |/25
| |
| |128 (128x1)
| |
| |126
| |
| |255.255.255.128
| |
| |<code>11111111.11111111.11111111.1<span style="color:#bbb">0000000</span></code>
| |
| |
| |
| |-
| |
| |/26
| |
| |64 (64x1)
| |
| |62
| |
| |255.255.255.192
| |
| |<code>11111111.11111111.11111111.11<span style="color:#bbb">000000</span></code>
| |
| |
| |
| |-
| |
| |/27
| |
| |32 (32x1)
| |
| |30
| |
| |255.255.255.224
| |
| |<code>11111111.11111111.11111111.111<span style="color:#bbb">00000</span></code>
| |
| |
| |
| |-
| |
| |/28
| |
| |16 (16x1)
| |
| |14
| |
| |255.255.255.240
| |
| |<code>11111111.11111111.11111111.1111<span style="color:#bbb">0000</span></code>
| |
| |
| |
| |-
| |
| |/29
| |
| |8 (8x1)
| |
| |6
| |
| |255.255.255.248
| |
| |<code>11111111.11111111.11111111.11111<span style="color:#bbb">000</span></code>
| |
| |
| |
| |-
| |
| |/30
| |
| |4 (4x1)
| |
| |2
| |
| |255.255.255.252
| |
| |<code>11111111.11111111.11111111.111111<span style="color:#bbb">00</span></code>
| |
| |Verbindungsnetz zwischen zwei Routern
| |
| |-
| |
| |/31
| |
| |2 (2x1)
| |
| |0 (2) <ref group="Anm." name="31-32" />
| |
| |255.255.255.254
| |
| |<code>11111111.11111111.11111111.1111111<span style="color:#bbb">0</span></code>
| |
| |Verbindungsnetz zwischen zwei Routern
| |
| |-
| |
| |/32
| |
| |1 (1x1)
| |
| |0 (1) <ref group="Anm." name="31-32" />
| |
| |255.255.255.255
| |
| |<code>11111111.11111111.11111111.11111111</code>
| |
| |einzelner Host
| |
| |}
| |
|
| |
| <references group="Anm.">
| |
| <ref name="0-7">Adressbereiche der Größe ''/0'' bis ''/7'' werden in der Praxis nicht als einzelnes Subnetz verwendet, sondern in mehrere Subnetze unterteilt.</ref>
| |
| <ref name="31-32">'' /31''-Netze enthalten keine nutzbaren Host-Adressen, während ''/32'' kein Subnetz, sondern immer einen einzelnen Host adressiert. Hierbei gibt es auch Ausnahmen. So wurde im RFC 3021 vorgeschlagen, dass ''/31''-Netze genutzt werden, um Point-to-point-Verbindungen zu etablieren. Dies wurde unter anderem von der Firma Cisco implementiert. Des Weiteren ist es unter bestimmten Umständen möglich, die Netz- und Broadcastadresse für Hosts zu verwenden.</ref>
| |
| </references>
| |
|
| |
|
| [[Kategorie:IPv4]] | | [[Kategorie:IPv4]] |