1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson 1.112.1 Fundamentals of TCP/IP Weight 4 Linux Professional Institute Certification — 102 Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Geoffrey Robertson ge@ffrey.com nicku@nicku.org This document Licensed under GPL—see section 14 Nick Urbanik Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document 2005 July Outline 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document Topic 112 Networking Fundamentals [14] Where we are up to 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) 1.112.1 Fundamentals of TCP/IP [4] 1.112.3 TCP/IP configuration and troubleshooting [7] 1.112.4 Configure Linux as a PPP client [3] Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document Description of Objective 1.112.1 Fundamentals of TCP/IP 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Candidates should demonstrate a proper understanding of network fundamentals. This objective includes the understanding of IP-addresses, network masks and what they mean (i.e. determine a network and broadcast address for a host based on its subnet mask in “dotted quad” or abbreviated notation or determine the network address, broadcast address and netmask when given an IP-address and number of bits). It also covers the understanding of the network classes and classless subnets (CIDR) and the reserved addresses for private network use. It includes the understanding of the function and application of a default route. It also includes the understanding of basic internet protocols (IP, ICMP, TCP, UDP) and the more common TCP and UDP ports (20, 21, 23, 25, 53, 80, 110, 119, 139, 143, 161). Objective Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document Key files, terms, and utilities include: 1.112.1 Fundamentals of TCP/IP 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson /etc/services — file mapping port numbers to names ftp — FTP client program telnet — telnet client program host — program to test DNS servers ping — program to test connectivity to other machines via ICMP dig — program to test DNS servers traceroute — program to test the path to a remote machine, showing routers along the way whois — queries information about the owner of a domain Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document (2.2) Networking Fundamentals [14] 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing 1.112.1 Fundamentals of TCP/IP [4] 1.112.3 TCP/IP configuration and troubleshooting [7] 1.112.4 Configure Linux as a PPP client [3] Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document Fundamentals of TCP/IP [4] Resources of interest 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context W. Richard Stevens. TCP/IP Illustrated, Volume 1: The Protocols Addison Wesley Olaf Kirch and Terry Dawson. Linux Network Administrator’s Guide O’Reilly 2000. http://tldp.org/LDP/nag2/ Angie Nash and Jason Nash. LPIC 1 Certification Bible Hungry Minds Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document IP addressing 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources This objective includes the understanding of: IP-addresses, network masks and what they mean, i.e., determine a network and broadcast address for a host based on its subnet mask in “dotted quad” or abbreviated notation or determine the network address, broadcast address and netmask when given an IP-address and number of bits. IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document IP Address Classes (Classic) Class A — 255.0.0.0 00000000.00000000.00000000.00000000 - 0.0.0.0 01111111.11111111.11111111.11111111 - 127.255.255.255 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Class B — 255.255.0.0 10000000.00000000.00000000.00000000 - 128.0.0.0 10111111.11111111.11111111.11111111 - 191.255.255.255 Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Class C — 255.255.255.0 11000000.00000000.00000000.00000000 - 192.0.0.0 11011111.11111111.11111111.11111111 - 223.255.255.255 Basic Internet Protocols Ports and Port Numbers License of this document IP Address Classes (Classic) Class A — 255.0.0.0 00000000.00000000.00000000.00000000 - 0.0.0.0 01111111.11111111.11111111.11111111 - 127.255.255.255 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Class B — 255.255.0.0 10000000.00000000.00000000.00000000 - 128.0.0.0 10111111.11111111.11111111.11111111 - 191.255.255.255 Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Class C — 255.255.255.0 11000000.00000000.00000000.00000000 - 192.0.0.0 11011111.11111111.11111111.11111111 - 223.255.255.255 Basic Internet Protocols Ports and Port Numbers License of this document IP Address Classes (Classic) Class A — 255.0.0.0 00000000.00000000.00000000.00000000 - 0.0.0.0 01111111.11111111.11111111.11111111 - 127.255.255.255 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Class B — 255.255.0.0 10000000.00000000.00000000.00000000 - 128.0.0.0 10111111.11111111.11111111.11111111 - 191.255.255.255 Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Class C — 255.255.255.0 11000000.00000000.00000000.00000000 - 192.0.0.0 11011111.11111111.11111111.11111111 - 223.255.255.255 Basic Internet Protocols Ports and Port Numbers License of this document IP Address Classes (Classic) Class A — 255.0.0.0 00000000.00000000.00000000.00000000 - 0.0.0.0 01111111.11111111.11111111.11111111 - 127.255.255.255 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Class B — 255.255.0.0 10000000.00000000.00000000.00000000 - 128.0.0.0 10111111.11111111.11111111.11111111 - 191.255.255.255 Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Class C — 255.255.255.0 11000000.00000000.00000000.00000000 - 192.0.0.0 11011111.11111111.11111111.11111111 - 223.255.255.255 Basic Internet Protocols Ports and Port Numbers License of this document IP Address - Loopback 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Reserved Space 127.0.0.0 — 127.255.255.255 127.0.0.1 localhost Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document IP Address - Private Networks There are IP ranges set aside for privite address spaces. These should not be made visible on the internet. 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Class A 10.0.0.0 -- 10.255.255.255 Classful Addressing (Obsolete) Loopback address Class B 172.16.0.0 -- 172.32.255.255 Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document Class C 192.168.0.0 -- 192.168.255.255 IP Address — Subneting 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Network: 192.168.192.0 Subnet: 255.255.255.224 Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document IP Address - Default Route 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) $ sudo route add default gw 192.168.1.1 ← Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document DoD Layer Model 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing Application ftp, telnet, mail, http protocols Transport TCP , UDP protocols Network IP, ICMP, IGMP protocols Link Ethernet, Token Ring, FDDI Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document Basic Internet Protocols 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing IP ICMP TCP UDP Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document Outline 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document Ports and Port Numbers Listing the Ports 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective 5 $ less /etc/services ftp 21/tcp ftp 21/udp fsp fspd ssh 22/tcp # SSH Remote Login Protocol ssh 22/udp # SSH Remote Login Protocol telnet 23/tcp telnet 23/udp # 24 - private mail system smtp 25/tcp mail smtp 25/udp mail time 37/tcp timserver Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document Outline 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources Context Objective Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document Ports and Port Numbers 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context FTP 20, 21 Telnet 23 SSH 22 smtp 25 DNS 53 http 80 pop3 110 nntp 119 netbios 137, 138, 139 imap2 143 snmp 161 Objective Context Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document Port Number vRanges 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Resources IP Addressing 1–255 Original reserved ports (till 1992) (256-1023 UNIX) 1–1023 Well Known or Famous Port Numbers - Reserved 1024–65535 Unprivileged Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers /etc/services Main port numbers License of this document License Of This Document 1.112.1 Fundamentals of TCP/IP Weight 4 Geoff Robertson Context Objective Context Copyright c 2005, 2003 Geoffrey Robertson and Nick Urbanik . Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation—either version 2 of the License or (at your option) any later version. Resources IP Addressing Classful Addressing (Obsolete) Loopback address Private addresses Subnetting Adding a Default Route Model of network layers Basic Internet Protocols Ports and Port Numbers License of this document