Professional Documents
Culture Documents
The context
Services should be independent of the router technology. Transport layer be shielded from the topology of the routers. The network addresses made available to the TL should use a uniform numbering plan, even across LANs and WANs.
Whether NL provides a CL service to the TL (Internet Community), or Whether It provides a CO service to the TL (telephone companies)
CL VS CO
CL : Since subnet is inherently unreliable, host should do the error , flow control, packet ordering etc themselves. CO : subnet must provide reliable service; QoS is imporatnt
Implementation of CL
Packets are called datagrams and the subnet is called datagram subnet.
5-4
5-4
Correctness Simplicity Robustness Stability : converge to equilibrium Fairness Optimality : Minimize mean packet delay, maximize throughput conflicting, since queuing near full capacity implies long delays
Equilibrium
Fairness Vs Optimality
Conflict between fairness and optimality.
Non-adaptive : Static
Adaptive : Dynamic
Routing Algorithms
The Optimality Principle Shortest Path Routing Flooding Distance Vector Routing Link State Routing Hierarchical Routing Broadcast Routing Multicast Routing Routing for Mobile Hosts Routing in Ad Hoc Networks
Flooding
Problems : Jamming/Congestion Solutions : 1. Hop count in the header 2. Sequence number for every source : discard duplicate packets. Adv: Though not practical for routine routing but useful when a system starts afresh.
Each router must do the following: Discover its neighbors, learn their network address. Measure the delay or cost to each of its neighbors. Construct a packet telling all it has just learned. Send this packet to all other routers. Compute the shortest path to every other router.
Problem
(a) Nine routers and a LAN. (b) A graph model of (a).
Send an ECHO packet The receiver sends it back immediately with a time stamp
(a) A subnet. (b) The link state packets for this subnet.
Hierarchical Routing
Hierarchical routing.
Individual packet for each destination Flooding Multidestination routing each packet has to contain either a list of destinations or a bit map indicating all the destinations. Spanning tree best in terms of channel utilization minimum number of copies are generated . But knowledge of some spanning tree at every router is required ..which is sometimes available (as in LSR) but sometimes not(as in DVR)
Approximates the behaviour of Spanning tree algo .. When routers have no knowledge of spanning trees.
Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding.
No knowledge of spanning trees required No bit map etc required Simple and easy to implement No additional CPU time required Not the best but in practice reasonably efficient.
Multicast Routing
(a) A network. (b) A spanning tree for the leftmost router. (c) A multicast tree for group 1. (d) A multicast tree for group 2.
Congestion Control
What is congestion?
Lot of packets arriving at 3-4 lines of a router, all needing the same output line. As a result, a queue will build up on the outgoing line. When the Q is full, packets will start dropping. Increasing the size of the buffer may help initially but after a certain limit may have adverse effect-- By the time a packet moves up in the Q, it times out and retransmitted increasing the load on the network.
Causes of congestion
Slow processors: If the computational powers of a router are weak, it will take time in bookkeeping and processing, again resulting in building up of Qs. Low bandwidth In fact, Slow processors and High bandwidth, or Fast processors but Low Bandwidth a good combination of fast processors and high bandwidth is required to improve the situation.
Solutions to Congestion
Open Loop solutions: Static Solutions, take preventive measures by good design, but no corrections are done once the system is up, that is do not take the current state of the system into account. Adv : simplicity
a router detects congestion, pass the information (feedback) to nodes where action can be taken, say the sender, and
Flow Control --- window size Acknowledgement policy --- piggyback or not Out-of-order policy --- Go back N/Selective repeat Retransmission Policy --- Time out etc
Detecting/Predicting congestion: Let u be any parameter being monitored say, output line utilization or queue length or buffer utilization; Let a be a constant between 0 and 1
Admission Control : No more new VCs Allow new VCs but route them around the problem area.
(a)
A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.
Warning Bit is set in the forwarded packet and copied en-route by the destination in the acknowledgement packet. Choke Packets are sent back to the sender as a feedback.
The corrective measures (slow down the transmission) are taken only at the source, Fig a. The corrective measures (slow down the forwarding of the packets coming from the source) are taken at every Hop en-route the Choke Packet, Fig b.
Internetworking
So far we have assumed that our subnet is connected to LANs of same type. So the only role of routers was to route the packets. As the h/w and n/w gets cheaper, the place where decisions are made move downwards in the hierarchy in an organization. For eg ..in a univ .. Each department decides on its own what type of LAN do they want. Hence Maths deptt may have an Ethernet LAN whereas CS may have a wireless LAN. Now the univ. must be able to provide a subnet to connect these two LANs so that a host on one
If that is not the case, then the scheme studied earlier will not suffice.
Connecting Networks
A collection of interconnected networks.
Connectionless Internetworking
A connectionless internet.
Tunneling
Tunneling a packet from Paris to London.
Tunneling (2)
Tunneling a car from France to England.
Autonomous System
Internetwork Routing
(a) An internetwork. (b) A graph of the internetwork.
Once a graph of multi-protocol routers(gateways) is constructed , routing algorithms such as DVR and LSR can be applied. This leads to 2-level routing in internetworks
Interior Gateway Protocol (within a network). Exterior Gateway Protocol (across the networks)
A host H1 on LAN 1 wants to send a packet to a host H2 on LAN 2. A packet is prepared by NL of H1 with Network address of H2 but, Encapsulated in a frame by the DLLwith MAC address of the multi-protocol router connected to LAN 1 Packet arrives at MPR1 on LAN1 NL at MPR1 uses the Network address to decide which MPR2 to forward the packet to. If the Network Protocol used by the Network through which MPR1 sends a packet to MPR2 is same as that used by LAN1, the packet is sent directly with no change in the packet. Else, the packet is encapsulated in the payload field of the packet of the Network Protocol used by the connecting Network and tunneled. Of course, assuming that the connecting network uses MAC addressing, DLL of MPR1 puts the MAC address of MPR2. The process is repeated at MPR2 Until the packet reaches the destination network.
Fragmentation
Fragmentation (2)
Fragmentation when the elementary data size is 1 byte. (a) Original packet, containing 10 data bytes. (b) Fragments after passing through a network with maximum packet size of 8 payload bytes plus
The IP Protocol IP Addresses Internet Control Protocols OSPF The Interior Gateway Routing Protocol BGP The Exterior Gateway Routing Protocol Internet Multicasting Mobile IP
Make sure it works. Keep it simple. Make clear choices. Exploit modularity. Expect heterogeneity. Avoid static options and parameters. Look for a good design; it need not be perfect. Be strict when sending and tolerant when receiving.
Collection of Subnetworks
The IP Protocol
The IPv4 (Internet Protocol) header.
IP Protocol contd..
Version IHL Type of Service Total Length, Identification, DF, MF, Fragment Offset TTL Protocol Header Checksum Options
Version Number
To let several versions to work simultaneouslyactually two during a transition period which takes years.
IP Protocol contd..
specified as number of 32 bit words 20 bytes (5 32 bit words) to 60 bytes (15 32 bit words)
IP Protocol contd..
Type of Service
Various combinations of reliability and speed can be specified here. For Example, digitized voice prefers fast over error-free transmission and file transfer prefers error-free over fast transmission. Routers on the way use this information to choose a path. If the shortest path is error-prone, it may use an alternate path to transfer a packet for file-transfer whereas for voice packet it will choose the shortest path even if it is error-prone.
Next 3 are flags : D (delay), T (Throughput) and R (Reliability) Allow the routers to make a choice between high throughput and high delay link like satellite and low throughput, low delay link like leased line.
IP Protocol contd..
Other fields
Total Length: Header + Data: 16 bits ..65,535 bytes Identification No.: To know which datagram the fragment belongs to DF, MF: Dont Fragment and More Fragment Fragment Offset:
specified in number of elementary fragment unit i.e. 8 bytes i.e multiple of 8 bytes. 13 bits 2^13=8192 Total Datagram : 8192 * 8. IP Protocol contd..
Time to Live
Specified in seconds and decremented on every Hop and even when in the queue. In practice, Number of Hops is used.
IP Protocol contd..
Protocol
Mentions the number of Transport Layer Protocol to which the packet must be handed over. For eg. TCP/UDP or any other. These TP are assigned numbers (called ports) are unique across the globe.
IP Protocol contd.
Header Checksum
to take care of error that might creep in due to bad bits in the router memory. TTL field changes at every hop
IP Protocol contd..
Assigned by central naming authority ICANN: Internet Corporation for Assigned Names and Numbers
IP Addresses
IP address formats.
202.14.13.1 192.133.13.5
IP Addresses (2)
Special IP addresses.
Routing Tables
(network,0) (this network, host) Note the first type of entry. By keeping only the network number and not all the IP addresses belonging to a distant network, the size of the routing table is greatly reduced.
Subnets
A campus network consisting of LANs for various departments.
Subnets (2)
Routing Tables
Most of the people are opting for broadband Internet Connection i.e. a permanent IP address One solution : IPV6 : 128 bit address, but it will take years to come. A quick solution is needed : NAT
10.0.0.0 -- 10.255.255.255/8 172.16.0.0 172.31.255.255/12 192.168.0.0 192.168.255.255/16 For example : Delhi University Intranet
IP addresses are of the form : 10.25.2.23 Gateway : 10.25.1.4 DNS : 10.2.1.13, 10.2.1.16
Working of NAT
Before a packet from internal host exits the company (connected to ISP through say a leased line) as shown in the figure or a packet from a home/ business user connected through broadband to ISP exits ISP local IP address (10.x.y.z etc) is mapped to the company's/ ISP' s true IP address and sent out.
NAT contd..
NAT must remember the internal addresses. How? It uses Header of the Transport Layer. Source Port field is replaced by a pointer to an entry in a table (maintained by NAT box) containing the local address. How does it remember the Source Port then? The table entry contains the source port
ICMP : Internet Control Message Protocol : used by the routers to monitor the Internet for unexpected events, and also to test the Internet from time to time. ARP : Address Resolution Protocol: maps an IP address to a unique DLL address RARP : Reverse ARP: DLL address to IP BOOTP, DHCP and others
ARP
Although every machine on the Internet has one or more IP addresses, they are not sufficient for sending packets as the DLL h/w doesnt understand the IP addresses. How are IP addresses mapped to DLL addresses?
Suppose H1 wants to send a packet to H2. It sends a broadcast packet (broadcast address in the DLL address for destination) on its LAN asking: who owns the IP address 192.31.65.5? Everyone on LAN1 gets it but only H2 replies with its DLL address. H1 now prepares the data packet meant for H2 and sends it.
Now Suppose H1 wants to send a packet to H4. It sends a broadcast packet (broadcast address in the DLL address for destination) on its LAN asking: who owns the IP address 192.31.63.8? Everyone on LAN1 gets it but this time the router replies with its DLL address. H1 now prepares the data packet meant for H4 with the DLL address of the router and sends it to the router. The process is repeated on the FDDI ring and so on.
Maps DLL address to IP address When a diskless workstation boots from a remote machine, how does it get its IP address? Remember,
When a machine boots from a local OS it learns its IP address from the settings already done (settings in TCP/IP etc) but, When it boots from a remote machine it gets the binary image of its OS from a remote file server. The IP address cannot be included in this binary image for then a separate binary image will be required to boot each host.
DHCP contd..
Such a host (say H1) asks a question: My DLL address is..Does anyone know my IP address? Another machine running DHCP server responds back with the IP address of H1. DHCP Server maintains a table of (DLL address, IP address) of the nodes it serves. How does H1 get down (IP address of) to the DHCP server? If the DHCP server is on the same LAN as the host H1, there is no problem
However, if DHCP server is on a remote machine, a machine called DHCP relay agent (who knows the IP address of the DHCP server) is required on each LAN. DHCP relay agent relays the packet from H1 to the DHCP server and back.
OSPF: Open Shortest Path First (Interior Gateway Protocol) BGP: Border Gateway Protocol (Exterior Gateway Protocol)
Initially when As were small .. A variant of DVR(RIP) was used. DVR suffered from count to infinity problem and was replaced by Link State Routing algorithm in 1979.
AS is small same as LSR. To understand OSPF lets see how an AS looks like : AS is a collection of routers and networks.
When ASes became large they were further divided into areas Each area is a collection of networks and routers now.
OSPF works in an AS
Internal routers (used for routing within an area hence keep the Link State Database for routers within an area and run Shortest Path Algorithm locally ) Area border routers (Inter-area routing through backbone routers, keeps the LSDB for all the areas(2 areas in case of non-backbone area router and may be more than 2 areas for a backbone area router) each is connected to and runs a possibly different SPA for each area separately. Backbone routers : could be internal or area border routers of Area 0
Internal Routers
These are routers that are only connected to other routers or networks within a single area. They maintain an LSDB for only that area, and really have no knowledge of the topology of other areas.
Backbone Routers
These are routers that are part of the OSPF backbone. By definition, this includes all area border routers, since those routers pass routing information between areas. However, a backbone router may also be a router that connects only to other backbone (or area border) routers, and is therefore not part of any area (other than Area 0).
Back
Issues
No transit traffic thru certain Ases Never put Iraq on a route starting at Pentagon DO not use US to get from British Coumbia to Ontario Only transit Albania if there is no alternative to the destination Traffic starting or ending at IBM should not transit Microsoft
These kind of issues cannot be solved by computing the Shortest Path trees.
BGP cntd
BGP is basically a DVR protocol. However it maintains and advertise the entire path. Since choice of entire paths are available .. decisions around the routers can be taken on a datagram basis. Hence, it takes care of the count to infinity problem also.
BGP contd..
(a) A set of BGP routers. (b) Information sent to F.
Extension Headers
5-69