Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet Protocol. IP overview Service model Addressing Forwarding (Routing later)

Similar presentations

Presentation on theme: "Internet Protocol. IP overview Service model Addressing Forwarding (Routing later)"— Presentation transcript:

1 Internet Protocol

2 IP overview Service model Addressing Forwarding (Routing later)

3 Layer reminder Bridges - emulate single link  Everything broadcast  Same collision domain Switches - emulate single network  Flat addressing  Broadcast supported Internet - connect multiple networks  Hierarchical addressing  No broadcast  Highly scalable

4 IP service model Service provided to transport layer (TCP, UDP)  Global name space  Host-to-host connectivity (connectionless)  Best-effort packet delivery Not in IP service model  Delivery guarantees on bandwidth, delay or loss Delivery failure modes  Packet delayed for a very long time  Packet loss  Packet delivered more than once  Packets delivered out of order

5 IP comparison with ATM Network Architecture Service Model GuaranteesCongestion Feedback BandwidthLossOrderTiming Internetbest effort noneno ATMCBRconstantyes no congestion ATMVBRguaranteed rate yes no congestion ATMABRguaranteed minimum noyesnoyes ATMUBRnonenoyesno

6 IP addressing Ethernet address space  Flat  Assigned at manufacture time IP address space  Hierarchical  Assigned at configuration time

7 IP Addressing: introduction IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link  routers typically have multiple interfaces  host typically has one interface  IP addresses associated with each interface = 11011111 00000001 00000001 00000001 223 111

8 IP networks Address has 2 components  Network (high-order bits)  Host (low-order bits)

9 IPv4 Address Model ClassNetwork IDHost ID# of Addresses # of Networks A0 + 7 bit24 bit2 24 -2126 B10 + 14 bit16 bit65,536 - 22 14 C110 + 21 bit8 bit256 - 22 21 D1110 + Multicast AddressIP Multicast EFuture Use 0Network (7 bits) Network (14 bits) 110 10 Network (21 bits) Host (24 bits) Host (16 bits) Host (8 bits) Class A: Class B: Class C:

10 IP networks Class A network: (MIT)  has address Class B network: (UIUC)  has address Class C network: (Parkland)  has address

11 CIDR 3-class model too inflexible CIDR: Classless InterDomain Routing  Arbitrary number of bits to specify network  Address format: a.b.c.d/x, where x is # bits in network portion 11001000 00010111 00010000 00000000 subnet part host part

12 Classless Domains Internet Archive -  4K hosts  - AT&T -  16K hosts  - UUNET -  4M hosts  -

13 IP forwarding Forwarding table has:  Network number  Interface Avoid having to store 4 billion entries  But there are still 2 million class C’s  …and perhaps more CIDR networks

14 Hierarchical Networks “Send me anything with addresses beginning” Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “Send me anything with addresses beginning” Organization 2......

15 Subnetting UIUC -  - CRHC -  - EWS -  -

16 Forwarding Tables Most specific rule is used Most hosts outside of the core have default rules CRHC EWS UIUC Internet if1 if2 if4 if3

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

18 NAT: Network Address Translation Motivation: local network uses just one IP address as far as outside world is concerned:  range of addresses not needed from ISP: just one IP address for all devices  can change addresses of devices in local network without notifying outside world  can change ISP without changing addresses of devices in local network  devices inside local net not explicitly addressable, visible by outside world (a security plus).

19 NAT: Network Address Translation Implementation: NAT router must:  outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr.  remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair  incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table

20 NAT: Network Address Translation S:, 3345 D:, 80 1 1: host sends datagram to, 80 NAT translation table WAN side addr LAN side addr, 5001, 3345 …… S:, 80 D:, 3345 4 S:, 5001 D:, 80 2 2: NAT router changes datagram source addr from, 3345 to, 5001, updates table S:, 80 D:, 5001 3 3: Reply arrives dest. address:, 5001 4: NAT router changes datagram dest addr from, 5001 to, 3345

21 NAT: Network Address Translation 16-bit port-number field:  60K simultaneous connections with a single LAN-side address! NAT is controversial:  routers should only process up to layer 3  violates end-to-end argument NAT possibility must be taken into account by app designers, eg, P2P applications  address shortage should instead be solved by IPv6

22 IPv4 Address Translation support IP addresses to LAN physical addresses Problem  An IP route can pass through many physical networks  Data must be delivered to destination’s physical network  Hosts only listen for packets marked with physical interface names Each hop along route Destination host

23 IP to Physical Address Translation Hard-coded  Encode physical address in IP address  Ex: Map Ethernet addresses to IP addresses Makes it impossible to associate address with topology Fixed table  Maintain a central repository and distribute to hosts Bottleneck for queries and updates Automatically generated table  Use ARP to build table at each host  Use timeouts to clean up table

24 ARP Check table for physical address If address not present  Broadcast a query, include host’s translation  Wait for a response Upon receipt of ARP query/response  Targeted host responds with address translation  If address already present Refresh entry and reset timeout  If address not present Add entry for requesting host Ignore for other hosts Timeout and discard entries after O(10) minutes

