1.4 Given a scenario, configure a subnet and use appropriate IP addressing schemes. Flashcards
Networking with IPv4
- IP Address, e.g., 192.168.1.165
– Every device needs a unique IP address - Subnet mask, e.g., 255.255.255.0
– Used by the local device to determine what subnet it’s on
– The subnet mask isn’t (usually) transmitted
across the network
– You’ll ask for the subnet mask all the time
– What’s the subnet mask of this network? - Default gateway, e.g., 192.168.1.1
– The router that allows you to communicate
outside of your local subnet
– The default gateway must be an
IP address on the local subnet
Special IPv4 addresses
- Loopback address
– An address to yourself
– Ranges from 127.0.0.1 through 127.255.255.254
– An easy way to self-reference (ping 127.0.0.1) - Reserved addresses
– Set aside for future use or testing
– 240.0.0.1 through 254.255.255.254 - Virtual IP addresses (VIP)
– Not associated with a physical network adapter
– Virtual machine, internal router address
DHCP
- IPv4 address configuration used to be manual
– IP address, subnet mask, gateway,
DNS servers, NTP servers, etc. - Dynamic Host Configuration Protocol
– Provides automatic addresses and
IP configuration for almost all devices
APIPA - Automatic Private IP Addressing
- A link-local address - No forwarding by routers
- IETF has reserved
169.254.0.1 - through 169.254.255.254
– First and last 256 addresses are reserved
– Functional block of
169.254.1.0 through 169.254.254.255
NAT (Network Address Translation)
- It is estimated that there are over 20 billion devices
connected to the Internet (and growing)
– IPv4 supports around 4.29 billion addresses - The address space for IPv4 is exhausted
– There are no available addresses to assign - How does it all work?
– Network Address Translation - This isn’t the only use of NAT
– NAT is handy in many situations
RFC 1918 Private IPv4 Addresses
Static NAT
NAT Overload / Port Address Translation (PAT)
Unicast
- One station sending information to another station
- Send information between two systems
- Web surfing, file transfers
- Does not scale optimally for streaming media
Broadcast
- Send information to everyone at once
- One packet, received by everyone
- Limited scope - the broadcast domain
- Routing updates, ARP requests
- Not used in IPv6 - focus on multicast
Multicast
- Delivery of information to interested systems
– One to many - Multimedia delivery, stock exchanges
- Very specialized
– Difficult to scale across large networks - Used in both IPv4 and IPv6
– Extensive use in IPv6
Anycast
- Single destination IP address has
multiple paths to two or more endpoints
– One-to-one-of-many
– Used in IPv4 and IPv6 - Configure the same anycast address on different devices
– Looks like any other unicast address - Packets sent to an anycast address are delivered to the closest interface
– Announce the same route out of multiple data centers,
clients use the data center closest to them
– Anycast DNS
Classful Subnetting
- Very specific subnetting architecture
– Not used since 1993
– But still referenced in casual conversation - Used as a starting point when subnetting
– Standard values
The construction of a subnet
- Network address
– The first IP address of a subnet - Set all host bits to 0 (0 decimal) - First usable host address
– One number higher than the network address - Network broadcast address
– The last IP address of a subnet - Set all host bits to 1 (255 decimal) - Last usable host address
One number lower than the broadcast address
VLSM (Variable Length Subnet Masks)
- Class-based networks are inefficient
– The subnet mask is based on the network class - Allow network administrators to define their own masks
– Customize the subnet mask to specific network requirements - Use different subnet masks in the same classful network
– 10.0.0.0/8 is the class A network - 10.0.1.0/24 and 10.0.8.0/26 would be VLSM
Four Important Addresses
- Network address / subnet ID
– The first address in the subnet - Broadcast address
– The last address in the subnet - First available host address
– One more than the network address - Last available host address
– One less than the broadcast address
Magic number subnetting
- Very straightforward method
– Can often perform the math
in your head - Subnet with minimal math
– Still some counting involved - Some charts might help
– But may not be required
– CIDR to Decimal
– Host ranges
The magic number process
- Convert the subnet mask to decimal
- Identify the “interesting octet”
- Calculate the “magic number”
– 256 minus the interesting octet
– Calculate the host range - Identify the network address
– First address in the range - Identify the broadcast address
Last address in the range
Seven second subnetting
- Convert IP address and subnet mask to decimal
– Use chart to convert between CIDR-block notation and decimal
– Same chart also shows the number of devices per subnet - Determine network/subnet address
– Second chart shows the
starting subnet boundary - Determine broadcast address
– Chart below shows the
ending subnet boundary - Calculate first and last usable IP address
– Add one from network address,
subtract one from broadcast address
IPv6 addresses
- Internet Protocol v6 - 128-bit address
– 340,282,366,920,938,463,463,374,607,431,768,211,456
addresses (340 undecillion)
– 6.8 billion people could have
5,000,000,000,000,000,000,000,000,000 addresses each
IPv6 address compression
- Your DNS will become very important!
- Groups of zeros can be abbreviated
with a double colon ::
– Only one of these abbreviations
allowed per address - Leading zeros are optional
Configuring IPv6 with a modified EUI-64
- Static addressing can be useful
– The IP address never changes - What other address never changes?
– The MAC address - Extended Unique Identifier (64-bit)
- Combined a 64-bit IPv6 prefix and the MAC address
– Wait, the MAC address is only 48-bits long! - You’re going to need some extra bits
– And a minor change to the MAC address
Converting EUI-48 to EUI-64
- Split the MAC
– Two 3-byte (24 bit) halves - Put FFFE in the middle
– The missing 16 bits - Invert the seventh bit
– Changes the address from globally unique/universal
– Turns the burned-in address (BIA) into a locally
administered address
– This is the U/L bit (universal/local)
IPV6 Addressing: Shortcut for flipping the 7th bit
- Quickly convert the MAC address - create a chart
- Count from 0 to F in hex - two columns, groups of four
- Quickly convert the second character of the first hex byte
– Change it to the other value
Assigning IPv6 Addresses
- Internet Assigned Numbers Authority (IANA) provides address blocks to RIRs (Regional Internet Registries)
- RIRs assigns smaller subnet blocks to ISPs (Internet Service Providers)
- ISP assigns a /48 subnet to the customer
Tunneling IPv6
- 6 to4 addressing
– Send IPv6 over an existing IPv4 network
– Creates an IPv6 based on the IPv4 address
– Requires relay routers
– No support for NAT - 4in6 - Tunnel IPv4 traffic on an IPv6 network
Teredo/Miredo
- Tunnel IPv6 through NATed IPv4
– End-to-end IPv6 through an IPv4 network
– No special IPv6 router needed
– Temporary use - We’ll have IPv6 native networks soon (?) - Miredo - Open-source Teredo for Linux,
- BSD Unix, and Mac OS X - Full functionality
Dual-stack routing
- Dual-stack IPv4 and IPv6 - Run both at the same time
– Interfaces will be assigned multiple address types - IPv4
– Configured with IPv4 addresses
– Maintains an IPv4 routing table
– Uses IPv4 dynamic routing protocols - IPv6 - Configured with IPv6 addresses
– Maintains a separate IPv6 routing table
– Uses IPv6 dynamic routing protocols
Howdy Neighbor
- There’s no ARP in IPv6
– So how do you find out the MAC address of a device? - Neighbor Solicitation (NS) -Sent as a multicast
- Neighbor Advertisement (NA)
NDP (Neighbor Discovery Protocol)
- No broadcasts! - Operates using multicast over ICMPv6
- Neighbor MAC Discovery - Replaces the IPv4 ARP
- SLAAC (Stateless Address Autoconfiguration)
– Automatically configure an IP address
without a DHCP server - DAD (Duplicate Address Detection) - No duplicate IPs!
- Discover routers
– Router Solicitation (RS) and Router Advertisement (RA)