Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
06 Mar 12
04netC
06 Mar 12
04netC
06 Mar 12
DHCP overview:
host broadcasts DHCP discover msg DHCP server responds with DHCP offer msg host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg
04netC CSCD58S Computer Networks 5
06 Mar 12
DHCP server
223.1.2.9
223.1.2.1
B
223.1.1.3 223.1.3.1 223.1.3.27
223.1.2.2
223.1.3.2
04netC
06 Mar 12
arriving client
time
04netC
06 Mar 12
DHCP: example
DHCP DHCP DHCP DHCP
connecting laptop needs its IP address, addr of firsthop router, addr of DNS server: use DHCP
168.1.1.1
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
04netC
06 Mar 12
DHCP: example
DHCP DHCP DHCP DHCP
DHCP server formulates DHCP ACK containing clients 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 DNS server, IP address of its firsthop router
9
04netC
06 Mar 12
DHCP
advantages over fixed address assignment:
simplifies network administration (and reduces errors e.g. 2 hosts using same IP address due to misconfiguration) improves utilization of address space support for roaming users
each DHCP server controls a block of IP addresses that it makes available to individual hosts on demand IP addresses are leased
client should renew after about 2/3 of lease has expired soft state, leases revert if not renewed client can send DHCPRelease or just allow the lease to expire
04netC CSCD58S Computer Networks 10
06 Mar 12
sits between a network and the Internet job is to translate local network layer addresses to global IP addresses shares a single (or pool of) IP address(es) among a larger number of hosts uses special unallocated (non-public) addresses (RFC 1597) within the local network
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
04netC CSCD58S Computer Networks 11
06 Mar 12
10
06 Mar 12
192.168.0.1
192.168.0.2
Datagrams with source or All datagrams leaving local destination in this network network have same single source have 192.168.0/24 address for NAT IP address: 138.76.29.7, source, destination (as usual) different source port numbers
04netC
13
11
06 Mar 12
new source port #> in dest fields of every incoming datagram with corresponding <source IP address, port #> stored in NAT table
04netC CSCD58S Computer Networks 14
12
06 Mar 12
1
10.0.0.4
S: 128.119.40.186, 80 D: 10.0.0.1, 3345
10.0.0.1
10.0.0.2
138.76.29.7
S: 128.119.40.186, 80 D: 138.76.29.7, 5001
10.0.0.3 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345
CSCD58S Computer Networks 16
13
06 Mar 12
?
10.0.0.4
solution 1: statically configure NAT to forward incoming connection requests at given port to server
e.g., (123.76.29.7, port 2500) always forwarded to 10.0.0.1 port 25000
04netC
138.76.29.7
NAT router
19
14
06 Mar 12
10.0.0.1
IGD
10.0.0.4 138.76.29.7
NAT router
15
06 Mar 12
10.0.0.1
NAT router
04netC
21
16