25 ARP Packet TargetHardwareAddr (bytes 2 – 5) TargetProtocolAddr (bytes 0 – 3) SourceProtocolAddr (bytes 2 – 3) Hardware type = 1ProtocolType = 0x0800 SourceHardwareAddr (bytes 4 – 5) TargetHardwareAddr (bytes 0 – 1) SourceProtocolAddr (bytes 0 – 1) HLEN = 48PLEN = 32Operation SourceHardwareAddr (bytes 0 – 3) 081631

26 IP Packet Format Version HLen TOSLength IdentFlagsOffset TTLProtocolChecksum SourceAddr DestinationAddr Options (variable) Pad (variable) 048161931 Data

27 IP Packet Format 4-bit version  IPv4 = 4, IPv6 = 6 4-bit header length  Counted in words, minimum of 5 8-bit type of service field (TOS)  Mostly unused 16-bit data length  Counted in bytes

28 IP Packet Format Fragmentation support  16-bit packet ID All fragments from the same packet have the same ID  3-bit flags 1-bit to mark last fragment  13-bit fragment offset into packet Counted in 8-byte words 8-bit time-to-live field (TTL)  Hop count decremented at each router  Packet is discard if TTL = 0

29 IP Packet Format 8-bit protocol field  TCP = 6, UDP = 17 16-bit IP checksum on header 32-bit source IP address 32-bit destination IP address Options  Variable size  Source-based routing  Record route Padding  Fill to 32-bit boundaries

30 IP Packet Size Problem  Different physical layers provide different limits on frame length Maximum transmission unit (MTU)  Source host does not know minimum value Especially along dynamic routes

31 IP Fragmentation and Reassembly Solution  When necessary, split IP packet into acceptably sized packets prior to sending over physical link  Questions Where should reassembly occur? What happens when a fragment is damaged/lost?

32 IP Fragmentation and Reassembly Fragments are self-contained IP datagrams Reassemble at destination to minimize refragmentation Drop all fragments in packet if one or more fragments are lost Avoid fragmentation at source host  Transport layer should send packets small enough to fit into one MTU of local physical network Must consider IP header  Note: MTU in ATM is based on CS-PDU size

33 IP Fragmentation and Reassembly ETHIP(1400)FDDIIP(1400) PPPIP(376) PPPIP(512) PPPIP(512) ETHIP(376) ETHIP(512) ETHIP(512) Start of header Ident = x0Offset 0 Rest of header 1400 data bytes Start of header Ident = x1Offset 0 Rest of header 512 data bytes Start of header Ident = x1Offset 512 Rest of header 512 data bytes Start of header Ident = x0Offset 1024 Rest of header 376 data bytes H1R1R2R3H2 ETHFDDIPPPETH

34 Internet Control Message Protocol (ICMP) IP companion protocol  Handles error and control messages ModemATMFDDIEthernet FTPTFTPNVHTTP TCPUDP IP ICMP

35 Error Messages  Host unreachable  Reassembly failed  IP checksum failed  TTL exceeded (packet dropped)  Invalid header Control Messages  Echo/ping request and reply  Echo/ping request and reply with timestamps  Route redirect

36 Traceroute and ICMP Source sends series of UDP segments to dest  First has TTL =1  Second has TTL=2, etc.  Unlikely port number When nth datagram arrives to nth router:  Router discards datagram  And sends to source an ICMP message (type 11, code 0)  Message includes name of router& IP address When ICMP message arrives, source calculates RTT Traceroute does this 3 times Stopping criterion UDP segment eventually arrives at destination host Destination returns ICMP “host unreachable” packet (type 3, code 3) When source gets this ICMP, stops.

37 Host Configuration Plug new host into network  How much information must be known?  What new information must be assigned?  How can process be automated? Some answers  Host needs an IP address (must know it)  Host must also Send packets out of physical (direct) network Thus needs physical address of router

38 Host Configuration Reverse Address Resolution Protocol (RARP)  Translate physical address to IP address  Used to boot diskless hosts  Host broadcasts request to boot  RARP server tells host the host’s own IP address Boot protocol (BOOTP)  Use UDP packets for same purpose as RARP  Allows boot requests to traverse routers  IP address of BOOTP server must be known  Also returns file server IP, subnet mask, and default router for host

39 Dynamic Host Configuration Protocol (DHCP) A simple way to automate configuration information  Network administrator does not need to enter host IP address by hand  Good for large and/or dynamic networks

40 Dynamic Host Configuration Protocol (DHCP) New machine sends request to DHCP server for assignment and information Server receives  Directly if new machine given server’s IP address  Through broadcast if on same physical network  Via DHCP relay nodes that forward requests onto the server’s physical network Server assigns IP address and provides other info Can be made secure (present signed request or just a “valid” physical address)

41 DHCP DHCP Server Host A Host A broadcasts DHCPDISCOVER message Host A broadcasts DHCP request Host B DHCP Server DHCP Relay Other Network s Relay unicasts DHCP request to server Server responds with host’s IP address

Download ppt "Internet Protocol. IP overview Service model Addressing Forwarding (Routing later)"

Similar presentations

Ads by Google