20
2015-10-26 1 Computer Maintenance Software (CM274) Chapter 3: Network Protocols & TCP/IP Utilities Prepared by Eisa Haider Supervised by Meshal Al-Dhamen (Oct., 2015) 1 Network Protocols 2

Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

1

Computer Maintenance Software(CM274)

Chapter 3:Network Protocols & TCP/IP Utilities

Prepared by Eisa Haider

Supervised by Meshal Al-Dhamen

(Oct., 2015)

1

Network Protocols

2

Page 2: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

2

Network Protocols

• Network Protocols provide link services, handle addressing and routing,error checking, and retransmission requests.

• Examples:• IP (Internet Protocol): Packet forwarding and routing.

• IPX (Internetwork Packet Exchange): Novell's protocol for packet forwarding and routing.

• NWLink: Microsoft's implementation of Novell's IPX/SPX protocols.

• NetBEU: Transport for NetBIOS sessions and applications.

• DDP (Datagram Delivery Protocol): An AppleTalk data transport protocol.

3

TCP/IP

TCP/IP (Transmission Control Protocol/Internet Protocol) is the basiccommunication language or protocol of the Internet. It can also be used asa communications protocol in a private network.

4

Page 3: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

3

IP Addressing

5

IP Addressing

• An IP address is a unique identifier for a node or host connection on anIP network.

• There are two versions of the Internet Protocol (IP) are in use: IP Version4 (IPv4) and IP Version 6 (IPv6).

• Each version defines an IP address differently.

• Because of its prevalence, the generic term IP address typically still refersto the addresses defined by IPv4.

6

Page 4: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

4

IP Addressing

• An IP address is a 32 bit binary number usually represented as 4 decimalvalues, each representing 8 bits, in the range 0 to 255 separated bydecimal points.

• Example:• 140.179.220.200

• 10001100. 10110011.11011100.11001000

7

IP Addressing

• Every IP address consists of 2 parts, one identifying the network, andone identifying the node.

• The class of the address and the subnet mask determine which partbelongs to the network address and which part belongs to the nodeaddress.

8

Page 5: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

5

Address Classes

9

Address Classes

• There are 5 different address classes. You can determine which class anIP address is in by examining the first 4 bits:

1. Class A addresses begin with 0xxx, or 1 to 126 decimal.

2. Class b addresses begin with 10xx, or 128 to 191 decimal.

3. Class C addresses begin with 110x, or 192 to 223 decimal.

4. Class D: Multicast.

5. Class E: Research.

10

Page 6: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

6

Address Classes

• Addresses beginning with 01111111 or 127 decimal (127.0.0.0 to127.255.255.255), are reserved for loop back and for internal testing ona local machine.

• Test this:You should always be able to ping 127.0.0.1, which points to yourself.

11

Address Classes

12

Page 7: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

7

Address Classes

Now you can see how the Class determines, by default, which part of theIP address belongs to the network and which part belongs to the node.

13

Address Classes

14

Class Number of Networks Number of Hosts

A 126 16,777,214

B 16,384 65,534

C 2,097,152 254

Page 8: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

8

Private Subnet

• There are 3 IP network reserved for private networks. The addresses are:• 10.0.0.0/8

• 172.16.0.0/12

• 192.168.0.0/16

• They can be used by anyone setting up internal IP networks, such as a lab orhome LAN.

15

Subnet Masking

16

Page 9: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

9

Subnet Masking

17

• Applying a subnet mask to an IP address allows you to identify thenetwork and node parts of the address.

• The network bits are represented by the 1s in the mask, and the nodebits are represented by the 0s.

Subnet Masking

18

• Performing bitwise logical AND operation between the IP address andthe subnet mask results in the Network Address or number.

• For example, using our test IP address (140.179.240.200) and thedefault Class B subnet mask, subnet mask, we get:

10001100.10110011.11110000.11001000 140.179.240.200 Class B IP Address

11111111.11111111.00000000.00000000 255.255.000.000 Default Class B Subnet Mask

10001100.10110011.00000000.00000000 140.179.000.000 Network Address

Page 10: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

10

Subnet Masking

19

140.179.240.200

255.255.000.000

140.179.000.000

Default Subnet Masks

20

Class A 255.0.0.0 11111111.00000000.00000000.00000000

Class B 255.255.0.0 11111111.11111111.00000000.00000000

Class C 255.255.255.0 11111111.11111111.1111111.00000000

Page 11: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

11

TCP/IP Utilities

21

TCP/IP Utilities

22

1. TRACERT.

2. PING.

3. ARP.

4. NETSTAT.

5. IPCONFIG.

6. NSLOOKUP.

Page 12: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

12

1. TRACERT

23

• TRACERT can be used to trace the path that an IP packet takes to itsdestination.

• TRACERT uses ICMP Echo packets and their TTL to determine the routeand hope count.

• When a connection between host A and B fails, you can use TRACERT tofind out where the packet stopped.

• The target can be either a name or an IP address.

1. TRACERT

24

Page 13: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

13

1. TRACERT

25

Use TRACERT -d to turn off host name resolving which speeds up thetracing.

2. PING

26

• PING utility is a diagnostic tool that you can use to test TCP/IPconfiguration and connections.

• Use the PING utility to determine whether a particular TCP/IP host isreachable or available.

• The target can be either a name or an IP address.

Page 14: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

14

2. PING

27

Some common situations where PING can be used:

1. To verify that TCP/IP has been initialized and is correctly installed byusing ping command with the loopback address (127.0.0.1).

2. To verify that the default gateway is available and that the computercan communicate with a remote host through a router by pinging ahost on a remote network.

2. PING

28

3. To verify that DNS host name resolution is available by pinging anexisting host name.

4. To verify that WINS name resolution is available by pinging an existingNETBIOS name.

Page 15: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

15

2. PING

29

3. ARP

30

• The ARP (Address Resolution Protocol) is used to resolve an (Layer 3) IPaddress to a (Layer 2) MAC address.

• The ARP utility provides the functionality to modify or display the ARPcache table.

Page 16: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

16

1. ARP

31

Use ARP -a to display current ARP entries.

4. NETSTAT

32

• NETSTAT displays TCP/IP protocol statistics and information about TCPand UDP connections to and from your computer.

• Use NETSTAT –a to display all the connections and listening ports.

• Use NETSTAT –e to display Ethernet statistics, such as the number ofbytes and packets sent and received.

Page 17: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

17

4. NETSTAT (NETSTAT –a )

33

4. NETSTAT (NETSTAT –e )

34

Page 18: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

18

5. IPCONFIG

35

• IPCONFIG displays TCP/IP configuration information and renew andrelease DHCP assigned address configuration.

• Using IPCONFIG /All displays full configuration information.

5. IPCONFIG

36

Page 19: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

19

6. NSLOOKUP

37

• NSLOOKUP displays information that can use to diagnose Domain NameSystem (DNS) servers and to send DNS queries to DNS servers.

• NSLOOKUP can be used in interactive (without options) and non-interactive mode.

6. NSLOOKUP (Interactive Mode)

38

Page 20: Chapter 3: Network Protocols & TCP/IP Utilities€¦ · 2015-10-26 9 Subnet Masking 17 • Applying a subnet mask to an IP address allows you to identify the network and node parts

2015-10-26

20

6. NSLOOKUP (None-Interactive Mode)

39