Karteikarten
IPv4 and IPv6 Network Layer

Karten in diesem Stapel (52)
- 1SummaryRouting Protocols:
Path Selection
RIP, OSPF, BGP
v
Forwarding Table
v
ICMP Protcol (Error messaging, router signalling)
v
IP protocol
addressing conventions
datagram format
packet handeling conventions - 2IPv4 addressing32-bit identifier for host, router interface. Consists of network and host part.
All devices on same network have same network part i.e
host A: 223.1.14.5
host B: 223.1.17.7 - 3InterfaceConnection between host and router on a physical link
Routers have multiple interfaces, each with own address (hosts too) - 4How to find networksDetach each interface from router/host and create island of isolated networks

- 5CLASSFUL IP AddressingA: 1.0.0.0 - 127.255.255.255 8 bits
B: 128.0.0.0 - 191.255.255.255 16 bits
C: 192.0.0.0 - 223.255.255.255 24 bits
D: 224.0.0.0 - 239.255.255.255
DIS: Inefficient use of address space as often classes are too far between to be successfully applied to network e.g. class B net allows enough addressing for 65k hosts, even if only 2k hosts in network - 6CIDR Classless Inter Domain RoutingNetwork portion of address arbitrary length
address format: a.b.c.d/x where x is number of bits in network
-BLOCKS used when allocating IP addresses for a company/routing table
e.g.
CIDR block prefix: /27 -> # hosts: 32 - 7Difference in assigningAssume ISP owns address block 206.0.64.0/18 {16384 addresses}
Suppose client requires 800 host addresses
With classful: need to assign class B address (waste 64700 addresses), or four individual class C's (and introduce 4 new routes into global routing table)
OR
With CIDR: assign a /22 block and allocate a bloc of 1024 addresses - 8How to get IPHow does HOST get IP?
-Hard coded by system admin in a file
-DHCP: Dynamic Host Configuration Protocol - dynamically get address from a server
How does network get IP?
Gets allocated portion of its providers ISP's address space.
How does ISP get blocks of addresses?
ICANN Internet Corp for Assigned Names and Numbers {allocate addresses, manages DNS, assigns domains and resolves disputes} - 9Getting Datagram from A to B (same network)(IP datagram remains unchanged)
1) Look up network addr of B in forwarding table of A
2) Find B is on same network as A
3) Link layer will send datagram directly to B inside link layer frame
4) B and A are directly connected - 10Getting Datagram from A to E (diff network)1) Look up addr of E in forwarding table, E is on diff network therefore A and E not directly attached
2) Routing table: next hop to E is the nearest router
3) A's link layer sends datagram to router inside link-layer frame
4) datagram arrives at router
5) Router looks up network address of E in forwarding table, E is on same network as routers interface 223.1.2.9
6)Link layer sends datagram to 223.1.2.2 inside link layer frame via interface 223.1.2.9 (source MAC will change to that of router) - 11IP Datagram Format32 bits
ver = IP protocol version number
16-bit identifier+flgs+fragment offset = for fragmentation and reassembly
time to live = max remaining hops (decremented at each router)
upper layer = upper layer protocol to deliver payload
SOURCE AND DEST ADDR - 12IP Fragment and ReassemblyIN: one large datagram
OUT: 3 smaller datagrams
Networks have MTU (max transfer size) - largest possible link-level frame
Large IP datagrams are divided within network: one datagram becomes several and only put together at dest
IP header bits identify order or fragments - 13Fragment Header Bits

