Chapter 36 - Implementing DHCP Flashcards

1
Q

What is DHCP?

A
  • Dynamic Host Configuration Protocol
  • A protocol that a host uses to dynamically learn its IP address, subnet mask, DNS server, and default gateway
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Benefits of DHCP over static assignment

A
  • Less room for user error
  • Mobility
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the four different types of DHCP messages?

A
  • Discover - Sent by a DHCP Client to find a DHCP Server (Broadcast).
  • Offer- Sent by a DHCP Server to offer a specific IP address (along with other information) as a lease to a DHCP Client. If the DHCP Client allows receipt of unicast packets before having IP configuration established it will be sent as Unicast. Otherwise it will be sent as Broadcast.
  • Request - Sent by a DHCP Client to ask the DHCP Server to lease the IP address listed in the previous Offer message. Sent as Broadcast.
  • Acknowledgement - Sent by a DHCP server to assign the address and list the other necessary network information. Can be sent as Broadcast or Unicast.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What addresses will a DHCP Client use as its src and dst addresses if it does not already have an IP when sending a DHCP Discover?

A
  • If sent via broadcast:
    src: 0.0.0.0
    dst: 255.255.255.255
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What addresses will a DHCP Server use as its src and dst addresses when responding to a DHCP Discover message?

A
  • If sent via broadcast:
    src: <DHCP>
    dst: 255.255.255.255</DHCP>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does a host know whether a DHCP Offer is meant for it or not when sent via broadcast?

A
  • As the Offer is sent via broadcast, all hosts on the link will receive it
  • In the original Discover message, a client ID (chaddr) is included which includes the sending host’s MAC address
  • The responding server includes the client ID in its Offer so that only the host with the same client ID will know that the Offer is meant for it
  • The other hosts will ignore the Offer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the ‘ip helper-address <server-ip>' command do?</server-ip>

A

Tells an interface that receives messages from DHCP clients to:
- Watch for incoming DHCP messages with a destination IP of 255.255.255.255
- Change the packet’s source IP to the router’s incoming interface IP address
- Change the packet’s destination IP to that of the DHCP server (listed in the command)
- Route the packet to the DHCP server

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

What does a DHCP relay do?

A
  • A DHCP relay is used when a subnet does not contain its own DHCP server, but there is a DHCP server somewhere else on the network that DHCP client messages should be forwarded to.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What information does a DHCP server need to know in order to serve a host?

A
  • Subnet ID and mask - The DHCP server will use this information to know all addresses in a subnet and to not hand out the network and broadcast addresses
  • Reserved (excluded) addresses - Addresses that cannot be leased, for example, addresses that have been statically assigned
  • Default router(s) - The IP address of the routers on the subnet
  • DNS server IP addresses - Self explanatory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the 3 methods of allocation that a DHCP server can use?

A
  • Dynamic Allocation - The default
  • Automatic Allocation - Sets the DHCP lease time to infinite.
  • Static Allocation - Preconfigures an address for a specific client at the server based on the client’s MAC address.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

True or False. A DHCP server can also be used to provide the IP address of a TFTP server on the network that devices should use.

A

True.

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

What are the two rules for configuring a DHCP relay on a network?

A
  • Does the network contain DHCP clients?
  • Does the network not contain a DHCP server?
    If both are true then a DHCP relay is required on the interface connecting to that subnet from the router.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What command(s) can you use to see if an interface is being used as a DHCP Relay?

A
  • ‘show ip int <int>'
    - If it is then it will show "Helper address is <DHCP>"</DHCP></int>
  • ‘show running-config’
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command can you use to cause a switch or router interface to get its IP via DHCP?

A

‘ip address dhcp’ in interface config mode

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

How can you find out if a switch/router interface has had its IP configured via DHCP?

A

Use the ‘show dhcp lease’ command

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

True or False. A router or switch using DHCP to obtain its IP address will only show the IP if DHCP has been successful.

A

True.

17
Q

When looking at a Cisco routing table, how can you tell if a route has been created from information learned via DHCP?

A
  • The administrative distance by default will be 254
  • IOS oddly lists them in the legend as ‘S’ meaning static
17
Q

What information does a host need to learn from a DHCP server?

A
  • DNS server IP
  • Its own IP
  • Its own subnet mask
  • The gateway for its subnet
18
Q

What extra information does the Windows command ‘ipconfig /all’ show above just ‘ipconfig’?

A
  • ‘ipconfig /all’ shows all IP information for the host including the DNS server(s)
  • ‘ipconfig’ only shows the host’s IP, subnet mask, and default gateway
19
Q

What command can you use on a Windows device to see its routing table?

A

‘netstat -rn’

20
Q

What commands does MacOS use that is similar to Windows’ ‘ipconfig’ command?

A
  • ‘ifconfig’ - Shows the host’s IP address and subnet mask
  • ‘networksetup -getinfo’ - Shows the host’s IP address, subnet mask, and default gateway
  • ‘networksetup -getdnsservers’ - Shows the host’s DNS servers
21
Q

What command can you use on MacOS to see a device’s routing table?

A

‘netstat -rn’

22
Q

True or False. ‘ifconfig’ only works for MacOS.

A

False. It also works for older Linux distributions (or ones where it has been enabled) and does the same as it does on MacOS (shows the host’s IP address and subnet mask)

It has since been replaced by the ‘ip address’ command.

23
Q

True or False. ‘netstat -rn’ only works for MacOS.

A

False. It also works for older Linux distributions (or ones where it has been enabled) and does the same as it does on MacOS (shows the routing table)

It has since been replaced by the ‘ip route’ command.

24
Q

When using the ‘ipconfig /all’ command, what does ‘Preferred’ mean next to the device’s IP address?

A

It means that this device has been given that IP address before so if its lease is renewed it will ask to receive that address again.

25
Q

What is a DHCP Release message?

A

A message sent from a client to a DHCP server to advise that its address is no longer required and therefore can be put back into the pool of available addresses. Sent as unicast.

26
Q

What does the Bootp Flags field in a DHCP packet do?

A
  • Tells the receiver of the packet whether to respond with Broadcast or Unicast.
  • For example if a PC sends a DHCP Discover with Bootp Unicast, the server will respond with unicast (e.g. with the client’s MAC and IP rather than 255.255.255.255).
27
Q

What commands would you use to configure a Cisco router as a DHCP server?

A
  • To specify a range of addresses that won’t be given to clients
    ‘ip dhcp excluded-address <to> <from>'</from></to>
  • To create a DHCP pool
    ‘ip dhcp pool <name>'</name>
  • To assign an address range to be handed out by the pool (from dhcp config mode)
    ‘network <address> <CIDR>'</CIDR>
  • To assign a DNS server address to the pool (from dhcp config mode)
    ‘dns-server <address>’
  • To specify the domain name of the network (from dhcp config mode)
    ‘domain-name <domain>'</domain>
  • To specify the default gateway (from dhcp config mode)
    ‘default-router <default>'</default>
  • To specify the lease time (from dhcp config mode)
    ‘lease <days> <minutes> <hours>' OR 'lease infinite'</hours></minutes></days>
28
Q

What command can you use to see all dhcp clients that have received addresses from a router acting as a DHCP server?

A

‘show ip dhcp binding’

29
Q

What is a DHCP Decline message?

A

A message that a client uses to decline the lease of an IP address from a server during the DORA process.