Dynamic Host Configuration Protocol (DHCP)

Anand Seetharam
19 Oct 201809:09

Summary

TLDRThis lecture delves into the process of obtaining IP addresses, focusing on the Dynamic Host Configuration Protocol (DHCP). It explains how DHCP dynamically assigns IP addresses to devices joining a network, facilitating a seamless connection experience. The lecture outlines the DHCP process, starting from the client's DHCP discover message to the server's offer and the client's request, culminating in the server's acknowledgement. It also touches on the additional information DHCP can provide, such as the default gateway and subnet mask. The lecture further explains how a network obtains its IP address from an Internet Service Provider (ISP), who in turn gets its IP addresses from the Internet Corporation for Assigned Names and Numbers (ICANN).

Takeaways

  • 💻 IP addresses can be manually set by a system administrator or automatically obtained through DHCP (Dynamic Host Configuration Protocol).
  • 🔄 DHCP is a protocol that dynamically assigns IP addresses to devices joining a network, making it a 'plug and play' solution.
  • 📡 DHCP supports mobile users by providing temporary IP addresses, which can be reused once the device leaves the network.
  • 📢 The DHCP process involves four main steps: DHCP Discover, DHCP Offer, DHCP Request, and DHCP Acknowledgement.
  • 🖥️ When a client enters a network, it broadcasts a DHCP Discover message to find a DHCP server, which responds with an IP address offer.
  • 🌐 DHCP servers use ports 67 and 68 for communication, and they broadcast messages to ensure the client without an IP address receives them.
  • 🔑 DHCP not only provides IP addresses but also other network configuration details like the subnet mask and default gateway.
  • 🌐 The DHCP server obtains its pool of IP addresses from an ISP (Internet Service Provider), which manages large blocks of IP addresses.
  • 🏢 Organizations receive their IP address blocks from ISPs, which are part of a larger allocation managed by the ISP.
  • 🌐 ISPs get their IP address allocations from the IANA (Internet Assigned Numbers Authority), which oversees global IP address distribution.

Q & A

  • What is the primary function of DHCP?

    -The primary function of DHCP (Dynamic Host Configuration Protocol) is to automatically assign IP addresses to devices on a network, ensuring that each device has a unique address without manual configuration.

  • How does a device obtain an IP address without manual configuration?

    -A device obtains an IP address without manual configuration through DHCP, which assigns an IP address dynamically from a server when the device joins the network.

  • What is the purpose of the DHCP Discover message?

    -The DHCP Discover message is a broadcast message sent by a client entering a network to identify available DHCP servers that can provide an IP address.

  • Why does the DHCP server respond with a broadcast message?

    -The DHCP server responds with a broadcast message because the client, having just entered the network, does not yet have an IP address, and thus cannot be reached through a unicast message.

  • What information does DHCP provide to a client besides an IP address?

    -Besides an IP address, DHCP can also provide the client with the address of the first hop router, the name and address of the DHCP server, and the subnet mask of the network.

  • How does a client indicate acceptance of the IP address offered by the DHCP server?

    -A client indicates acceptance of the offered IP address by sending a DHCP Request message, which is a broadcast message, to the DHCP server.

  • What are the two main ports used for DHCP communication?

    -The two main ports used for DHCP communication are port 67 (used by the DHCP server) and port 68 (used by the DHCP client).

  • How does a network obtain its IP addresses from an ISP?

    -A network obtains its IP addresses from an ISP (Internet Service Provider), which allocates a block of IP addresses to the network based on the organization's requirements.

  • What is the role of the Internet Corporation for Assigned Names and Numbers (ICANN) in IP address allocation?

    -ICANN is responsible for coordinating the allocation of IP addresses. ISPs can obtain IP addresses by requesting them from ICANN, which manages the global distribution of IP address space.

  • What is the significance of the subnet mask in DHCP?

    -The subnet mask in DHCP is significant as it defines the network portion of an IP address, allowing the DHCP server to correctly allocate IP addresses within the designated subnet.

  • How does the DHCP server know which IP addresses to hand out to clients?

    -The DHCP server knows which IP addresses to hand out based on the subnet information it has been configured with, which is typically provided by the ISP and includes a range of IP addresses for分配 to clients.

Outlines

00:00

🌐 Understanding IP Address Acquisition

This paragraph introduces the concept of obtaining an IP address, which can be manually set by a system administrator or automatically assigned through a protocol called DHCP (Dynamic Host Configuration Protocol). The lecture explains that most users connect to networks seamlessly due to DHCP, which dynamically assigns IP addresses to devices joining a network. The process involves the client broadcasting a DHCP discover message to find a DHCP server, the server responding with a DHCP offer message, the client requesting the IP address, and the server acknowledging the request. An example scenario is provided where a client enters a network and communicates with a DHCP server to obtain an IP address. The paragraph also touches on the temporary nature of IP addresses assigned by DHCP, which can be reused by other devices once the original device leaves the network.

