1 / 17

CS 457 – Lecture 10 Internetworking and IP

CS 457 – Lecture 10 Internetworking and IP. Spring 2012. ICMP protocol error reporting router “ signaling ”. IP protocol addressing conventions datagram format packet handling conventions. Routing protocols path selection RIP, OSPF, BGP. Forwarding table. The Network layer.

donal
Télécharger la présentation

CS 457 – Lecture 10 Internetworking and IP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 457 – Lecture 10Internetworking and IP Spring 2012

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

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

  4. 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 IP Fragmentation & Reassembly • fragmentation: • in: one large datagram • out: 3 smaller datagrams • reassembly

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

  6. 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! Addressing

  7. 00001100 00100010 10011110 00000101 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. forwarding table 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 1.2.3.4 5.6.7.8 2.4.6.8 1.2.3.5 5.6.7.9 2.4.6.9 ... • ... host host host host host host LAN 2 • LAN 1 router router router WAN WAN 1.2.3.4 1.2.3.5

  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 2 • LAN 1 • router • router • router • WAN • WAN • LAN = Local Area Network • WAN = Wide Area Network

  10. 00001100 00100010 10011110 00000101 Hierarchical Addressing: IP Prefixes • Divided into network & host portions (left and right) • 12.34.158.0/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. 00001100 11111111 00100010 11111111 11111111 10011110 00000000 00000101 IP Address and 24-bit Subnet Mask Address 12 34 158 5 255 255 255 0 Mask

  12. Scalability Improved • Number related hosts from a common subnet • 1.2.3.0/24 on the left LAN • 5.6.7.0/24 on the right LAN 1.2.3.4 1.2.3.7 1.2.3.156 5.6.7.8 5.6.7.9 5.6.7.212 ... ... host host host host host host LAN 2 LAN 1 router router router WAN WAN 1.2.3.0/24 5.6.7.0/24 • forwarding table

  13. Easy to Add New Hosts • No need to update the routers • E.g., adding a new host 5.6.7.213 on the right • Doesn’t require adding a new forwarding entry 1.2.3.4 1.2.3.7 1.2.3.156 5.6.7.8 5.6.7.9 5.6.7.212 ... ... host host host host host host LAN 2 LAN 1 router router router host WAN WAN 5.6.7.213 1.2.3.0/24 5.6.7.0/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 ??? 1.2.3.7 1.2.3.156 ... ... host DNS host DNS host host 5.6.7.0/24 1.2.3.0/24 1.2.3.19 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., 12.178.66.9) • Not portable, and depends on where the host is attached • Used to get a packet to destination IP subnet

More Related