COMSCSEE 4140 Networking Laboratory Salman Abdul Baset Spring
COMS/CSEE 4140 Networking Laboratory Salman Abdul Baset Spring 2008
Agenda Administrivia p Introduction to the lab equipment p A simple TCP/IP example p Overview of important networking concepts p 2
Course overview p Goals n n n p Prerequisites n p Gain hands-on experience Apply and reinforce important networking concepts and techniques learned in CS 4119 No socket programming CS 4119, ELEN 4710, ELEN 6761 or equivalent Organization n n Weekly lectures review relevant materials Weekly labs 3
Materials covered (partial list) p Wide area networks n n Internetworking Static & dynamic routing p n RIP, OSPF, BGP UDP & TCP p LAN switching & bridges p DHCP, NAT, DNS, SNMP (and various other 3 & 4 letter acronyms ) 4
Course staff p Instructor: Salman Abdul Baset n n OHs: Tuesday 10 am-12 pm CEPSR 720/7 LW 2 Email: salman@cs. columbia. edu TAs p Jong-Yul Kim p n n p OHs: Friday 10: 00 am – 12 pm CEPSR 721 Email: jyk@cs. columbia. edu Ankit Malhotra n n OHs: Thursday 10: 30 am-12: 30 pm INTEREST Lab Email: am 2994@columbia. edu 5
Lectures/labs: when and where? p Lectures n n p When: Mondays: 5: 40 pm – 6: 55 pm Where: CLIC lab (486 CSB) Labs n n n When: Meeting times depend on groups Where: INTEREST lab Three slots (FCFS policy and/or time conflicts): Mondays: 7 pm-9: 30 pm p Tuesday: 7 pm-9: 30 pm p Wednesday: 1 pm-3: 30 pm p 6
Lab organization p Groups (3 people) n n p One report per group Pre-labs and feedback form (optional) to be completed by each of the students individually Group selection n Find people that you can work with Random selection is also a choice Email group info by Feb 1 st to the instructor 7
Structure of the labs p Each lab has four parts: Prelab (individual) 2. Lab session (group) 3. Lab report (group) 4. Feedback forms (individual – optional) 1. 8
Bibliography & readings p Text. Book n Mastering Networks: An Internet Lab Manual by Jorg Liebeherr and Magda El Zarki ISBN: 0 -201 -78134 -4. Publisher: Addison-Wesley. Copyright: 2004. Sample Chapters and more info at the authors' Web Site n TCP/IP tutorial and technical overview (IBM Red Book) by A. Rodriguez, J. Gatrell, J. Karas, R. Peschke (online) p Reference books n n n p Computer networking: a top-down approach featuring the Internet by James Kurose and Keith Ross Cisco essentials book and Cisco web site Unix man pages & RFCs Course web site will be populated with FAQ & links 9
Grading scheme p Pre-lab questions: (20%) (individual) p Lab Reports (40%) (group) p Two exams, each 15% (30%) (individual) n Final exam can be replaced by a group project p Class participation (5%) (individual) Lab participation (5%) (individual) (TAs may randomly ask a group member any question related to the lab) 10
Other requirements p CS account n p Swipe access n n p through CRF MICE Facilities->Card Access->Request Access Level 6 Sponsor: Salman Baset End date: May 15, 2008 USB flash drive n One per group 11
Website, discussion board p Website http: //www 1. cs. columbia. edu/~salman/4140/ p Discussion board, grades, prelab/lab report submissions http: //courseworks. columbia. edu 12
Agenda Administrivia p Introduction to the lab equipment p A simple TCP/IP example p Overview of important networking concepts p 13
Internet Lab Equipment p 4 Cisco 2600 Routers p 4 Linux PCs (Intel Celeron 2 GHz, 256 MB Ram, 40 GB disk, cdrom, floppy, USB) p 2 Ethernet hubs 2 x 5 -port Hub 3 Com Office. Connect Dual Speed (10/100) 2 x 16 -port NETGEAR hub p 2 monitors, 2 keyboards, 2 mice p 1 KVM switch p Cables 14
Internet Lab Equipment Router 1 Router 2 Router 3 Router 4 PC 1 PC 2 PC 3 PC 4 15
Linux PCs p PCs and routers are labeled as: PC 1, PC 2, etc, Router 1, Router 2, etc. p PCs run Linux Fedora Core 5 p Each PC has: n n n a floppy drive, a cdrom drive, a serial port, 5 x 10/100 Mbps Ethernet interface cards (NICs) named eth 0 – eth 4. 2 x USB ports 16
Linux PC 17
Cisco Routers p p p Routers are labeled: Router 1, Router 2, Router 3, Router 4. Routers run Cisco IOS 12. 0 or a later version Each router has: n a console port n an auxiliary port n two 10/100 Mbps Fast Ethernet interfaces 18
Ethernet Hubs p Each hub has 4 or more RJ-45 ports p Ports can operate at 10 Mbps or 100 Mbps 19
Connectors p DB-9 (DE-9) connector (serial port) male p PS 2 Mini DIN 6 p DB-25 connector p DE-15/HD-15 (VGA connector) p RJ-45 connector female 20
Ethernet Cables p p Category 5 e cable (4 pairs) Straight cable Cross over cable Automatic roll over NICs 21
Lab Sequence 22
Core Labs p Lab 1 – Introduction to the Internet Lab Overview of the Internet Lab equipment; introduction to ethereal and tcpdump. p Lab 2 – Single Segment IP Networks Configuring a network interface for IP networking; address resolution with ARP; security problems of common Internet applications. 23
Core Labs (cont. ) p Lab 3 – Static routing IP forwarding and routing between IP networks; setup a Linux PC and a Cisco router as an IP router; manual configuration of routing tables. p Lab 4 – Dynamic Routing Protocols Routing protocols RIP, OSPF and BGP. p Lab 5 – Transport Protocols: UDP and TCP Data transmissions with TCP and UDP; TCP connection management; TCP flow control; retransmissions in TCP; TCP congestion control. 24
Advanced Labs v Lab 6 - LAN switching in Ethernet networks; forwarding of Ethernet frames between LAN switches/bridges; spanning tree protocol for loop free routing between interconnected LANs. v Lab 7 - NAT and DHCP Setup of a private network; dynamic assignment of IP addresses with DHCP. v Lab 8 – Domain Name System Domain name resolution with DNS; name server hierarchy; setup of a DNS root server. v Lab 10 – IP Multicast group management with IGMP; IP multicast forwarding; Multicast routing protocols PIM-SM and PIM-DM. 25
In the Lab: 1. 2. 3. 4. 5. 6. 7. Submit Prelab through courseworks Bring USB drive, the lab manual Reboot Linux PCs Complete exercises as described in the lab manual Take measurements as instructed Save data to the USB drive Submit lab report through courseworks 26
Additional notes p The equipment of the Internet Lab is not connected to the Internet. Warning: Do not connect the lab equipment to the Internet. p Each lab has an anonymous feedback sheet. The feedback is used to improve the setup and organization of the labs. p Since you have administrative (root) privileges on the Internet Lab equipment, exercise caution when modifying the configuration of the Internet Lab equipment. p No eating or drinking in the lab. p Bring your laptops to the lab. 27
Tips for the lab p Ethereal is your best friend in 4140! p Each lab session comprises of several [sometimes independent] exercises. Discuss with your group members if you can do the exercise in parallel. p Traffic does not flow! n n n the power is on? connected to the correct interface? interface LED? ethernet wire is behaving correctly? ARP and routing tables? are you observing traffic on the correct interface? 28
Agenda Administrivia p Introduction to the lab equipment p A simple TCP/IP example p Overview of important networking concepts p 29
Topology Web request Web page Web client Web server p A user on host argon. netlab. edu (“Argon”) makes web access to URL http: //neon. netlab. edu/index. html. p What actually happens in the network? 30
HTTP Request and HTTP response Web server runs an HTTP server program p HTTP client Web browser runs an HTTP client program p sends an HTTP request to HTTP server p HTTP server responds with HTTP response p 31
HTTP Request GET /example. html HTTP/1. 1 Accept: image/gif, */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4. 0 Host: 192. 168. 123. 144 Connection: Keep-Alive 32
HTTP Response HTTP/1. 1 200 OK Date: Sat, 25 May 2002 21: 10: 32 GMT Server: Apache/1. 3. 19 (Unix) Last-Modified: Sat, 25 May 2002 20: 51: 33 GMT ETag: "56497 -51 -3 ceff 955" Accept-Ranges: bytes Content-Length: 81 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html <HTML> <BODY> <H 1>Internet Lab</H 1> Click <a href="http: //www. netlab. net/index. html ">here</a> for the Internet Lab webpage. </BODY> </HTML> • How does the HTTP request get from Argon to Neon ? 33
From HTTP to TCP p To send request, HTTP client program establishes an TCP connection to the HTTP server Neon. p The HTTP server at Neon has a TCP server running 34
Resolving hostnames and port numbers p Since TCP does not work with hostnames and also would not know how to find the HTTP server program at Neon, two things must happen: 1. The name “neon. netlab. edu” must be translated into a 32 -bit IP address. 2. The HTTP server at Neon must be identified by a 16 -bit port number. 35
Translating a hostname into an IP address p The translation of the hostname neon. netlab. edu into an IP address is done via a database lookup p The distributed database used is called the Domain Name System (DNS) p All machines on the Internet have an IP address: argon. netlab. edu 128. 143. 137. 144 neon. netlab. edu 128. 143. 71. 21 36
Finding the port number p Note: Most services on the Internet are reachable via well-known ports. n E. g. HTTP servers on the Internet can be reached at port number “ 80”. p So: Argon simply knows the port number of the HTTP server at a remote machine. p On most Unix systems, the well-known ports are listed in a file with name /etc/services. The well-known port numbers of some of the most popular services are: ftp 21 finger 79 telnet 23 http 80 smtp 25 nntp 119 tftp 69 ssh 23 ntp 123 37
Requesting a TCP Connection p The HTTP client at argon. netlab. edu requests the TCP client to establish a connection to port 80 of the machine with address 128. 141. 71. 21 38
Invoking the IP Protocol p p p The TCP client at Argon sends a request to establish a connection to port 80 at Neon This is done by asking its local IP module to send an IP datagram to 128. 143. 71. 21 (The data portion of the IP datagram contains the request to open a 39 connection)
Sending the IP datagram to an IP router p Argon (128. 143. 137. 144) can deliver the IP datagram directly to Neon (128. 143. 71. 21), only if it is on the same local network (“subnet”) p But Argon and Neon are not on the same local network (Q: How does Argon know this? ) p So, Argon sends the IP datagram to its default gateway p The default gateway is an IP router p The default gateway for Argon is Router 137. netlab. edu (128. 143. 137. 1). 40
The route from Argon to Neon p Note that the gateway has a different name for each of its interfaces. 41
Finding the MAC address of the gateway p To send an IP datagram to Router 137, Argon puts the IP datagram in an Ethernet frame, and transmits the frame. p However, Ethernet uses different addresses, so-called Media Access Control (MAC) addresses (also called: physical address, hardware address). p Therefore, Argon must first translate the IP address 128. 143. 137. 1 into a MAC address. p The translation of addressed is performed via the Address Resolution Protocol (ARP) 42
Address resolution with ARP 43
Invoking the device driver p The IP module at Argon, tells its Ethernet device driver to send an Ethernet frame to address 00: e 0: f 9: 23: a 8: 20 44
Sending an Ethernet frame p The Ethernet device driver of Argon sends the Ethernet frame to the Ethernet network interface card (NIC) p The NIC sends the frame onto the wire 45
Forwarding the IP datagram p p The IP router receives the Ethernet frame at interface 128. 143. 137. 1, recovers the IP datagram and determines that the IP datagram should be forwarded to the interface with name 128. 143. 71. 1 The IP router determines that it can deliver the IP datagram directly 46
Another lookup of a MAC address p The router needs to find the MAC address of Neon. p Again, ARP is invoked, to translate the IP address of Neon (128. 143. 71. 21) into the MAC address of neon (00: 20: af: 03: 98: 28). 47
Invoking the Device Driver at the Router p The IP protocol at Router 71, tells its Ethernet device driver to send an Ethernet frame to address 00: 20: af: 03: 98: 28 48
Sending another Ethernet frame p The Ethernet device driver of Router 71 sends the Ethernet frame to the Ethernet NIC, which transmits the frame onto the wire. 49
Data has arrived at Neon p Neon receives the Ethernet frame p The payload of the Ethernet frame is an IP datagram which is passed to the IP protocol. p The payload of the IP datagram is a TCP segment, which is passed to the TCP server 50
Wrapping up the example p Data traverses a sequence of layers p Each layer has protocols to handle the packets 51
Agenda Administrivia p Introduction to the lab equipment p A simple TCP/IP example p Overview of important networking concepts p 52
TCP/IP Suite and OSI Reference Model The TCP/IP protocol stack does not define the lower layers of a complete protocol stack 53
Functions of the Layers p Data Link Layer: n n p Network Layer: n n p Service: Move packets from source host to destination host Functions: Routing, addressing Transport Layer: n n p Service: Reliable transfer of frames over a link Media Access Control on a LAN Functions: Framing, media access control, error checking Service: Delivery of data between hosts Functions: Connection establishment/termination, error control, flow control Application Layer: n n Service: Application specific (delivery of email, retrieval of HTML documents, reliable transfer of file) Functions: Application specific 54
Assignment of Protocols to Layers 55
Layered Communications p An entity of a particular layer can only communicate with: 1. a peer layer entity using a common protocol (Peer Protocol) 2. adjacent layers to provide services and to receive services 56
Layered Communications A layer N+1 entity sees the lower layers only as a service provider N+1 Layer Entity N+1 Layer Peer Protocol N+1 Layer Entity Indicate Delivery Request Delivery Service Provider 57
Service Access Points A service user accesses services of the service provider at Service Access Points (SAPs) p A SAP has an address that uniquely identifies where the service can be accessed p 58
Exchange of Data p p The unit of data send between peer entities is called a Protocol Data Unit (PDU) For now, let us think of a PDU as a single packet A p p B Scenario: Layer-N at A sends a layer-N PDU to layer-N at B What actually happens: n n n A’s layer-N passes the PDU to one the SAPs at layer-N-1 Layer-N-1 entity at A constructs its own (layer-N-1) PDU which it sends to the layer-N-1 entity at B 59 PDU at layer-N-1 = layer-N-1 Header + layer –N PDU
Exchange of Data A B 60
Layers in the Example 61
Layers in the Example Send HTTP Request to neon Frame is an IP datagram Establish a connection to 128. 143. 71. 21 at port 80 Open TCP connection to 128. 143. 71. 21 port 80 IP datagram is a TCP segment for port 80 Send IP data-gram to Send a datagram (which contains a connection Send IP datagram to 128. 143. 71. 21 request) to 128. 143. 71. 21 Frame is an IP datagram Send the datagram to 128. 143. 137. 1 Send Ethernet frame to 00: e 0: f 9: 23: a 8: 20 the datagram to 128. 143. 7. 21 Send Ethernet frame to 00: 20: af: 03: 98: 28 62
Layers and Services p Service provided by TCP to HTTP: n p Service provided by IP to TCP: n p unreliable transmission of IP datagrams across an IP network Service provided by Ethernet to IP: n p reliable transmission of data over a logical connection transmission of a frame across an Ethernet segment Other services: n n DNS: translation between domain names and IP addresses ARP: Translation between IP addresses and MAC addresses 63
Encapsulation and Demultiplexing p As data is moving down the protocol stack, each protocol is adding layer-specific control information 64
Encapsulation and Demultiplexing in our Example p Let us look in detail at the Ethernet frame between Argon and the Router, which contains the TCP connection request to Neon. p This is the frame in hexadecimal notation. 00 e 0 4500 8990 0000 05 b 4 f 923 002 c 808 f 0000 a 820 9 d 08 4715 6002 00 a 0 4000 065 b 2000 2471 8006 0050 598 e e 444 8 bff 0009 0000 0800 808 f 465 b 0204 65
Ethereal 66
Parsing the information in the frame 67
Encapsulation and Demultiplexing 68
Encapsulation and Demultiplexing: Ethernet Header 69
Encapsulation and Demultiplexing: IP Header 70
Encapsulation and Demultiplexing: IP Header 71
Encapsulation and Demultiplexing: TCP Header Option: maximum segment size 72
Encapsulation and Demultiplexing: TCP Header 73
Encapsulation and Demultiplexing: Application data No Application Data in this frame 74
Different Views of Networking p Different Layers of the protocol stack have a different view of the network. This is HTTP’s and TCP’s view of the network. 75
Network View of IP Protocol 76
Network View of Ethernet p Ethernet’s view of the network 77
What a router chassis looks like Cisco CRS-1 Juniper M 320 19” 17” Capacity: 1. 2 Tb/s Power: 10. 92 KWh Weight: 0. 5 Ton Cost: $500 K 6 ft Capacity: 320 Gb/s Power: 3. 1 k. Wh 3 ft 2 ft 78
Cisco CRS-1 79
Next week Lab 1 & 2 p Submit prelab 1 & 2 through courseworks p Apply for swipe access p Form a group p Bring a USB drive p p Reading n n Chapter 0, p 1 -25, 45 -71 Optional: IBM red book, chapter 1. 80
- Slides: 80