Presentation is loading. Please wait.

Presentation is loading. Please wait.

Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping.

Similar presentations


Presentation on theme: "Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping."— Presentation transcript:

1 Support Protocols and Technologies

2 Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping IP to MAC addresses (ARP) What happens when something goes wrong during forwarding? – Need to be able to find the problem (ICMP) NAT (Network Address Translation): A widely used technology to get Internet connection for multiple devices at the edges of the network, e.g., homes

3 Getting IP Address Problem: – A node wakes up for the first time… – What is its IP address? What’s the IP address of its router? Etc. – At least MAC address is on NIC

4 Getting IP Address Old days – manual configuration Problems?

5 Dynamic Host Configuration Protocol (DHCP) With DHCP, you don’t need the IP of the gateway the subnet mask DNS server contact IT office to get an IP Your computer needs a DHCP client to send out DHCP request. A DHCP server in a network listens to DHCP requests and responses a request with an IP assignment.

6 DHCP Assign IP addresses automatically – The concept of plug-and-play networking DHCP addresses are leased for a finite period. – A host can renew the address. Normally, DHCP approves each lease extension However, a server may be configured to deny lease extension for administrative or technical reasons ipconfig /all

7 DHCP Protocol Stack DHCP is a client-server application – Uses UDP ports 67,68 DHCP UDP IP Ethernet

8 DHCP Addressing Bootstrap issue: – How does node send a IP message to DHCP server before it is configured? Answer: – Node sends broadcast messages that delivered to all nodes on the network IP broadcast address: 255.255.255.255 MAC broadcast address: FF:FF:FF:FF:FF:FF

9 A DHCP Process

10 Step 1: DHCPDiscovery (I need an IP.) – Source IP: 0.0.0.0 – Destination IP: 255.255.255.255 Step 2: DHCPOffer (Here is an IP, 192.168.1.100, and other related information. Do you want it?) – Source IP: 192.168.1.1 – Destination IP: 255.255.255.255 Step 3: DHCPRequest (I will take it!) – Source IP: 0.0.0.0 – Destination: 255.255.255.255 Step 4: DHCPAcknowledgement (You can take it.) – Source IP: 192.168.1.1 – Destination IP: 255.255.255.255

11 More on DHCP After-class reading: Section 23.15 – 23.17 – DHCP Message format – Indirect DHCP Server – IPv6 Autoconfiguration Lab exercise 4: DHCP

12 Sending an IP packet Problem: – A node needs MAC addresses to send a frame over the local link – How does it get the destination MAC address from a destination IP address?

13 ARP (Address Resolution Protocol) Node uses to map a local IP address to its Link layer (MAC) address Dest. MAC Source MAC I like you Dest. IP Source IP Layer 3 header Layer 3 payloadLayer 2 header Target From NIC From DHCP From ARP

14 ARP Protocol Stack ARP sits right on top of link layer – No servers, just asks node with target IP to identify itself – Uses broadcast to reach all nodes Broadcast MAC address: FF:FF:FF:FF:FF:FF ARP Ethernet

15 “I'm looking for the MAC address of a computer that has IP address 1.2.3.4” “I'm the computer with IP address 1.2.3.4, and my MAC address is 11:22:33:44:55:66” ARP

16 Address resolution is always restricted to a single network at a time. Example: – X resolves the address of R 1 – R 1 resolves the address of R 2 – R 2 resolves the address of Y

17 More on ARP After-class reading: Section 23.5 – 23.7 – APR message format and encapsulation – ARP caching and message processing Lab exercise 5: Wireshark ARP

18 Internet Control Message Protocol (ICMP) ICMP is a companion protocol to IP – They are implemented together – Provides error report and testing – Sits on top of IP

19 ICMP Errors When router encounters an error while forwarding: – It sends an ICMP error report back to the IP source address – It discards to problematic packet; host needs to rectify

20 Example ICMP Messages Ping: Host sends Echo Request, and destination responds with an Echo Reply

21 Error Type 11: Time Exceeded IP header contains TTL (Time to live) field – Decremented every router hop, with ICMP error if it hits zero – Protects against forwarding loops

22 Traceroute Traceroute repurposes TTL and ICMP functionality – Sends probe packets increasing TTL starting from 1 – Receives an Time Exceeded error message from each intermediate router, and an Echo Reply from the ultimate destination 3 probes Local host Remote host 1 hop 2 hop 3 hop N-1 hop N hop

23 Network Address Translation (NAT) Motivated by IP address scarcity A mechanism to allow multiple computers at a site to share a single, globally valid IP address Transparent communication – These computers are perceived as "one" computer by other computers. – These computers can access the Internet as if they have their own IP address.

24 24 How NAT works (1) NAT uses two types of addresses – The NAT device itself is assigned a single globally-valid IP address – Hotel hotline – Each computer at the site is assigned a unique private address E.g., 192.168.0.1, 192.168.0.2,… 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 Blocks of private addresses designed by IETF

25 25 How NAT works (2) NAT keeps an internal/external table – Typically uses IP address + TCP port – Known as Network Address and Port Translation (NAPT) Need ports to make mapping 1-1 since there are fewer external IPs Internal IP : portExternal IP : port 192.168.0.1:30000128.10.24.6:40001 192.168.0.2:30000128.10.24.6:40002 192.168.0.10:12345128.10.24.6:40003

26 How NAT works (3) SRC = 192.168.0.1:30000 DST = 198.133.219.25:80 SRC = 128.210.24.6:40001 DST = 198.133.219.25:80 Internal IP : portExternal IP : port 192.168.0.1:30000128.10.24.6:40001 Internal  External – Look up and rewrite source IP/port

27 How NAT works (4) SRC = 198.133.219.25:80 DST = 192.168.0.1:30000 SRC = 198.133.219.25:80 DST = 128.210.24.6:40001 Internal IP : portExternal IP : port 192.168.0.1:30000128.10.24.6:40001 External  Internal – Look up and rewrite destination IP/port

28 NAT Software and Systems for Use at Home I’m a NAT box too!

29 NAT Downsides Connectivity has been broken! – Can only send incoming packets after an outgoing connection is setup – Difficult to run servers or P2P apps (Skypes) at home Doesn’t work so well when there are no connections (UDP apps) Breaks apps that unwisely expose their IP addresses (FTP)


Download ppt "Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping."

Similar presentations


Ads by Google