680 likes | 852 Views
. 0. Introduction to computer networks. 01 11 010 001 1101 1110 11001 01011 110110 001101 1111111 0111000 11101010 01001110 110111001 000101101 1111010001 0101111100 111101001111 010110000101. Sander Klous. Topical lectures June 2007. Acknowledgements: Cees de Laat
E N D
0 Introduction tocomputer networks 01 11 010 001 1101 1110 11001 01011 110110 001101 1111111 0111000 11101010 01001110 110111001 000101101 1111010001 0101111100 111101001111 010110000101 Sander Klous Topical lectures June 2007 • Acknowledgements: • Cees de Laat • Jan Just Keijser • Oscar Koeroo • Reference: • Cisco systems – CCNA ISBN: 1-58720-095-3 TDAQ W H Z t
Introduction ARPA net How the web was born Standard bodies Hardware Hubs and Switches Collision detection OSI Layers Topology Ethernet (LAN) Error discovery Wide Area Networks Routing IP networks Address resolution Routing protocols VLANs Protocols TCP and UDP Sockets and NAT Network Security Firewalls (briefly) (A)symmetric cryptography Public Key Infrastructure Course overview
ARPA net 1969 • Defense Advanced Research Projects Agency (DARPA) • Military part (MILNET) • Research part (ARPANET) • First two IMPs (Interface Message Processors): • UCLA (August 30, 1969) • Stanford Research Institute (October 1, 1969) • Decommissioned in 1989
Original proposal of the WWW • Gopher (University of Minnesota) • Tim Berners-Lee • Enquire (HyperText) • TCP/IP • DNS • Uniform Resource Locator (URL) • Mike Sendall • Newsgroup announcement: 6 August 1991, 22:37 http://groups.google.com/group/alt.hypertext/msg/395f282a67a1916c
Google hits, August 14 2003 • 1.1 Billion internet users in 2007 (± 17% of the world, ± 50% in US and EU) http://www.internetworldstats.com/stats.htm • 11.5 Billion web pages (2005)
Standard bodies • Institute of Electrical and Electronics Engineers (IEEE) • Advancement of technology related to electricity • IEEE 802.X Ethernet standards • Internet Engineering Task Force (IETF) • Rob Blokzijl ISOC member • Develops and promotes internet standards • Requests for Comments (RFCs) • In close cooperation with W3C • World Wide Web Consortium (W3C) • Founded by Tim Berners-Lee, director • International standards organization for WWW
Collision detection CSMA: Carrier Sense Multiple Access
Switched networks • Occupancy < 30% • Switched Networks • Half duplex • 100% • New network cards • Full duplex • 2 x 100%
OSI Layer 2: Ethernet • DIX: DEC, Intel and Xerox • MAC: Media Access Control = number of your Ethernet card • FCS: Frame Check Sequence – See CRC • DSAP: Destination Service Access Point • SNAP: Sub network Access Protocol
Ethernet Frame Specification • Note: error discovery error recovery • Maximum Frame Length = 1500 (see MTU specs)
Check sum – bidirectional parity • Works well for single bit errors
Cyclic Redundancy Check Partially from Tanenbaum Computer Networks ISBN 0-13-038488-7 • Polynomial division • Based on Galois Field Theory, GF(2) • Coefficients either 0 or 1 • Division results in Exclusive OR Quotient Divisor Remainder
Wide Area Networks Router: Connecting different OSI layer 2 protocols PPP: Point to Point Protocol
WAN Internals • Channel Service Unit (CSU) • Customer Premises Equipment (CPE) • High Level Data Link Control (HDLC) • Asynchronous Transfer Mode (ATM)
Maximum Transmission Unit (MTU) • Fragmentation, equal sized packages • Jumbo frames Configuration challenge • Avoid fragmentation and reassembly • Avoid too much overhead
Multiple links: Frame Relay • Frame Relay Protocols • Telecom Operator Agreements • See also Border Gateway Protocol (BGP)
OSI Layer 3: Networking • Internet Protocol (IP) numbers • In Europe, policies are managed by RIPE Originally (1997) from a NIKHEF office, now at Singel 258 • Three classes of networks
IP network 6 Class B networks 150.2.0.1 150.1.0.1 150.2.0.2 150.1.0.2 150.3.0.1 150.4.0.1 150.4.0.2
Subnets • Split host identification in two parts: • Subnet • Host ID • Splitting at bit level Nr of bits available:
IP network with subnets 1 Class B network 150.150.2.1 150.150.1.1 150.150.2.2 150.150.1.2 150.150.3.1 150.150.4.1 150.150.4.2
Subnet calculation Number of masked bits (network + subnet)
Note, suppose your host definition is: 199.1.1.100/27 Subnet mask: 255.255.255.224 Number of subnets: 23 – 2 = 6 Number of hosts per subnet: 25 – 2 = 30 Subnet addresses start at: 0, 32, 64, 96, 128, 160, 192, 224 Your subnet range is: 97 – 126 96 and 127 are reserved addresses Boolean subnet calculations Private network ranges
Address Resolution Protocol (ARP) • Ethernet does not use IP numbers • Ethernet needs the MAC address • Address Resolution Protocol ties them together
Ethernet route discovery • Building Address Tables
Redundant links • Avoid loops at all costs • Additional hops • Spanning Tree Protocol (STP)
Spanning Tree Protocol rules • Decide which switch is the root switch • Based on priority (set manually) • Based on switch MAC address • All ports of root switch are open • All ports with shortest route to root switch are open • In case an existing route fails: rerun procedure • Convergence takes about 50 seconds • Improved version: (Rapid Spanning Tree Protocol)
WAN Routing: Border Gateway Protocol (BGP) • Based on Telecom Operator policies • Each operator has an autonomous system (AS) • Avoid loops at all costs (based on AS number) • Note that routers work at OSI Layer 3 – IP numbers
Link state protocol (WAN spanning tree) • Distance Vector Protocols • Shortest Path First • AKA Dijkstra’s Algorithm • Weighted links (Euros) • Build routing table • Closest first • Who is your neighbor? • List of all routes • In all routers Vertex
Dijkstra’s algorithm Graph (V), where V is a set of vertices (vi) • The length of a path from any vertex vk to a vertex v0 is l (vk) • So l (v0) = 0, initialize all other lengths l (vk) to • Start from a vertex vj (j=0) and consider all unlabeled neighbors (yi) • Replace l (yi) with min{ l (yi), l (vj) + w( {vj, yi} ) } • Where w( {vj, yi} ) is the weight of the link between vj and yi • Choose the smallest value from all yi and label it vj+1 • Include the route from v to v1 as shortest path • Add all unlabeled neighbors from vj+1 to the set (yi) • Increase counter, j=j+1 and repeat procedure from step 4 • Algorithm is completed when all vertices are included
SPF Scalability – Topology Summarization • Divide network in areas • Router 3 is an intersection • Topology summarization
SPF Scalability – Route Summarization • Classless inter domain routing (CIDR) • Aggregate routes at ISP level • Example below: all 198.* class C networks are ISP 1 Routing Information Protocol – RIP (hop counting) Open Shortest Path First – OSPF IGRP – Interior Gateway Routing Protocol (Cisco) EIGRP – Enhanced IGRP (Cisco)
Route poisoning • In SPF, routers publish information about best route • What happens if a route fails? • Remove it from the table • But… Route poisoning How to update other routers? Route poisoning
Horizon splitting • Counting to infinity Horizon splitting
Virtual LAN introduction • A VLAN is essentially a broadcast domain. • Two machines on different VLANs require a layer 3 device for communication (i.e. a router). • Two machines on the same VLAN require a layer 2 device for communication (i.e. a switch).
VLAN in real life • NIKHEF: normal network and guest network (security) • VLANs are often combined with subnet masks • ATLAS trigger: redundancy, VLANs and MSTP Jos
Fine grained security at layer 3 • Access control lists (ACLs)
OSI Layer 4: Transport Protocols } • Transmission Control Protocol (TCP) • Routing based on Internet Protocol (IP) TCP/IP
TCP/IP basics • Mixing transfer and network layer • Packages contain source and destination IP address • Send request and provide reply address • Most features are symmetric
Working with sessions • Initialize TCP session • With arbitrary sequence number • Sessions are synchronized in two directions • Connection is established, sequence synchronized • From that moment, sequence = total nr of bytes sent + offset
Acknowledgements in detail • Agreement to confirm reception after X bytes. • X bytes is called the window (size) • In the example below: X = 3000
Error recovery • Re-transmission on “No Data” Acknowledgement • Timeout trigger re-transmission • Package reordering
Sliding windows, congestion control • Successful transfer • Window size increases • Reduce latency effects • Failed transfer • Window size reduces • Window size updates are asynchronous Window size Slow start Time