Presentation is loading. Please wait.

Presentation is loading. Please wait.

CT 320: Network and System Administration Fall 2014 * Dr. Indrajit Ray Department of Computer.

Similar presentations


Presentation on theme: "CT 320: Network and System Administration Fall 2014 * Dr. Indrajit Ray Department of Computer."— Presentation transcript:

1 CT 320: Network and System Administration Fall 2014 * Dr. Indrajit Ray Email: indrajit@cs.colostate.eduindrajit@cs.colostate.edu Department of Computer Science Colorado State University Fort Collins, CO 80528, USA Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014 * Thanks to Dr. James Walden, NKU and Russ Wakefield, CSU for contents of these slides

2 Introduction to TCP/IP Networking Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

3 Internetworking Internetwork = Collection of networks connected via routers Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

4 Internet = Virtual Network Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

5 Some Very Basic Terms My Laptop - Running web browser Web Server www.cnn.com My laptop and the web server are both End Systems = Hosts End systems can also include PDAs, sensors, cell phones, and generally any device using the network to communicate End systems are located at the network edge and connected to the network using communication links Simple Example: Use web browser to lookup www.cnn.com Internet Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

6 More Basic Terms: Client/Server My Laptop - Running web browser Web Server www.cnn.com End systems may be classified as client, a server, both, or neither. Client – (runs) some program that requests services: web browser requests a page, email reader requests messages, ftp program requests files, etc. Server – (runs) some program that listens for requests and provides services web server, email server, ftp server, etc. Client vs. server depends on what programs the end system is running. Simple Example: Use web browser to lookup www.cnn.com Internet Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

7 Sending a packet from Argon to Neon Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

8 Sending a packet from Argon to Neon DNS: The IP address of “neon.tcpip-lab.edu” is 128.143.71.21 ARP: What is the MAC address of 128.143.137.1? DNS: What is the IP address of “neon.tcpip-lab.edu”? ARP: The MAC address of 128.143.137.1 is 00:e0:f9:23:a8:20 128.143.71.21 is not on my local network. Therefore, I need to send the packet to my default gateway with address 128.143.137.1 frame 128.143.71.21 is on my local network. Therefore, I can send the packet directly. ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28 ARP: What is the MAC address of 128.143.71.21? frame Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

9 Communications Architecture The complexity of the communication task is reduced by using multiple protocol layers: Each protocol is implemented independently Each protocol is responsible for a specific subtask Protocols are grouped in a hierarchy A structured set of protocols is called a communications architecture or protocol suite Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

10 TCP/IP Protocol Suite The TCP/IP protocol suite is the protocol architecture of the Internet The TCP/IP suite has four layers: Application, Transport, Network, and Data Link Layer End systems (hosts) implement all four layers. Gateways (Routers) only have the bottom two layers. Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

11 OSI and TCP/IP Protocol Stack OSI ModelTCP/IP HierarchyProtocols 7 th Application Layer 6 th Presentation Layer 5 th Session Layer 4 th Transport Layer 3 rd Network Layer 2 nd Link Layer 1 st Physical Layer Application Layer Transport Layer Network Layer Link Layer Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

12 Functions of the Layers Data Link Layer: – Service: Reliable transfer of frames over a link Media Access Control on a LAN – Functions: Framing, media access control, error checking Network Layer: – Service: Move packets from source host to destination host – Functions: Routing, addressing Transport Layer: – Service: Delivery of data between hosts – Functions: Connection establishment/termination, error control, flow control Application Layer: – Service: Application specific (delivery of email, retrieval of HTML documents, reliable transfer of file) – Functions: Application specific Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

13 Assignment of Protocols to Layers Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

14 Layered Communications 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 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

15 Layered Communications A layer N+1 entity sees the lower layers only as a service provider Service Provider N+1 Layer Entity N+1 Layer Peer Protocol Request Delivery Indicate Delivery Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

16 Application View of Networking Application job: write the web browser (client) or web server (server) My Laptop - Running web browser Web Server www.cnn.com Internet Assume network provides way to send a messages between hosts. Don’t know or care how the messages are sent. Do care about: Does the network provide a connection or is it connectionless? Are messages reliable? Who/what provides flow control? (speed of sending messages) Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