05:01

📡 Deep Dive into DHCP Operations

The second paragraph delves deeper into the workings of DHCP, explaining that it not only provides IP addresses but also other network configuration details such as the address of the first hop router and the subnet mask. It outlines the communication process using UDP on ports 67 and 68, detailing how a client sends a DHCP request, the server responds with a DHCP offer, and the client acknowledges the offer. The paragraph also discusses how DHCP servers obtain their pool of IP addresses from ISPs (Internet Service Providers), which in turn get their addresses from the Internet Corporation for Assigned Names and Numbers (ICANN). The lecture concludes with a mention of a DHCP lab where students can explore these concepts practically.

Mindmap

Keywords

💡IP Address

An IP address is a unique numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. In the video, the concept of IP addresses is central as it discusses how devices obtain these addresses to connect to a network. The script mentions that IP addresses can be hardcoded or dynamically assigned, highlighting the importance of IP addresses in network communication.

💡Subnetting

Subnetting is the practice of dividing a network into smaller networks. It is crucial for efficient IP address allocation and traffic management. The script touches upon subnetting when explaining how an IP address is structured, with the first part of the address indicating the network and the last part indicating the host within that network.

💡DHCP

DHCP stands for Dynamic Host Configuration Protocol. It is a protocol that automatically assigns IP addresses to devices on a network, so they can communicate with each other. The video explains DHCP as a plug-and-play protocol that simplifies the process of connecting devices to a network by dynamically allocating IP addresses, which is essential for the seamless operation of networks, especially for mobile users.

💡DHCP Discover Message

The DHCP Discover message is a broadcast message sent by a client when it first connects to a network, seeking to identify available DHCP servers. In the script, this message is highlighted as the first step in the DHCP process, where the client, without an IP address, broadcasts to find a server that can provide it with an IP address.

💡DHCP Offer Message

The DHCP Offer message is a response from a DHCP server to a client's Discover message, offering an IP address for the client to use. The video script describes how the server sends this offer as a broadcast message, specifying an IP address that the client could potentially use, which is a critical step in the DHCP process.

💡DHCP Request

A DHCP Request is a message sent by the client to the server, accepting the offered IP address. The script illustrates this as a broadcast message where the client indicates its acceptance of the IP address provided by the server, moving forward in the DHCP process.

💡DHCP Acknowledgement

The DHCP Acknowledgement message is sent by the server to the client, confirming that the client can use the offered IP address. The video script uses this concept to show the final step in the DHCP process, where the server acknowledges the client's request and provides the IP address, completing the network connection setup.

💡Broadcast Message

A broadcast message is a type of network message that is sent to all devices on a network. In the context of the video, broadcast messages are crucial for the DHCP process, especially when the client does not yet have an IP address and needs to communicate with all potential DHCP servers on the network.

💡UDP

UDP stands for User Datagram Protocol, which is one of the core protocols of the internet protocol suite. The video script mentions that DHCP requests are sent using UDP, which is significant because UDP provides a simple way for sending messages without the overhead of establishing a connection, which is suitable for the DHCP process.

💡ISP

An ISP, or Internet Service Provider, is an organization that provides services for accessing the internet. The script discusses how ISPs allocate IP addresses to organizations, which is fundamental to the video's theme of IP address allocation. ISPs obtain blocks of IP addresses from organizations like the Internet Corporation for Assigned Names and Numbers (ICANN) and distribute them to their customers.

💡ICANN

ICANN is the Internet Corporation for Assigned Names and Numbers, responsible for coordinating the maintenance and procedures of several databases related to the namespaces of the internet. The video script concludes with a mention of ICANN as the organization from which ISPs obtain their IP addresses, emphasizing the hierarchical structure of IP address distribution on the internet.

Highlights

Introduction to obtaining an IP address through manual configuration or DHCP.

Explanation of how to hardcode an IP address in Windows, Unix, and Mac systems.

The convenience of connecting to a network without manual IP configuration due to DHCP.

Definition and purpose of the Dynamic Host Configuration Protocol (DHCP).

DHCP's role in providing IP addresses dynamically and supporting mobile users.

The process of DHCP: from DHCP Discover to DHCP Acknowledge.

Example of DHCP message exchange between a client and a server.

The significance of subnets in DHCP and how clients are assigned IP addresses within them.

Technical details of DHCP message broadcasting and port usage (67 and 68).

How DHCP provides additional network configuration information beyond IP addresses.

The protocol stack's role in DHCP message transmission and reception.

DHCP lab exercise overview for practical understanding.

How networks obtain IP addresses from ISPs and the role of subnetting.