- 14ICMP Internet Control Message ProtocolsUsed by routers, hosts and gateways to communicate on a network level. Critical to knowing what is going on in your network. E.g. want to know something exists? Send an echo reply
ICMP message: type + code + first 8bytes of IP datagram causing error - 15Special IP AddressesLoopback Interfaces: addresses 127.0.0.1-127.255.255.255 associated with name localhost
IP addr of network: host num set to all zeros e.g. 128.143.0.0
Boradcast addr: Host all ones aka 145.123.255.255. Broadcast goes to all hosts.
Test/Experimental:
10.0.0.0-10.255.255.255
172.16.0.0-172.31.255.255
192.168.0.0-192.168.255.255 - 16IPv632 bit number
IPV6 address is 128 bits long - 17IPv6 resolving issues IPv4Running out of IPv4 - NAT utilises more of IPv4 BUT;;;;;
Problem with IPv4: NAT breaks down networks end to end model, negatively affects many applications/protocols and gives false security.
True solution is IPv6; - 18IPv6 Address Format64 bits = network id, 64 bits = interface id
001-globalroutingprefix-subnetid-interfaceid
X:X:X:X:X:X:X:X
x = 0->FFFF
E.g. 2001:DB8::8:8000:0:417A - 19IPv6 Address AbbrieviationRemember to remove leading 0's and a single occurrence of consecutive groups of 0's can be replaced with ::
- 20IPv6 Typesunspecified - ::/128
loopback -::1/128
link-local unicast - FE80::/10
multicast - FF00::/8 - 21Link Local AddressGiven for communications with LAN only
FE80::/10 used for auto config and network neighbour discovery - auto assigned to interfaces
Structure:
10 bits = 1111 1110
54 bits = 00000
64 bits = interface id - 22Global UnicastThis is address that is globally unique across internet
3 bits - 001
45 bits - global routing prefix
16 bits = subnet id
64 bits = interface id - 23Unique Local AddressFor local communications, not expected to be routable over the internet
FC00::/7
L=1 locally assigned
L=0 for future use
If leaked outside there will be no conflict with existing addresses
7 bits = 1111 1110
1 bit = L
40 bits = global id
16 bit = subnet id
64 bit = interface id - 24IPv6 Addr config - SUBNETTO get SubnetID: use a psuedo random generator algorithm - obtains current time of day, obtain EUI-64 identifier, concatenate time and use least sig bits as global ID
- 25IPv6 Addr config - Interface IdentifierManually
Auto config EUI-64 uses MAC addr as identifier
DHCPv6
Psuedo random interface ID
Cryptographically generated - 26IPv6 Header total length - 40 bytesVersion 4 bits - identifies version of IP used to generate datagram
Traffic class (1 byte) - replaces type of service from IPv4
Flow Label (20 bits) - created to provide additional support for real time datagram delivery and quality of service features
Payload length (2 bytes) - field replaces total length field in ipv4, only contains number of bytes in payload
Next Header (2 bytes) - replaces protocol field, used to identify extension headers, if a main header then next header is of the upper layer message.
Hop Limit (1 byte) - replaces TTL - 27Diff from Ipv4Fixed length
All optional info is added in extension headers
Not protected by checksum
Payload length instead of total length; hop limit instead of TTL - 28Extension HeadersTypes:
Dest Ops - contains ops that are intended for ultimate dest of the datagram
Hop by Hop Ops - ops that carry info for every device between source and dest (router)
Separating hop-by-hop and dest is useful as:
-not all options are examined along packets delivery path - 29Commonly used Extension HeaderHop-by-hop EH
Dest EH - used as ipv6 mobility
Routing Eh -used in ipv6 mobility and in source routing.
Fragmentation EH - is critical in support of comm using fragmented packets
Mobility EH - used in support of mobile ipv6 service
Authentication EH - similar in format and use to the ipv4 authentication header - 30Control ProtocolsIPv4: ARP, ICMP, IGMP
Ipv6: ICMPv6 - 31ICMPv60-127 are error messages
127 onwards is information
Body includes source/dest addr must not be fragmented!
MUST NOT ORIGINATE IN RESPONSE TO:
>IMCPv6 error or redirect messages
>Multicast/broadcast packets - 32MulticastIPv6 node must support multicast
All nodes with similar addresses share the same solicited node multicast address
Solicited node multicast format must be:
FF01::1::FF00:0:/104 - 33Neighbourhood Discovery NDICMPv6 is used for ND messages
Multicast is used
To request link layer addresses - Neighbour Solicitation query (NS)
Provides info:
NA neighbour advertisement
Solicitation flag: s=1 in response to NS, s=0, unsolicited NA
Info stored in neighbour cache NC or destination cache DC - 34ND advantages>Reduces network load by using multicast instead of broadcast
>Improves robustness of packet delivery
--->Neighbour unreachability detection
--->Notification from/to upper layers - 35AnycastA packet sent with the any-cast address is delivered to the nearest interface node having this address
-Allows increase in service reliability
-Allocated from the unicast address space - 36Ipv6 Node ConfigurationIP address config:
Interface ID
Manual/auto (stateful or stateless)
Network ID:
-manual
-auto (stateful and stateless)
-predefined well known prefix - 37Interface auto configModified EUI-64 constructed from MAC
As for collisions, we have:
-duplicate MAC addresses
-duplicate interface ID
DAD aka Duplicate Address Detection is used for such circumstances - 38Duplicate Address Detection1) Node X is going to assign IP addr A on its interface "I"
2) Interface "I" joins multicast group (FF02::1 which is all nodes and FF02::1:FF00:0:A' which is all nodes with IP A)
3) Are there any NS queries?
4) X sends NS query
5) Are there any NA sent to addr FF02::1?
If 3 and 5 are true, not unique
Else it is unique - 39Duplicate Address Detection (English)Sends a group multicast/unicast and asks if anyone is using address before it an determine if it can use it. If there is no response, then it is unique.
- 40Stateless Address Auto configuration [SLAAC] IProvides ability to address a host based on a network prefix that is advertised from a local network router via Router Advertisement (RA)
- 41Stateless Address Auto configuration [SLAAC] IILink-local address is already here (well known network ID, modified EUI-64 as interface ID, DAD to ensure uniqueness) and ready to communicate with neighbours so what is next?
-other Ipv6 networks, default gateways, routing tables - 42Routers are NeighboursRouters send RA's periodically/in response to RS queries:
If dont receive periodic advertisement packet from router, it thinks that the router is dead.
RA: possible options (prefix ID, and length, lifetime, how to get first part of ID?) -> usage: for stateless config or dest cache
NB: unmatched advertised parameters could lead to unstable network - 43DIS of SLAACMACS are globally unique and SLAAC is derived from MAC, where interface ID remains constant over time - so users can be identified and tracked
- 44Privacy Extension for SLAACProvides privacy for SLAAC without breaking it.
Approach is to change interface ID over time which must be locally unique (can be random) and DAD ensures uniqueness (so if collision occurs, new one is generated) - 45Fragmentation IThis is considered harmful in context of IPv6. Inefficient use of resources of hosts, routers and bandwidth. Degraded performance due to loss of fragments - reassembly is difficult.
Why does it occur? MTU mismatch along path, or TCP/IP implementations
Blocking PMTUD leads to packets disappearing into "black hole" - 46Fragmentation IIFragmentation occurs via the source host only, not by routers along the packet path
-MTU = 1280 bytes
-If packet size > MTU, the packet is dropped, ICMPc6 is sent
-How to choose packet's size: Always fragment to 1280 bytes - 47Ipv6 and DNSAddition of new resource type RR
"AAAA" fore ipv6 which is same for Ipv4 - 48MigrationDual stack nodes (IPv4 + Ipv6)
Tunneling - connection of IPv6 domains via Ipv5 clouds
Address Translations: interconnection between ipv6 and ipv4 domains - 49Encapsulation:-6to4 embeds an ipv6 packet in the payload portion of an ipv4 packet
-The destination addr for the prepended packet header is derived from the ipv6 dest addr of the inner packet - 50TeredoA transition tech: for ipv4 networks with no direct ipv6 connectivity. Used to overcome the issue of end points requiring public ipv4 addresses i.e. allow routing to private IPs
ENCAPSULATES ipv6 datagram in ipv4 UDP - should be disabled as soon as ipv6 connectivity is avaliable - 51Address Translation>NAT64 is a mechanism to allow for IPv6 hosts to communicate with Ipv4 servers.
>Packet headers are translated according to stateless IP/ICMP translation algorithm
>IPv6 (address + port) are maped onto ipv4 (address+port)
Ipv4 addresses are mapped into ipv6 addresses as pref64::ipv4 - 52Ipv6 advantages>more efficient space allocation
>end to end addressing (not NAT anymore)
>Fragmentation only by source and not routers along path
>Routers do not calculate header checksum thus less overhead
>Multicasting instead of braodcasting
>Built in security mechanisms
Informationen
- Beschreibung
- Karteikarten am IPv4 and IPv6 Network Layer, erstellt von Eric Wojcik am 12/06/2018.
- Erstellt von
- Eric Wojcik
- Aufrufe
- 3
- Bewertung