View
68
Download
0
Category
Tags:
Preview:
DESCRIPTION
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”) - PowerPoint PPT Presentation
Citation preview
Network Layer 4-1
DHCP: Dynamic Host Configuration Protocol
Goal: allow host to dynamically obtain its IP address from network server when it joins networkCan renew its lease on address in useAllows 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 4-2
DHCP client-server scenario
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
A
B
E
DHCP server
arriving DHCP client needsaddress in thisnetwork
Network Layer 4-3
DHCP client-server scenarioDHCP server: 223.1.2.5 arriving
client
time
DHCP discover
src : 0.0.0.0, 68 dest.: 255.255.255.255,67yiaddr: 0.0.0.0transaction ID: 654
DHCP offer
src: 223.1.2.5, 67 dest: 255.255.255.255, 68yiaddrr: 223.1.2.4transaction ID: 654Lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68 dest:: 255.255.255.255, 67yiaddrr: 223.1.2.4transaction ID: 655Lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67 dest: 255.255.255.255, 68yiaddrr: 223.1.2.4transaction ID: 655Lifetime: 3600 secs
Network Layer 4-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 4-5
DHCP: example
connecting laptop needs its IP address, addr of first-hop router, addr of DNS server: use DHCP
router(runs DHCP)
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.1 Ethernet
Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server
Ethernet demuxed to IP demuxed, UDP demuxed to DHCP
168.1.1.1
Network Layer 4-6
DCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server
router(runs DHCP)
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
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: example
Network Layer 4-7
NAT: Network Address Translation
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
138.76.29.7
local network(e.g., home network)
10.0.0/24
rest ofInternet
Datagrams with source or destination in this networkhave 10.0.0/24 address for
source, destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address: 138.76.29.7,different source port numbers
Network Layer 4-8
NAT – Network Address Translation
Placement and operation of a NAT box.
Network Layer 4-9
Internet Control Message Protocol
The principal ICMP message types.
5-61
Network Layer 4-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
Network Layer 4-11
Exercises A router has the following entries in its
routing table: Address/mask Next hop135.46.56.0/22 interface 0135.46.60.0/22 interface 1192.53.40.0/23 interface 2default interface 31. For each of the following addresses, what
does the router do if a packet with that address arrives: a) 135.46.63.10, b) 135.46.57.14, c)135.46.52.2, d)192.53.40.7, e) 192.53.56.7
Network Layer 4-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 4-13
Exercises
A router has just received the following new IP addresses: 57.6.96.0/21, 57.6.104.0/21, 57.6.112.0/21, and 57.6.120.0/21. If all of them use the same outgoing line, can they be aggregated? If so, to what? If not, why not?
Network Layer 4-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? 255.255.224.0 255.255..255.230 255.255.255.224 255.255.255.240 None of the above
Network Layer 4-15
Solution
Answer: CExplanation:The default subnet mask for class C networkis 255.255.255.0. If one has to create 5subnets, then 3 bits are required. With 3bits we can create 6 subnets. The remaining5 bits are used for Hosts. One can create 30hosts using 5 bits in host field. This matcheswith the requirement.
Network Layer 4-16
Exercises
If a host on a network has the address 172.16.210.0/22, what is the address of the subnetwork to which the host belongs? 172.16.42.0 172.16.107.0 172.16.208.0 172.16.255.208 172.16.254.0
Network Layer 4-17
Solution
Answer: C
Explanation:
This question is much easier then it appears when
you convert it to binary and do the Boolean operationas shown below:
IP address 172.16.210.0 =
10101100.00010000.11010010.00000000
/22 mask = 11111111.11111111.11111100.00000000
AND result = 11111111.11111111.11010000.00000000
AND in decimal= 172 . 16 . 208 . 0
Network Layer 4-18
Exercises
How many subnetworks and hosts are available per subnet if you apply /28 mask to the 210.10.2.0 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 4-19
Solution
Answer: EExplanation:A 28 bit subnet mask(11111111.11111111.11111111.11110000)
appliedto a class C network uses a 4 bits fornetworks, and leaves 4 bits for hosts. Usingthe 2n-2 formula, we have 24-2 (or 2x2x2x22) which gives us 14 for both the number ofnetworks, and the number of hosts.
Network Layer 4-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? 255.255.0.0 255.255.224.0 255.255.254.0 255.255.255.0 255.255.255.224
Network Layer 4-21
Solution
Answer: CExplanation:Using the 2n-2 formula for host addresses, 29-2 =510 host address, so a 9-bit subnet mask will providethe required number of host addresses. If these 9bits are used for the hosts in a class B network, thenthe remaining 7 bits are used for the number ofnetworks. Again using the 2n-2 formula, we have 2n-2 = 126 networks that are available.
Network Layer 4-22
Exercises
Given the following IP address and subnet mask: 172.16.211.12/20, find the broadcast address associated with the subnet that this IP address resides upon. 172.16.255.255 172.16.224.224 172.16.224.255 172.16.223.255 None of the above
Network Layer 4-23
Exercises
Your network uses the 172.12.0.0 IP address. You need to support 459 hosts per network, while accommodating the maximum number of subnets. Which mask would you use? 255.255.0.0 255.255.128.0 255.255.254.0 255.255.255.254 255.255.255.128
Network Layer 4-24
Solution
Answer:CExplanation:To obtain 459 hosts the number of host bitswill be 9. This can support a maximum of
510hosts. To keep 9 bits for hosts means thelast bit in the 3rd octet will be 0. This gives255.255.254.0 as the subnet mask.
Network Layer 4-25
Exercises
The LAU network was assigned the class C network address 189.66.1.0 from the ISP. If the administrator at LAU were to subnet this class C network using the 255.255.255.224 subnet mask, how many hosts will they be able to support on each subnet?
14 16 32 30 None of the above
Network Layer 4-26
Solution
Answer: DExplanation:The subnet mask 255.255.255.224 is a 27 bit mask(11111111.11111111.11111111.11100000). It uses 3
bitsfrom the host Id for the network ID, leaving 5 bitsfor host addresses. We can calculate the number ofhosts supported by this subnet by using the 2n-2formula where n represents the number of host bits.In this case it will be 5. 25-2 gives us 30.
Network Layer 4-27
Exercises
You have been the CIDR block of 115.64.4.0/22 from your ISP. Which of the IP addresses below can you use for a host? 115.64.8.32 115.64.7.64 115.64.6.255 115.64.3.255 115.64.5.128 115.64.12.128
Network Layer 4-28
Solution
Answer: B, C, EExplanation:115.64.4.0 =01110011.01000000.00000100.00000000Subnet mask = 11111111.11111111.11111100.00000000=
255.255.252.0Subnet number =01110011.01000000.00000100.00000000=115.64.4.0Broadcast =
01110011.01000000.00000111.11111111=115.64.7.255Valid address range = 115.64.4.1 - 115.64.7.254
Recommended