The allocation of IP addresses by the Internet Corporation for Assigned Names and Numbers (ICANN).

Summary of IP address allocation from ISPs to organizations and the role of ICANN.

Conclusion and wrap-up of the lecture on IP addresses.

Transcripts

play00:01

hello everyone in the last lecture we Le

play00:03

we talked about IP addresses and and

play00:06

subance in this lecture we're going to

play00:08

talk about how to obtain an IP address

play00:11

so an IP address can be hardcoded uh

play00:13

into hardcoded by the system admin in a

play00:16

file for example you could hardcode your

play00:18

IP address in Windows Unix Mac in

play00:21

Windows all that you have to do is go to

play00:22

the control panel the network

play00:24

configuration go to TCP IP and set

play00:26

properties where you can actually give

play00:28

your IP address but most of you would

play00:31

have noticed that you have never done

play00:32

anything like this you've just opened

play00:33

your laptop and you've been able to

play00:35

seamlessly connect to the network that's

play00:38

because of a protocol called DCP which

play00:40

is dynamic host configuration protocol

play00:43

it helps host obtain add D IP addresses

play00:47

dynamically from the server so it's kind

play00:49

of a plug andplay protocol so

play00:52

let's look into the details about

play00:55

DCP okay so goal of DCP is to uh provide

play00:58

host IP address

play01:00

from the network server whenever the

play01:02

host joins the network and uh if it can

play01:06

renew uh DP also helps host to renew

play01:09

their IP

play01:10

addresses what it's what it supports it

play01:13

supports mobile users because if

play01:14

whenever mobile users who want to join a

play01:17

network they need an IP address only for

play01:19

a short duration of time and H DHCP

play01:22

would help uh give an IP address to

play01:25

these host and once the host uh leave

play01:28

the network this IP address can be used

play01:30

for some other uh some other host which

play01:32

then end enters the network so how does

play01:35

DHCP work the first the host broadcast a

play01:38

DHCP discover message this is this is

play01:41

basically the host that's entering the

play01:42

network it's sending out a DHCP discover

play01:44

message basically trying to find out

play01:46

where the DHCP server is or if there is

play01:48

a DHCP server the DHCP server then

play01:51

responds with the DHCP offer message

play01:54

then the host sends a request an IP

play01:57

address from the DHCP server and the

play01:59

message is a dhp request and then the

play02:01

DHCP server sends a DHCP acknowledgement

play02:04

message with and basically it sends the

play02:07

address to the uh to the host okay so

play02:10

let's uh look at it via an example so

play02:13

here is a client which is entering this

play02:15

network uh and here is a DHCP server so

play02:19

as you can see there are three

play02:21

particular subnets in this uh in this

play02:23

network and the client is entering this

play02:25

particular subnet out here which is

play02:28

22312 do0

play02:30

sl24 okay so once the client enters the

play02:34

network what the client does is it sends

play02:36

a DHCP discover message basically the

play02:38

DHCP disc discover message is a

play02:40

broadcast message and it asks is if a

play02:43

DHCP server is out there so and sends a

play02:46

broadcast message and because the client

play02:48

is just entering the network it does not

play02:50

have an IP address you can see that the

play02:52

source IP address is 0.0.0.0 the

play02:55

destination of this address is

play02:57

255.255 25525 5 which is basically all

play03:01

once that is how a broadcast message is

play03:04

sent because the client does not

play03:06

currently know what the IP address is of

play03:08

the DCP server so it sends a broadcast

play03:10

message and the ports that are used for

play03:12

DC by DHCP for communication are 67 and

play03:16

68 okay so once the DHCP discover

play03:18

message is sent to the server the server

play03:20

responds with a DHCP offer message

play03:23

basically that is also a broadcast

play03:25

message and saying and it says to the

play03:27

client that I am this DCP server and

play03:29

here here is an IP address that the

play03:30

client could use so why does the server

play03:33

need to send a broadcast message the

play03:35

reason is the client currently does not

play03:37

have an IP address so the only way that

play03:39

the server could reach this particular

play03:41

client is if it sent a broadcast message

play03:44

for all the hosts in the net which all

play03:46

the hosts in the network could could

play03:48

receive so it sends this broadcast

play03:49

message so basically as you can see here

play03:51

the source address is a source address

play03:53

of this DHCP server which is 22312 do5

play03:58

and the destination is again all mons

play04:00

and what it this y i a address basically

play04:05

is

play04:06

22312 do4 basically what this DCP server

play04:09

is saying that this client could

play04:11

potentially use this IP address if it

play04:13

wants to then the client just says sends

play04:16

another broadcast message saying that it

play04:19

would accept the this this IP address

play04:23

and then the DHCP server basically sends

play04:25

an acknowledgement back saying that it

play04:27

has the acknowledging that the cl client

