06 NW - Internet Protocol Addresses note chinh
06 NW - Internet Protocol Addresses note chinh
126
Internet Protocol Addresses
• This chapter
• introduces the address scheme of the Internet Protocol (IPv4 and IPv6)
• shows how the original IPv4 address scheme was divided into classes
• The IP standard requires that each host (more precisely: network card) is assigned a
unique number
• the Internet Protocol address (IP address)
• Every packet sent over the Internet contains the IP address of the sender (source) and
the receiver (destination)
• Case insensitive
• 2001:0:234::A12B:1:ABC0
• Further examples
• FF02:0:0:0:0:0:0:0:1 -> FF02::1
• 0:0:0:0:0:0:0:0 -> ::
• Side note: In a web browser (URL) the IPv6 address must be given in square brackets:
• http://[2001:0:234::A12B:1:ABC0]:8080/index.html
• do not need to know the addresses of the individual stations within the network
• Routers only have to maintain network pre xes, but not individual
addresses in their routing tables
• IPv4: 223.1.1.4 /24 -> The left 24 bits of 223.1.1.4 are the network ID
• IPv6: F001::1 /64 -> The left 64 bits of F001::1 are the network ID
• IPv4: 223.1.1.4 /24 -> The left 24 bits of 223.1.1.4 are the network ID
• IPv6: F001::1 /64 -> The left 64 bits of F001::1 are the network ID
• Examples:
• Note: The larger the subnet mask, the fewer IP addresses are available for the
subnet
• The largest interface su x represents the broadcast address in the subnet (e.g. 192.168.178.255/24)
• Examples:
• 192.168.1.0/24 -> Network address of the /24 network 192.168.1.0/24
• Example:
• /8 -> 2 =256
8 network IDs -> max. 256 subnets with /8
• /9 -> 2 =512
9 network IDs -> max. 512 subnets with /9
• Note: The larger the subnet mask, the more corresponding subnets there
are
• B -> /16
• C -> /24
• No "waste" of IP addresses due to classes that are too large or too small
• In contrast to class-based addressing: Subnet mask can now have any length. (/8, /
9, ... /19, /20, /21 …) -> More ne-grained division of the address space possible
• Previously: Representation "IP address /n" indicates that the pre x of the IP
address consists of n bits.
• Examples
• 10.0.0.0/16 stands for all IP addresses from 10.0.0.0 to 10.0.255.255
• 2001:638::/32 to DFN
• 2001:638:a01:109::/64 NW1-Laboratory
• 2001:638:a01:110::/64 NW2-Laboratory
• The four /25 networks are still one large /23 network for the ISP
• An ISP usually receives a /32 address range from the RIR that it can
distribute to end customers
• These addresses must not be directly visible on the global Internet (uniqueness)
• Networks without a connection to the Internet
• Networks that are connected to the Internet via Network Address Translation (NAT)
• No more NAT
• Who?
• The router
• Why?
• Because in IPv4 IP addresses are scarce / all gone
• e.g. 192.168.x.y
192.168.1.1
192.168.1.2
Router
238.125.35.133
192.168.1.3
Replaces internal IP with the external IP address
192.168.1.4
• Is used during startup by a computer that does not yet know its
network address
• Purpose:
• Error diagnosis
• Other examples are print servers, HTTP servers, etc. ... all can be
contacted via 127.0.0.1 on the local computer
• More precisely: The rst byte has the bits 001x xxxx