Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 457 – Lecture 10 Internetworking and IP

Similar presentations


Presentation on theme: "CS 457 – Lecture 10 Internetworking and IP"— Presentation transcript:

1 CS 457 – Lecture 10 Internetworking and IP
Spring 2012

2 The Network layer Network layer Transport layer: TCP, UDP
IP protocol addressing conventions datagram format packet handling conventions Routing protocols path selection RIP, OSPF, BGP Network layer Forwarding table ICMP protocol error reporting router “signaling” Link layer Physical layer

3 32 bit destination IP address
IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit.

4 IP Fragmentation & Reassembly
network links have MTU (max.transfer size) - largest possible link-level frame. different link types, different MTUs large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

5 IP Fragmentation and Reassembly
ID =x Offset =0 Fragflag =0 Length =4000 Fragflag =1 Length =1500 Offset =185 Offset =370 Length =1040 One large datagram becomes several smaller datagrams Example 4000 byte datagram MTU = 1500 bytes 1480 bytes in data field offset = 1480/8

6 Addressing Already have MAC layer addresses
Ethernet provides addresses And so do other link layers But can’t use Ethernet address at IP Ethernet addresses are flat Ethernet address assignment is not related to the network topology Ethernet is not the only link layer!

7 IP Address (IPv4) A unique 32-bit number (i.e., 4B addresses)
Identifies an interface (on a host, on a router, …) Represented in dotted-quad notation 12 34 158 5

8 Scalability Challenge
Suppose hosts had arbitrary addresses Then every router would need a lot of information …to know how to direct packets toward the host ... ... host host host host host host LAN 1 LAN 2 router router router WAN WAN forwarding table

9 Grouping Related Hosts
The Internet is an “inter-network” Used to connect networks together, not hosts Needs a way to address a network (i.e., group of hosts) ... ... host host host host host host LAN 1 LAN 2 router router router WAN WAN LAN = Local Area Network WAN = Wide Area Network

10 Hierarchical Addressing: IP Prefixes
Divided into network & host portions (left and right) /24 is a 24-bit prefix with 28 addresses More on Hierarchy (CIDR) in next lectures 12 34 158 5 Network (24 bits) Host (8 bits)

11 IP Address and 24-bit Subnet Mask
12 34 158 5 255 255 255 Mask

12 Scalability Improved Number related hosts from a common subnet
/24 on the left LAN /24 on the right LAN ... ... host host host host host host LAN 1 LAN 2 router router router WAN WAN /24 /24 forwarding table

13 Easy to Add New Hosts No need to update the routers
E.g., adding a new host on the right Doesn’t require adding a new forwarding entry ... ... host host host host host host LAN 1 LAN 2 router router router host WAN WAN /24 /24 forwarding table

14 Avoiding Manual Configuration
Address Resolution Protocol (ARP) Learn mapping between IP address and MAC address Dynamic Host Configuration Protocol (DHCP) End host learns IP address, DNS servers, and gateway ??? ... ... host host DNS host host DNS /24 /24 router router router

15 Key Ideas in ARP and DHCP
Broadcasting: when in doubt, shout! Broadcast query to all hosts in the local-area-network … when you don’t know how to identify the right one Caching: remember the past for a while Store the information you learn to reduce overhead Remember your own address & other host’s addresses Soft state: eventually forget the past Associate a time-to-live field with the information … and either refresh or discard the information Key for robustness in the face of unpredictable change

16 Broadcasting Broadcasting: sending to everyone
Special destination address: FF-FF-FF-FF-FF-FF All adapters on the LAN receive the packet Delivering a broadcast packet Easy on a “shared media” Like shouting in a room – everyone can hear you E.g., Ethernet, wireless, and satellite links

17 MAC Address vs. IP Address
MAC addresses Hard-coded in read-only memory when adaptor is built Like a social security number Flat name space of 48 bits (e.g., 00-0E-9B-6E-49-76) Portable, and can stay the same as the host moves Used to get packet between interfaces on same network IP addresses Configured, or learned dynamically Like a postal mailing address Hierarchical name space of 32 bits (e.g., ) Not portable, and depends on where the host is attached Used to get a packet to destination IP subnet


Download ppt "CS 457 – Lecture 10 Internetworking and IP"

Similar presentations


Ads by Google