play04:29

could take the IP address and it just

play04:31

makes a note of the fact that one client

play04:34

in the network has this IP address which

play04:36

is 22312 do4 which makes sure that it

play04:39

does not provide the same IP address to

play04:42

another client which arrives into the

play04:43

network in

play04:45

Future Okay so let's now go into

play04:49

a little more more detail DCP the

play04:53

primary job of DHCP is to provide IP

play04:55

addresses but that's not the only thing

play04:58

that DHCP does DCP could provide the

play05:00

address of the first hop router for a

play05:02

client it can also provide the name and

play05:04

address of the DCP server from further

play05:08

it also provides a net uh the network MK

play05:11

basically the the subnet mask of the the

play05:14

subnet portion of the of the network

play05:17

okay so how does DCP work so we looked

play05:20

at the Discover and uh the Discover the

play05:23

offer the request and the response

play05:25

messages but what protocol does DCP use

play05:29

so basically when a client arrives in

play05:32

this network what it does is it's want

play05:34

to send a DHCP message so it want

play05:36

basically wants to obtain a IP address

play05:38

so it will use ghcp so it sends this

play05:40

DHCP request this DCP request is sent

play05:43

using UDP so it sent using UDP and it

play05:47

travels on the all the way down through

play05:49

this protocol stack and then it's sent

play05:51

onto this network where this server the

play05:54

DHCP server

play05:56

actually receives it you can make sure

play05:58

you can understand that because uh the

play06:01

destination is all set to to one because

play06:04

otherwise or FFF FFF here on the land

play06:08

that's just the just a broadcast message

play06:11

how a broadcast me propagates an

play06:13

Ethernet and then the uh DCP server is

play06:15

going to receive this message then

play06:17

what's going to happen is the DCP server

play06:19

message is going to travel up the

play06:21

protocol stack at the server and

play06:24

basically it's going to get

play06:25

demultiplexed and then the and then the

play06:28

DHCP server is basic Bally going to send

play06:30

an acknowledgement back to the to the

play06:33

client where it's once again going to

play06:34

travel up the protocol stack after all

play06:37

this the client is basically going to

play06:38

have an an IP address or it's it can

play06:41

also have the name of the first hop

play06:43

router and the name of this DCP server

play06:45

so these are this these are the things

play06:47

that the client can obtain uh using DCP

play06:51

from the server okay so as I said can

play06:55

know this IP address and also know the

play06:57

IP address of it's first stop

play06:59

okay so we in in your Labs you'll be

play07:02

doing a DHCP lab and this is how and if

play07:06

you use wiot this is how a DCP request

play07:08

message is going to look like and this

play07:10

is how a DCP response uh reply message

play07:12

is going to look like so I just wanted

play07:14

to give you a high level overview of how

play07:16

it looks like and you'll be do working

play07:18

out the wi shock labs for yourself okay

play07:21

so far we looked at how an um an

play07:24

individual host can obtain an IP address

play07:27

the next question is how does a net

play07:29

Network obtain an IP address the DCP

play07:32

server can hand out IP addresses to the

play07:34

different clients but then the question

play07:37

is how does DCP server know which

play07:39

addresses to hand out basically it

play07:41

should know the DHCP server has to know

play07:43

the subnet part of the IP address right

play07:45

so the qu the answer to this question is

play07:47

a network obtains its IP address from

play07:50

the ISP so the ISP has a bunch of IP

play07:53

addresses that can that can hand out and

play07:56

hands it out to the different

play07:57

organizations for example here this

play08:00

isp's block of IP address is 200231 16.0

play08:05

sl20 so the first 20 bits are the subnet

play08:08

the remaining bits could be the host it

play08:10

just divides the block of IP addresses

play08:12

it has to the different organizations

play08:14

which request IP addresses from it for

play08:17

example to the organization zero it

play08:18

gives 200231 16.0 sl23 to organization 1

play08:23

it gives 200231

play08:25

18023 and so on this is how

play08:28

organizations obtain their IP addresses

play08:30

from the

play08:32

ISP of course you will now be thinking

play08:34

that how can ISP obtain the IP address

play08:37

so this is basically the the last word

play08:39

we're going to talk about IP addressing

play08:41

basically an ISP can get an its IP

play08:43

address from the I can basically the

play08:46

internet Corporation for assigned names

play08:49

and numbers it's an organization which

play08:51

allocates IP addresses and an ISP can

play08:54

actually obtain IP addresses by going

play08:57

and requesting IP addresses from on the

play08:59

I can with that I I'll wrap up our

play09:02

discussion on IP addresses thank you all

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
DHCPIP AddressNetwork ConfigurationDynamic AllocationInternet ProtocolNetwork ServerIP AddressingProtocol StackISPICANN
¿Necesitas un resumen en inglés?