Presentation is loading. Please wait.

Presentation is loading. Please wait.

DHCP: Dynamic Host Configuration Protocol

Similar presentations

Presentation on theme: "DHCP: Dynamic Host Configuration Protocol"— Presentation transcript:

1 DHCP: Dynamic Host Configuration Protocol
Goal: allow host to dynamically obtain its IP address from network server when it joins network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an “on”) Support for mobile users who want to join network (more shortly) DHCP overview: host broadcasts “DHCP discover” msg [optional] DHCP server responds with “DHCP offer” msg [optional] host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg Network Layer

2 DHCP client-server scenario
server B arriving DHCP client needs address in this network E Network Layer

3 DHCP client-server scenario
DHCP server: arriving client DHCP discover src : , 68 dest.: ,67 yiaddr: transaction ID: 654 DHCP offer src: , 67 dest: , 68 yiaddrr: transaction ID: 654 Lifetime: 3600 secs DHCP request src: , 68 dest:: , 67 yiaddrr: transaction ID: 655 Lifetime: 3600 secs time DHCP ACK src: , 67 dest: , 68 yiaddrr: transaction ID: 655 Lifetime: 3600 secs Network Layer

4 DHCP: more than IP address
DHCP can return more than just allocated IP address on subnet: address of first-hop router for client name and IP address of DNS sever network mask (indicating network versus host portion of address) Network Layer

5 DHCP: example DHCP UDP IP Eth Phy DHCP DHCP connecting laptop needs its IP address, addr of first-hop router, addr of DNS server: use DHCP DHCP DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in Ethernet DHCP DHCP UDP IP Eth Phy DHCP Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server router (runs DHCP) Ethernet demuxed to IP demuxed, UDP demuxed to DHCP Network Layer

6 DHCP: example DHCP DHCP UDP IP Eth Phy DCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server encapsulation of DHCP server, frame forwarded to client, demuxing up to DHCP at client client now knows its IP address, name and IP address of DSN server, IP address of its first-hop router DHCP UDP IP Eth Phy DHCP DHCP router (runs DHCP) DHCP Network Layer

7 NAT: Network Address Translation
rest of Internet local network (e.g., home network) 10.0.0/24 All datagrams leaving local network have same single source NAT IP address: , different source port numbers Datagrams with source or destination in this network have /24 address for source, destination (as usual) Network Layer

8 NAT – Network Address Translation
Placement and operation of a NAT box. Network Layer

9 Internet Control Message Protocol
The principal ICMP message types. 5-61 Network Layer

10 ICMP: example Hannah being a great network trouble shooter
Can test basic network connectivity using The ping command uses the ICMP sending a message called echo request The destination should reply with an ICMP echo reply IP needs to have a way to test basic IP connectivity, without relying on any applications to be working. Hannah, being a great network troubleshooter, can test basic network connectivity using the ping command. Ping (Packet Internet Groper) uses the ICMP protocol, sending a message called ICMP echo request to another IP address. The computer with that IP address should reply with an ICMP echo reply. Network Layer

11 Exercises A router has the following entries in its routing table:
Address/mask Next hop /22 interface 0 /22 interface 1 /23 interface 2 default interface 3 For each of the following addresses, what does the router do if a packet with that address arrives: a) , b) , c) , d) , e) Network Layer

12 Solution The packets are routed as follows: a) Interface 1
b) Interface 0 c) Interface 3 d) Interface 2 e) Interface 3 Network Layer

13 Exercises A router has just received the following new IP addresses: /21, /21, /21, and /21. If all of them use the same outgoing line, can they be aggregated? If so, to what? If not, why not? Network Layer

14 Exercises You have a class C network, and you need to design it for 7 usable subnets with each subnet handling a minimum of 18 hosts each. Which of the following network masks should you use? None of the above Network Layer

15 Solution Answer: C Explanation:
The default subnet mask for class C network is If one has to create 5 subnets, then 3 bits are required. With 3 bits we can create 6 subnets. The remaining 5 bits are used for Hosts. One can create 30 hosts using 5 bits in host field. This matches with the requirement. Network Layer

16 Exercises If a host on a network has the address /22, what is the address of the subnetwork to which the host belongs? Network Layer

17 Solution Answer: C Explanation:
This question is much easier then it appears when you convert it to binary and do the Boolean operation as shown below: IP address = /22 mask = AND result = AND in decimal= Network Layer

18 Exercises How many subnetworks and hosts are available per subnet if you apply /28 mask to the class C network 30 networks and 6 hosts 6 networks and 30 hosts 8 networks and 32 hosts 14 networks and 6 hosts None of the above Network Layer

19 Solution Answer: E Explanation: A 28 bit subnet mask
( ) applied to a class C network uses a 4 bits for networks, and leaves 4 bits for hosts. Using the 2n-2 formula, we have 24-2 (or 2x2x2x2 2) which gives us 14 for both the number of networks, and the number of hosts. Network Layer

20 Exercises Given that you have a class B IP address network range, which of the subnet masks below will allow for 100 subnets with 500 usable host addresses per subnet? Network Layer

21 Solution Answer: C Explanation:
Using the 2n-2 formula for host addresses, 29-2 = 510 host address, so a 9-bit subnet mask will provide the required number of host addresses. If these 9 bits are used for the hosts in a class B network, then the remaining 7 bits are used for the number of networks. Again using the 2n-2 formula, we have 2n- 2 = 126 networks that are available. Network Layer

22 Exercises Given the following IP address and subnet mask: /20, find the broadcast address associated with the subnet that this IP address resides upon. None of the above Network Layer

23 Exercises Your network uses the IP address. You need to support 459 hosts per network, while accommodating the maximum number of subnets. Which mask would you use? Network Layer

24 Solution Answer:C Explanation:
To obtain 459 hosts the number of host bits will be 9. This can support a maximum of 510 hosts. To keep 9 bits for hosts means the last bit in the 3rd octet will be 0. This gives as the subnet mask. Network Layer

25 Exercises The LAU network was assigned the class C network address from the ISP. If the administrator at LAU were to subnet this class C network using the subnet mask, how many hosts will they be able to support on each subnet? 14 16 32 30 None of the above Network Layer

26 Solution Answer: D Explanation:
The subnet mask is a 27 bit mask ( ). It uses 3 bits from the host Id for the network ID, leaving 5 bits for host addresses. We can calculate the number of hosts supported by this subnet by using the 2n-2 formula where n represents the number of host bits. In this case it will be gives us 30. Network Layer

27 Exercises You have been the CIDR block of /22 from your ISP. Which of the IP addresses below can you use for a host? Network Layer

28 Solution Answer: B, C, E Explanation:
= Subnet mask = = Subnet number = = Broadcast = = Valid address range = Network Layer

Download ppt "DHCP: Dynamic Host Configuration Protocol"

Similar presentations

Ads by Google