Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP/IP Basics Alvin Kwan.

Similar presentations


Presentation on theme: "TCP/IP Basics Alvin Kwan."— Presentation transcript:

1 TCP/IP Basics Alvin Kwan

2 What is TCP/IP? It is a protocol suite governing how data can be communicated in a network environment, both local and globally. To remind you what a protocol is, please read to learn a particular protocol known as ARQ (automatic repeat request) protocol

3 OSI vs. TCP/IP

4 History of TCP/IP (1/2) Stands for Transmission Control Protocol/Internet Protocol (TCP/IP) Developed by Defense Advanced Research Projects Agency (DARPA) under the sponsorship of U.S. Department of Defense (DoD) in since late 1960s 1972 – Telnet 1973 – File Transfer Protocol (FTP) 1974 – Transmission Control Protocol (TCP)

5 History of TCP/IP (2/2) 1980 – User Datagram Protocol (TCP)
1981 – Internet Protocol (IP) 1982 – TCP/IP as a protocol suite 1984 – Domain Name System (DNS) 1991 – Transfer of funding responsibility from DAPRA to National Science Foundation (NSF), which started to turn the military originated protocols into civic use, notably in education sector

6 Some TCP/IP features It is an open standard, which is also adopted by the Internet. It offers a routable protocol such that the path of every piece of data that moves through the network is traceable. It adopts a single and simple addressing scheme which is easy to understand IP is a connectionless protocol with data transferred in individual packets without prior arrangement with the recipient whereas TCP is connection-oriented.

7 Connectionless vs. Connection-oriented Protocols (1/2)
Connectionless protocols The data communication method occurs between hosts with no previous setup Send data across the network to its destination without guaranteeing receipt Higher layers handle packet sequencing and certain data integrity control issues Fast; require little overhead Most LAN protocols at the data link layer are connectionless Data packets in a connectionless communication over the network layer are referred to as datagrams More to follow …

8 Connectionless vs. Connection-oriented Protocols (2/2)
Establish a formal connection between two computers, guaranteeing the data will reach its destination Higher layers can rely on low layers to handle matters of packet sequencing, data integrity, and delivery timeouts Slower but more reliable ATM networks are connection oriented at the data link layer

9 Network Interface Layer (1/3)
Lowest layer in the TCP/IP stack To define how a computer connects to a network It does not regulate the type of network that the host is on and thus TCP/IP can be run on an Ethernet, Token Ring or Fiber Distributed Data Interface (FDDI) or any other network topology

10 Network Interface Layer (2/3)
Physical (or MAC) address, which is burnt into every network interface card (NIC) MAC address is usually represented in 12 hexadecimal digits (or 48 bits) First six hexadecimal digits uniquely represent the manufacturer Last six hexadecimal digits is a unique serial number that the card’s manufacturer has assigned to the NIC

11 Network Interface Layer (3/3)
For a TCP/IP packet to be delivered, it must contain the destination node’s MAC address so that a host can check whether the packet is directed to it. A broadcast packet is designed to be attended by all hosts and it has a target MAC address of FFFFFFFF, i.e., all bits set.

12 Exercise: Finding Ethernet Card Manufacturer
Get the MAC address by executing “ipconfig /all” in a Microsoft command window. Look for the first six hexadecimal digits of the physical address which is the Organizational Unique Identifier (OUI) Go to and use the OUI to check the Ethernet card manufacturer

13 The Internet Layer The internal layer contains protocols for addressing and routing of packets. Internet Protocol (IP) Address Resolution Protocol (ARP) Internet Control Message Protocol (ICMP) Internet Group Message Protocol (IGMP) Routing protocols (e.g., RIP)

14 Internet Protocol (1/2) To determine the source and destination IP addresses of every packet, every host on a network is assigned a unique IP address (logical address) IP address is divided into two parts: network number and host address on that network Based on the subnet mask and IP address, it can be decided whether the target is a “remote” host or a “local” host (and details will be given later)

15 Internet Protocol (2/2) For a remote host, IP needs to send the packet through a gateway or a router (which is also identified by an IP address). IP is connectionless and thus support an unreliable transmission

16 Address Resolution Protocol (ARP)
Protocol to resolve an IP address to a physical address (see details in Wikipedia) The hardware address will be cached for a short time (2-10 minutes). To resolve an IP address to a physical address Try the ARP cache (kept in RAM) If not found in cache, initiate an ARP request broadcast and keep the result in cache Try the command “ARP –A” in a command window

17 ARP Command

18 Internet Control Message Protocol (ICMP)
For sending error messages, performing diagnostics and controlling data flow Try “ping cite.hku.hk” to test the network connection to another host

19 Ping Command ipconfig/all

20 Internet Group Message Protocol (IGMP)
IGMP enables one host to send one stream of data to many hosts at the same time with the use of a multicast address Some routing protocols use IGMP to exchange routing tables (which will be discussed later)

21 Routing Protocols (More discussion on routing in another lesson)
Routing Information Protocol (RIP) Simple IP-based routing protocol that collects and exchange information about network route and status Only suitable for small networks Open Shortest Path First (OSPF) Typically used by routers to determine the best path through a network

22 Transport Layer Transmission Control Protocol (TCP)
Primary IP transport protocol Connection-oriented and thus guarantee a more reliable delivery Use port numbers to identify communicating applications Responsible for message fragmentation and reassembly (with the use of sequence number) User Datagram Protocol (UDP) A connectionless transport protocol which runs faster continued

