Routing, Performance, Layers, Internetworking
- Routing: Link-State and Distance-Vector
- network performance
- the ISO 7-layer model
- reliable transmission
- flow and congestion control
- universal service
- internetworks
- routers
- protocols: TCP/IP
- IP addresses (start)
Link-State Routing
- With Dijkstra's algorithm, each router can build its routing tables given
a "map" (a graph representing the network)
- how do the routers get the map?
- each router broadcasts all the information it knows about: its links
to its neighbors
- each message has a sequence number: later information overrides
earlier information
- the "map" is pieced together from the information
- broadcasting is done by each node sending to its neighbors and
suppressing duplicates: flooding
Distance-Vector Routing
- suppose X sends its routing table to neighbor Y
- the cost for Y to reach X is mY(X)
- for every destination D with cost mX(D) in X's routing
table, Y compares mX(D)+mY(X) to mY(D).
- If mX(D)+mY(X) < mY(D), then a route through X is lower-cost
than the existing route, and Y updates its routing table appropriately
- all communication is between neighbors
- great for finding low-cost routes, slow at updating tables when
links fail
Network Performance
- the time to get 1 bit to a destination is delay (in seconds)
- one-way delay is also known as latency,
delay to a destination and back is also known as round-trip time
- the time to send n bits is throughput (in bits/second):
it is guaranteed never to exceed (GNE) the bandwidth of the slowest link
in the path, the bottleneck link
- delay components:
propagation delay (speed of light),
queuing delay (congestion),
access delays (MAC),
switching delays (store-and-forward)
- the bandwidth delay product is the maximum amount of data the network
will store
7-Layer model
- physical layer: how the bits are sent
- data-link layer: framing, MAC (single-hop)
- network layer: getting data end to end
- transport layer: reliability, control
- session layer: logins, authentication
- presentation layer: data encoding, encryption
- application layer, e.g. telnet, http
Transport Layer Functions
- the transport layer (Layer 4) is often the most complex, providing
functions such as:
- flow control (do not overwhelm slow receivers)
- congestion control (slow networks)
- reliable transmission: in-order delivery, no duplicate delivery,
no data loss
- fragmentation and reassembly
- adaptation to specific lower layers
- demultiplexing and application selection
Transmission Error Prevention
- add a sequence number (a counter) to each packet
- when packets are received in order, send an acknowledgement
- when packets are received out of order, send a negative acknowledgement
(NAK) or wait for the sender to time out
- sender must time out anyway in case the last packet is lost
- recycled sequence numbers can cause trouble if packets can be
arbitrarily delayed
- eliminates duplicate or out-of-order delivery, and packet loss
Flow and Congestion control
- an ack can carry information from the receiver back to the sender
- the information can state how much more data the receiver can handle:
a window -- the sender can only send data in the window
- as further acks are received, the window slides to the right
in sequence number space
- a window-size of 1 can be encoded simply by returning the ack: a
stop-and-wait protocol
- if a congested network can reduce the size of the window, senders
will slow down -- one form of congestion control
- throughput with a sliding window of size W bits, bottleneck
bandwidth B, round-trip delay D is T = min(B, W/D)
Universal Service
- any one network technology -- Ethernet, ATM, Frame Relay, SONET,
FDDI, token ring, modems -- only interconnects some computers
- we want and need to talk to all computers
- we need to connect different networks together
- bridges are limited:
- different frame formats are not always interconvertible
- different addresses are not compatible with each other
- as a network grows sufficiently large, technologies using
broadcasting become too inefficient
Internetworks and Routers
- an internetwork is two or more networks connected by routers
- a router can interconnect multiple networks
- the router forwards packets based on its routing table, queueing
packets if necessary, dropping packets if there is no route or no room
in the queue
- multiple routes allow greater internet reliability
- an internet is a virtual network: it is formed from many smaller
networks
Internet Protocols
- IP is the most widespread Internet Protocol
- TCP, the Transport Control Protocol, is the most widespread
transport-layer protocol used on top of IP
- all the routers in an internet must speak the same Internet Protocol (IP)
- changing the Internet Protocol is very challenging, because the
same protocol must be changed on the whole internet at the same time
- bridging: having a system that can translate between two different
networks
- tunneling: using one network to carry data for another
Requirements for Internet Protocols
- universal addressing
- hierarchical:
- end-to-end delivery
- fragmentation
- resource management: packet lifetime, bandwidth allocation
- open protocols, standard implementations, interoperability testing
IP Addresses
- each Internet host interface is configured with a unique 32-bit
address
- the address is configured, not hardwired
- IP addresses are hierarchical:
- the first n bits, n < 31, represent the network
- the remaining 32-n bits represent the host within the network (arbitrary)
- only the network numbers must be globally known
- n is different for different networks
- how do we know what n is?
- lookup table
- encode in the first few bits
IP Address Classes
- if the first bit is 0, n = 7, and the host part has 24 bits
(IP addresses 0.0.0.0 through 127.255.255.255) -- class A addresses
- if the first two bits are 10, n = 14, and the host part has 16 bits
(IP addresses 128.0.0.0 through 191.255.255.255) -- class B addresses
- if the first three bits are 110, n = 21, and the host part has 8 bits
(IP addresses 192.0.0.0 through 223.255.255.255) -- class C addresses
- other addresses are reserved (e.g. 1110 for multicast -- class E,
and 1111 -- class E)
Limitations of Address Classes
- the subdivision into address classes is very rigid
- around 1992, could foresee running out of class B addresses
- host needs to know n for this network to be able to tell
if an address is on the same or a different network -- why?
- routers needs to know n for each destination network
- solution:
- manually specify n for each end system
- automatically distribute n with each network destination address
when distributing routing information (link-state or distance-vector)
IP Address Masks
- specify n with a 32-bit number which has n ones followed by
32-n zeros
- examples:
- class A: 255.0.0.0
- class B: 255.255.0.0
- a network with 16 addresses: 255.255.255.240
- if A is an address, and M is a mask,
A and M gives the network part of the address, which
is also the network address
- if A is an address, and M is a mask,
A and \not M gives the host part of the address