17 Transport View of Networking Some Source End System Some Destination End System Transport job: design/implement the connection-oriented(-less) service Internet Assume application handles message content.. Don’t know or care about the content of the messages. Don’t know or care how the messages get from source to destination Do care about: How to provide a connection or connectionless service? How to make the transport connection reliable? How to handle congestion and flow control in the network? Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

18 Network Layer View Network layer job: get a message from a source to a destination ISP B Assume higher layers handle message content, congestion(?), reliability Do care about: How to provide a best effort attempt to delivery packets? Routing! ISP A Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

19 Link Layer View of Networking Link Layer job: get a message sent across some medium Only care about how to get message from A to B across this link Link can be twisted pair, coaxial, fiber optic, wireless Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

20 Service Access Points A service user accesses services of the service provider at Service Access Points (SAPs) A SAP has an address that uniquely identifies where the service can be accessed Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

21 Exchange of Data The unit of data sent between peer entities is called a Protocol Data Unit (PDU) For now, let us think of a PDU as a single packet Scenario: Layer-N at A sends a layer-N PDU to layer-N at B What actually happens: – A ’ s layer-N passes the PDU to 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 – PDU at layer-N-1 = layer-N-1 Header + layer –N PDU AB Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

22 Exchange of Data AB Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

23 Layers in the Example Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

24 Layers in the Example Send HTTP Request to neon Establish a connection to 128.143.71.21 at port 80 Open TCP connection to 128.143.71.21 port 80 Send a datagram (which contains a connection request) to 128.143.71.21 Send IP datagram to 128.143.71.21 Send the datagram to 128.143.137.1 Send Ethernet frame to 00:e0:f9:23:a8:20 Send Ethernet frame to 00:20:af:03:98:28 Send IP data-gram to 128.143.71.21 Send the datagram to 128.143.7.21 Frame is an IP datagram IP datagram is a TCP segment for port 80 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

25 Layers and Services Service provided by TCP to HTTP: – reliable transmission of data over a logical connection Service provided by IP to TCP: – unreliable transmission of IP datagrams across an IP network Service provided by Ethernet to IP: – transmission of a frame across an Ethernet segment Other services: – DNS: translation between domain names and IP addresses – ARP: Translation between IP addresses and MAC addresses Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

26 Encapsulation As data is moving down the protocol stack, each protocol is adding layer-specific control information Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

27 Ethernet Computer Computer communication on same network Each device has unique MAC address (48-bit) example: 00-C0-4F-48-47-93 Ethernet Packet: Dest. address DataCRC Source address Type MAC: Media Access Control 6bytes 2bytes Preamble 8bytes64 - 1500bytes4bytes Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

28 IP: Internet Protocol Unreliable … connectionless datagram delivery service Responsible for routing of data through intermediate networks and computers IP header: 1 :ICMP 6 :TCP 17 :UDP 11 8901 1111 2345 1111 6789 2222 0123 2222 4567 2233 890101234567 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

29 IP Routing Routing Table Destination IP address IP address of a next-hop router Flags Network interface specification Application Transport Network Link Application Transport Network Link Network Link Source Destination Router Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

30 ICMP : Internet Control Message Protocol Used to report problems with delivery of IP Datagrams within an IP network Used by Ping, Traceroute commands Types and Codes Echo Request (type=8, code=0) Echo Reply(type=0, code=0) Destination Unreachable(type=3, code=0) Time Exceeded(type=11, code=0) : Time-to-Live =0 ICMP Message ICMP Data ICMP Header IP Header 4bytes20bytes TypeCodeChecksum 1byte 2bytes Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

31 TCP : Transmission Control Protocol Connection-Oriented, Reliable, Byte Stream Service Protocol 1.Set up connection 2.Transfer data 3.Close connection 012345678910101 1212 1313 1414 1515 1616 1717 1818 1919 2020 21212 2323 2424 2525 2626 2727 2828 2929 3030 3131 Source PortDestination Port Sequence Number Acknowledgement Number Data Offset ---- Window ChecksumUrgent Pointer Options (0 to 10 Words of 32 Bits) TCP Payload TCP Header Format Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

32 IP Addressing: Introduction IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link – router’s typically have multiple interfaces – host may have multiple interfaces – IP addresses associated with each interface 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.1 = 11011111 00000001 00000001 00000001 223 111 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