23 Transmission Control Protocol
TCP adopts a 3-way handshake to establish a connection for data communication. The client application sends a SYN to the server. In response, the server replies with a SYN-ACK. Finally the client sends an ACK (usually called SYN-ACK-ACK) back to the server.

24 TCP/IP Applications Domain Name System (DNS)
For URL to IP-address translation File Transfer Protocol (FTP) Application protocol for file transfer and directory/file manipulation services Telnet For remote terminal sign-on Simple Mail Transport Protocol (SMTP) Provide messaging services (i.e., sending s) continued

25 IP Addressing IP is responsible for addressing and routing in the TCP/IP environment IP addresses Logical addresses, which are 32 bits (4 bytes) long A decimal number from 0 to 255, separated by periods, represents each byte or octet Two sections One defines the network a computer is on (i.e. network ID) One defines the host ID for a computer (i.e. host ID) All devices on the same network share the same common network ID Example:

26 Classful Network (1/3) Originally, three classes of IP addresses (which is obsolete on modern internet) Class A Large corporations ID numbers between 1 and 126 (in its first octet, or 8 bits) Class B Medium-sized networks Network IDs between 128 and 191 (in its first octet, or 8 bits) Class C Small networks Range from 192 to 223 (in its first octet, or 8 bits) IP address registries manage the total collection of valid IP addresses

27 Classful Network (2/3)

28 Classful Network (3/3) The number of valid networks and hosts available is always 2N - 2 (where N is the number of bits used, and the 2 adjusts for the invalidity of the first and last addresses).

29 Subnetting (1/2) Subnetting allows a single larger network to have a number of smaller networks within it by allocating bits from the host portion as a network portion. Not connect all computer in the same network Distinguish those subnets from 1 to another. Use extra bit to do with it. Where to find, so find it in the latter part To see how many 1 in the subnet mask (last part) 2 bits=4 subnets If the first 26 bits are the same, then the computers are in the same network How many subnet can we create Up to user requirement (and how many computer in a network u want to install) Subnet Mask Successive 1 with successive 0 64= 2 6 32=2 5 8=2 3 126=2 7 1111 0110 =0110 How many bit=how many subnet we have 240=4bits (16 combination, network)

30 Subnetting (2/2) A subnet mask is made of a sequence of 1’s followed by a sequence of 0’s. To reduce network traffic, routers are usually used to separate subnets. Questions: How many subnets can be formed in the previous example for a classful network? What is the size of each subnet for a classful network in the previous example?

31 Problem of Classful Network
The principal problem was that most sites were too big for a "class C" network number, and received a "class B" number instead. With the rapid growth of the Internet, the available pool of class B addresses was rapidly used up. To solve the problem, classful network was replaced by classless inter-domain routing (CIDR) around 1993.

32 Classless Inter-domain Routing (CIDR)
A more efficient way to assign IP addresses than using IP address “classes” The network and host addresses boundary is not always made on octet boundaries, but may be made any specific number of bits from the beginning of the address A slash following IP address is used to indicate the number of bits of the network ID, e.g., /22 Steal bits from the network address for use in the host address and this is also called supernetting What HKU computers is using Where to draw the boundary 22 represent network ID (problem: if class C, should b 24 bits, but this is 22supernetting) Way to treat the system, 2 system machines matches together. Giving 2 classC will be god, but the netowrk address is different, so need to fool the router When network ID in class c is similar As long as the 22 bits (first 6 numbers) are the same, then direct it to the same machine That /22 is to tell the router how many bits you should look at. (187) fake router to use 22bit, then assigned class c Then in the first part After , and then give External (because fake router) , not internal (like subnetting) so u can use both methods e.g. using over 24 is subnetwork Less than 24 is supernetting

33 Class Ranges

34 Special Ranges of IP Address
IP is unique in home organization, but use another IP (fake/actual, have mapping) to the work Private IP is for home organization, web server/ISP use translation from Private IP to actual IP (usually using ISP IP will be good) How to deliver message to different computer, the local server can translate and map and route into the single computer

35 Supernetting Example /23 (must add this)

36 Without Supernetting 1 router has many IP address,
Send message from one computer to the whole network

37 With Supernetting 192.55.120.x (octec)
Octec not 0 because 0 uses as the port no (of router IP address) 0 is for router And 255 is for boradcast e.g —router—

38 Pros and Cons of CIDR Advantages Disadvantage
Subnet ID may now be all 0’s or 1’s Avoid of wasting a number of IP addresses when subnetting a Class C address Disadvantage Router support is needed Complexity

39 Exercise: Network Calculator
Go to to try to use the network calculator for computing the subnet mask.

40 Why IPv6 IP addresses are rapidly becoming scarce
TCP/IP’s technical governing body has reserved a series of addresses for private networks IETF is working on a new implementation of TCP/IP (IPv6) that uses addresses that are 8 bytes long but retain backward compatibility with IPv4 4-byte addresses

41 Dynamic Host Configuration Protocol (DHCP)
A TCP/IP protocol that allows automatic IP addresses and subnet mask assignment Major benefit is ease with which computers can be moved Not suitable for systems that require a static address, such as web servers A dedicated host, which can be a router or a computer, to take the role of DHCP server

42 References Relevant pages in Wikipedia


Download ppt "TCP/IP Basics Alvin Kwan."

Similar presentations


Ads by Google