200 likes | 236 Views
Packets & Routing. Lower OSI layers (1-3) concerned with packets and the network Packets carry data independently through the network, and into other networks… Only know where to go because Routers (and Routing Switches) tell them where to go next use header information on each packet
E N D
Packets & Routing • Lower OSI layers (1-3) concerned with packets and the network • Packets carry data independently through the network, and into other networks… • Only know where to go because Routers (and Routing Switches) tell them where to go next • use header information on each packet • Contains source & destination IP addresses header data (payload)
Internet Routing • Uses IP address (OSI level 3) • Compare: MAC addresses used at OSI level 2 for local network navigation via switches • OSI model? link • Each router reads the IP destination address of each packet • then decides which other router to forward the packet on to…
Packet Creation… • https://www.youtube.com/watch?v=R3CMVw7tM2Y
Packet Switching • Resulted from… UK scientific brilliance… • Donald Davies • developed “packet switching” to get digital data in packets through a network efficiently • Ideas drained to the US… http://news.bbc.co.uk/1/hi/technology/8499501.stm • https://www.youtube.com/watch?v=tT4AaelwvV4
Routing Packets: ‘Store and Forward’ (1) • May come to router from several different connections • May not arrive regularly • arrivals may be ‘bursty’ • Router may not be able to process all packets immediately on arrival • e.g. 2 packets arriving almost simultaneously on different connections
‘Store and Forward’ (2) • As packets arrive, added to a “buffer” • area of memory where packets are stored temporarily until they can be processed • Processed in order of arrival • ‘first in, first out’ (FIFO) stack • Note: if the buffer gets full, further packets are discarded and lost
Routing decisions • Router uses the destination IP address in the packet IP header to decide what to do with the packet • Maybe send to a local network to which the router is connected • router must know the IP addresses relevant to its own local network(s) • Maybe forward on to another router • But which one?
Routing tables • Each router has a database of IP addresses (or starts of IP addresses) • For each IP address, there is a link that a packet for that IP address should be forwarded to • Router reads the destination IP address, consults the routing table, and forwards the packet through the appropriate link
Routing tablefrom http://www.answers.com/topic/routing-protocol-1?cat=technology
Construction of routing tables • Routing tables can be set up when the router is first booted • But network conditions may change • a route that was once optimal may become congested • a link or router may malfunction or be removed • a new link may be added to the network • Dynamic updates needed
Updating routing tables • Routers send each other information about network conditions • Broken links • New links • Routers going off-line • Congestion problems • Each router updates its routing tables accordingly
Router B Router C Recipient Router A Sender Normal route of message
Router B Router C Recipient Router A Sender Disaster strikes: link is broken Message cannot be delivered
What happens • Router A finds out about the broken link • No traffic received from router B • Regular updates from router B don’t arrive • Router A knows enough about the local network topology to use an alternative route • Routing table adjusted accordingly
Router B Router C Recipient Router A Sender Solution: a new route is found
Decisions between multiple possible routes • Factors to be considered by the router: • Total number of ‘hops’ in the path • Traffic loading on each hop • Financial costs of using certain hops • Algorithms for finding best routes: • Bellman-Ford (distance-vector algorithm) • Dijkstra (link-state algorithm)
Check out“Routing Algorithms”these give a router a real headache!https://www.youtube.com/watch?v=L8VpthhRaEg
e.g. Border Gateway Protocol • Protocol used by Internet routers • Application layer protocol • TCP port 179 • First defined in RFC 1105 (June 1989) • Updated to version 4 in RFC 1774 (March 1995) • Latest update to version 4: RFC 4271 (January 2008)
Firewalls • Try out Windows Firewall now…
VPNs • What are they? • How can they be implemented? • From the TWIT network… (excuse the adverts) • https://www.youtube.com/watch?v=sGYIsJUIxH8