33 An Addressing Example Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

34 IP Addresses 4 8-bit numbers (Hierarchical) Specifies both network and host Number of bits allocated to specify network varies Three classes: 0 net host 1 7 24 bits 110 net host 3 21 8 bits 1 0 net host 2 14 16 bits ABC 18.26.0.1 network 32-bits host Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

35 IP Addresses IP (Version 4) Addresses are 32 bits long IP Addresses Assigned Statically or Dynamically (DHCP) IPv6 addresses are 128 bits long Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

36 IP Address Space Originally, 3 Classes – A, B, C Problem – Classes too rigid (C too small, B too big) Solution – Subnetting (e.g. within CSU) – Classless Interdomain Routing (CIDR) Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

37 Subnetting IP Address plus subnet mask (netmask) IP Addr: 171.64.15.82 Netmask: 0xFFFFFF00 (111...1100000000) – First 24 bits are the Subnet ID (the neighborhood) – Last 8 bits are Host ID (the street address) Can be written as “ Prefix + Length ” – 171.64.15.0/24 or 171.64.15/24 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

38 Subnets IP address: – subnet part (high order bits) – host part (low order bits) What’s a subnet ? – device interfaces with same subnet part of IP address – can physically reach each other without intervening router 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 network consisting of 3 subnets LAN Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

39 Subnets Recipe To determine the subnets, detach each interface from its host or router, creating islands of isolated networks. Each isolated network is called a subnet. 223.1.1.0/24 223.1.2.0/24 223.1.3.0/24 Subnet mask: /24 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

40 Subnets 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.2 223.1.7.0 223.1.7.1 223.1.8.0223.1.8.1 223.1.9.1 223.1.9.2 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

41 Routers and IP Addressing Principle Routers have two or more addresses – one for each interface. Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

42 IP Addressing: CIDR CIDR: Classless Inter Domain Routing – subnet portion of address of arbitrary length – address format: a.b.c.d/x, where x is # bits in subnet portion of address 11001000 00010111 00010000 00000000 subnet part host part 200.23.16.0/23 Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

43 Getting a datagram from source to dest. IP datagram: 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E misc fields source IP addr dest IP addr data r datagram remains unchanged, as it travels source to destination r addr fields of interest here Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 routing table in A Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

44 Getting a datagram from source to dest. 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E Starting at A, given IP datagram addressed to B: r look up net. address of B r find B is on same net. as A r link layer will send datagram directly to B inside link-layer frame m B and A are directly connected Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 misc fields 223.1.1.1223.1.1.3 data Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

45 Getting a datagram from source to dest. 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 Starting at A, dest. E: r look up network address of E r E on different network m A, E not directly attached r routing table: next hop router to E is 223.1.1.4 r link layer sends datagram to router 223.1.1.4 inside link-layer frame r datagram arrives at 223.1.1.4 r continued….. misc fields 223.1.1.1223.1.2.3 data Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

46 Getting a datagram from source to dest. 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E Arriving at 223.1.4, destined for 223.1.2.2 r look up network address of E r E on same network as router’s interface 223.1.2.9 m router, E directly attached r link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 r datagram arrives at 223.1.2.2!!! (hooray!) misc fields 223.1.1.1223.1.2.3 data network router Nhops interface 223.1.1 - 1 223.1.1.4 223.1.2 - 1 223.1.2.9 223.1.3 - 1 223.1.3.27 Dest. next Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

47 ARP : Address Resolution Protocol ARP provides mapping 32bit IP address 48bit MAC address 128.97.89.153 00-C0-4F-48-47-93 ARP cache maintains the recent mappings from IP addresses to MAC addresses Protocol 1.ARP request broadcast on Ethernet 2.Destination host ARP layer responds Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014

48 IP addresses: Allocation Q: How does a host get an IP address? hard-coded by system admin in a file – Wintel: control-panel->network->configuration- >tcp/ip->properties – UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server – “plug-and-play” Dr. Indrajit Ray, Computer Science Department CT 320 – Network and Systems Administration, Fall 2014


Download ppt "CT 320: Network and System Administration Fall 2014 * Dr. Indrajit Ray Department of Computer."

Similar presentations


Ads by Google