34. Network Addresses Flashcards

1
Q

Learning Objectives

By the end of this chapter, you should be able to:

A
  • Differentiate between different types of IPv4 and IPv6 addresses.
  • Understand the role of netmasks.
  • Get, set, and change the hostname, based on the system you are using.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

IP Addresses

What is the purpose of an IP address?

A

The IP address is the number that identifies your system on the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

IP Addresses

What the the 2 varieties of IP addesss?

A
  1. IPv4
  2. IPv6
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

IP Addresses

What are the componenets of a IPv4 address?

A

IPv4 is a 32-bit address, composed of 4 octets (an octet is just 8 bits, or a byte).

Example: 148.114.252.10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

IP Addresses

What are the components of a IPv6 address?

A

IPv6 is a 128-bit address, composed of 8 16-bit octet pairs.

Example: 2003:0db5:6123:0000:1f4f:0000:5529:fe23

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

IPv4 Address Types

What are the 4 IPv4 address types? And explain each one of them?

A
  • Unicast address
    • An address associated with a specific host. It might be something like 140.211.169.4 or 64.254.248.193.
  • Network address
    • An address whose host portion is set to all binary zeroes. Ex. 192.168.1.0. (the host portion can be the last 1-3 octets as discussed later; here it is just the last octet).
  • Broadcast address
    • An address to which each member of a particular network will listen. It will have the host portion set to all 1 bits, such as in 172.16.255.255 or 148.114.255.255 or 192.168.1.255. (the host portion is the last two octets in the first two cases, just the last one in the third case).
  • Multicast address
    • An address to which appropriately configured nodes will listen. The address 224.0.0.2 is an example of a multicast address. Only nodes specifically configured to pay attention to a specific multicast address will interpret packets for that multicast group.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Reserved Addresses

What are some of these

Examples of Reserved Addresses reserved for?

  • 127.x.x.x
  • 0.0.0.0
  • 255.255.255.255
  • 192.168.0.0 - 192.168.255.255:
  • ect..
A
  • 127.x.x.x
    • Reserved for the loopback (local system) interface, where 0 <= x <= 254. Generally, 127.0.0.1.
  • 0.0.0.0
    • Used by systems that do not yet know their own address. Protocols like DHCP and BOOTP use this address when attempting to communicate with a server.
  • 255.255.255.255
    • Generic broadcast private address, reserved for internal use. These addresses are never assigned or registered to anyone. They are generally not routable.
  • 192.168.0.0 - 192.168.255.255
  • ect..
    • https://en.wikipedia.org/wiki/Reserved_IP_addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

IPv6 Address Types

What are the 4 IPv6 address types? And explain each one of them?

A
  • Unicast
    • A packet is delivered to one interface.
      • Link-local: Auto-configured for every interface to have one. Non-routable.
      • Global: Dynamically or manually assigned. Routable.
      • Reserved for documentation.
  • Multicast
    • A packet is delivered to multiple interfaces.
  • Anycast
    • A packet is delivered to the nearest of multiple interfaces (in terms of routing distance).
  • IPv4-mapped
    • An IPv4 address mapped to IPv6. For example, ::FFFF:a.b.c.d/96
  • In addition, IPv6 has some special types of addresses such as loopback, which is assigned to the lo interface, as ::1/128.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

IPv4 Address Classes

What is the purpose of IPv4 Address classes?

A

IPv4 address Classes A, B, and C are used to distinguish a network portion of the address from a host portion of the address. This is used for routing purposes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

IPv4 Address Classes

Explain the different IPv4 address classes.

A
  • Class A
    • Addresses use 8 bits for the network portion of the address and 24 bits for the host portion of the address.
      • 128 networks, 16,772,214 hosts per network, 127.x.x.x reserved for loopback
  • Class B
    • Addresses use 16 and 16 bits respectively
      • 16,384 networks, 65,534 hosts per network
  • Class C
    • Addresses use 24 bits for the network portion and 8 bits for the host portion.
      • 2,097,152 networks, 254 hosts per network
  • Class D
    • Addresses are used for multicasting.
  • Class E
    • addresses are currently not used.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Netmasks

What is a netmask used for?

A

netmask is used to determine how much of the address is used for the network portion and how much for the host portion as we have seen. It is also used to determine network and broadcast addresses.

Example:

  • *172.16.2.17** ip address
  • *&255.255.0.0** netmask
  • *172.16.0.0** network address
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Getting and Setting the Hostname

What is the proper modern way to set a box’s hostname and make it persistent (rebooting).

A

sudo hostnamectl set-hostname server-0

which is part of the systemd infrastructure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Getting and Setting the Hostname

What is the 2 proper way to view a systems hostname. One is older one is newer and more modern.

A
  • hostname
  • hostnamectl
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Getting and Setting the Hostname

What is a hostname? and what is it’s purpose in terms of DNS?

A
  • The hostname is simply a label to distinguish a networked device from other nodes.
  • For DNS purposes, hostnames are appended with a period (dot) and a domain name, so that a machine with a hostname of antje could have a fully qualified domain name (FQDN) of antje.linuxfoundation.org.
  • The hostname is generally specified at installation time, and can be modified at any time later.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Getting and Setting the Hostname

Where is the hostname config file located? but in general you shouldn’t touch and instead use the proper utlity to interact with the config file instead?

A
  • Debian system
    • /etc/hostname
  • RH system
    • /etc/sysconfig/network
  • SUSE system
    • /etc/HOSTNAME
How well did you know this?
1
Not at all
2
3
4
5
Perfectly