CS 457 Lecture 10 Internetworking and IP Fall 2011 The Network - - PowerPoint PPT Presentation

cs 457 lecture 10 internetworking and ip
SMART_READER_LITE
LIVE PREVIEW

CS 457 Lecture 10 Internetworking and IP Fall 2011 The Network - - PowerPoint PPT Presentation

CS 457 Lecture 10 Internetworking and IP Fall 2011 The Network layer Transport layer: TCP, UDP IP protocol Routing protocols addressing conventions path selection datagram format RIP, OSPF, BGP Network


slide-1
SLIDE 1

CS 457 – Lecture 10 Internetworking and IP

Fall 2011

slide-2
SLIDE 2

The Network layer

Forwarding table

  • Routing protocols
  • path selection
  • RIP, OSPF, BGP
  • IP protocol
  • addressing conventions
  • datagram format
  • packet handling conventions
  • ICMP protocol
  • error reporting
  • router “signaling”
  • Transport layer: TCP, UDP
  • Link layer
  • physical layer
  • Network
  • layer
slide-3
SLIDE 3

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.
slide-4
SLIDE 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
slide-5
SLIDE 5

IP Fragmentation and Reassembly

ID =x Offset =0 Fragflag =0 Length =4000 ID =x Offset =0 Fragflag =1 Length =1500 ID =x Offset =185 Fragflag =1 Length =1500 ID =x Offset =370 Fragflag =0 Length =1040

  • One large datagram becomes
  • several smaller datagrams
  • Example
  • 4000 byte

datagram

  • MTU = 1500

bytes

  • 1480 bytes in

data field

  • offset =
  • 1480/8
slide-6
SLIDE 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!
slide-7
SLIDE 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

00001100 00100010 10011110 00000101

12 34 158 5

slide-8
SLIDE 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

  • LAN 1

... host host host LAN 2

  • ...

router router router WAN WAN

1.2.3.4 5.6.7.8 2.4.6.8 1.2.3.5 5.6.7.9 2.4.6.9 1.2.3.4 1.2.3.5

forwarding table

slide-9
SLIDE 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
  • LAN 1
  • ...
  • host
  • host
  • host
  • LAN 2
  • ...
  • router
  • router
  • router
  • WAN
  • WAN
  • LAN = Local Area Network
  • WAN = Wide Area Network
slide-10
SLIDE 10

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

00001100 00100010 10011110 00000101

Network (24 bits) Host (8 bits)

12 34 158 5

slide-11
SLIDE 11

IP Address and 24-bit Subnet Mask

00001100 00100010 10011110 00000101

12 34 158 5

11111111 11111111 11111111 00000000

255 255 255

Address Mask

slide-12
SLIDE 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

host host host LAN 1 ... host host host LAN 2 ... router router router WAN WAN

1.2.3.4 1.2.3.7 1.2.3.156 5.6.7.8 5.6.7.9 5.6.7.212 1.2.3.0/24 5.6.7.0/24

  • forwarding table
slide-13
SLIDE 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

host host host LAN 1 ... host host host LAN 2 ... router router router WAN WAN

1.2.3.4 1.2.3.7 1.2.3.156 5.6.7.8 5.6.7.9 5.6.7.212 1.2.3.0/24 5.6.7.0/24

  • forwarding table

host

5.6.7.213

slide-14
SLIDE 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 ... router router

1.2.3.0/24 5.6.7.0/24

1.2.3.7 1.2.3.156

???

1.2.3.19

router

slide-15
SLIDE 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

slide-16
SLIDE 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

slide-17
SLIDE 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

slide-18
SLIDE 18

What’s Next

  • Read Chapter 1, 2, 3, and 4.1-4.3
  • Next Lecture Topics from Chapter 4.2 and 4.3

– Routing

  • Homework

– Due Thursday

  • Project 2

– You should be working on Project 2!