IP IP Addressing Basic

Addressing with Subnets. • Subnet Addressing. • Subnet Mask. • Decimal Equivalent of Bit Patterns. • Addressing Summary Example. • Class B Subnet Example.
1003KB taille 24 téléchargements 479 vues
IP1 (1) Internetwork Basic concepts TCP/IP IP Addressing Basic router configuration Hervé TREMEUR AT&T Labs AT&T Global Network [email protected] IP1 Training DU IRI Nice

CISCO router introduction

Contents (Cont 1) Internetwork Basic concepts y y y y y y y y y y y

Data Link Addresses TCP/ IP Overview OSI Model / TCP protocol suite Peer to Peer communication Data encapsulation and headers Router creates a logical path Frame changes on logical path Network Addresses Frame changes on logical path Address Resolution Protocol ARP Packet format

CISCO router introduction

Contents (Cont 2) 1. Interconnecting Networks with TCP/IP y TCP/IP Application Layer Overview y TCP/IP Transport Layer Overview y TCP Segment Format y Port Numbers y TCP Port Numbers y TCP Three-Way Handshaking/ Open Connection y TCP Simple Acknowledgement

CISCO router introduction

Contents (Cont.3) y y y y y y y y

TCP Sequence and Acknowledgement Numbers TCP Sequence and Acknowledgement Numbers TCP Windowing UDP SEGMENT Format Internet Layer Overview IP Datagram Protocol Field Internet Control Message Protocol

y Address Resolution Protocol y TCP/IP Address Overview

CISCO router introduction

Contents (cont.4) 2. IP Addressing y y y y y y y

IP Addressing IP Address Classes IP Address Classes Hosts Addresses Determining Available Host Addresses Written Exercise 1 : IP Address Classes Addressing without Subnets

CISCO router introduction

Contents (cont.5) y y y y y y y y y y

Addressing with Subnets Subnet Addressing Subnet Mask Decimal Equivalent of Bit Patterns Addressing Summary Example Class B Subnet Example Class B Subnet Example (cont.) Subnet Planning Class B Subnet Planning Example Class B Subnet Planning Example

CISCO router introduction

Contents (cont.6) 3. Router configuration y y y y y y y y y y

IP Address Configuration IP Host Command Name Server Configuration Name System How Host command Show Host command ( cont.) Verifying Address Configuration Ping Command Extended Ping Command Trace Command

CISCO router introduction

Data Link Addresses Message DATA

Return address

=== ===

Destination address

Destination address

Return address

DATA

y When data is to be delivered on a LAN it is encapsulated within an entity called frame

y A frame is a kind of binary envelope y Postal service needs a destination address to deliver the letter

CISCO router introduction

TCP/ IP Overview Workstation

Workstation

Internet

TCP / IP

y TCP / IP suite protocol was developed by the Defense Advanced Research Projects Agency (DARP), later was TCP/IP was included with the Berkeley Software Distribution of UNIX

y The Internet Protocols can be used to communicate across any set of

interconnected networks. They are equally well suited for LAN and WAN communication.

y Internet protocol suite includes Layer 3 and 4 specifications (IP TCP / IP) and also for applications (e-mail, remote login, terminal emulation, file transfer)

CISCO router introduction

OSI Model / TCP protocol suite OSI

TCP / IP

Application Presentation

Application

Session Transport

Transport

Network

INTERNET

Data-Link

Data-Link

Physical

Physical

y TCP/IP Protocol stack maps closely to the Open System Interconnection ( OSI) reference Model in the lower layer, All standard physical and data-link protocols are supported

y TCP/IP Information is transferred in a sequence of datagrams. One message may be tranmitted as a serires of datagrams that are reassembled into the message at the receiving location

CISCO router introduction

Peer to Peer communication HOST A

HOST B

Application

Transport INTERNET Data-Link Physical y y y y y

Application

TCP segment IP Packet Frame Bits

Transport INTERNET Data-Link Physical

Each layer uses its own protocol to communicate with its peer Transport layer of TCP/IP uses segments The TCP segments becomes part of the network layer packets In turns the packets become part of the data link frames Ultimately becomes bits transmitted by the physical layer

CISCO router introduction

Data encapsulation and headers A user makes a request to open a specific page by sending the URL ( uniform Resource Locator) to the WEB server

Web Request

DATA Transport Header DATA

Data TCP header with

Segment

Network Transport Header Header DATA

Packet

Frame Network Transport Frame Header Header Header DATA Check

10100111100010101010101010101010101

Frame ( Medium dependant)

Bits

CISCO router introduction

Router creates a logical path Logical Path between networks

1.1

4.2

Token-ring

FDDI Ring

Network 1

Network 2

Neywork 3

Network 4

CISCO router introduction

Network Addresses

Logical Path between networks

1.2

FDDI 1.2 4.2 DATA

2.2

2.1 1.1

Network 1 ETHERNET1.2 4.2 DATA

SERIAL 1.2 4.2 DATA

3.1

3.2

4.1 Token-ring

FDDI Ring

Network 2

4.2

Network 3

Network 4 TOKEN RING 1.2 4.2 DATA

CISCO router introduction

Frame changes on logical path

Logical Path between networks

1.2

FDDI 1.2 4.2 DATA

SERIAL 1.2 4.2 DATA

Token-ring

FDDI Ring

Network 1 ETHERNET1.2 4.2 DATA

Network 2

4.2

Network 3

Network 4 TOKEN RING 1.2 4.2 DATA

CISCO router introduction

Frame changes on logical path (2) Host H1

Host H2

1.2 3.2

DATA Transport Header DATA

Process in Router B

Process in Router A

Network Transport Header Header DATA

Network Transport Header Header DATA

Frame Network Transport Frame Header Header Header DATA Check

1010011110001010101010101

Transport Header DATA

NetworkTransport Header Header DATA

Frame Network Transport Frame Header Header Header DATA Check

Frame Network Transport Frame Header Header Header DATA Check

1010011110001010101010101

1010011110001010101010101

2.1

2.2

1.1

3.1

FDDI Ring

Network 1

DATA

Router A

Network 2

Router B Network 3

CISCO router introduction

Frame changes on logical path (3) Host H1

Host H1 Mac@H1 Mac@H2

1.2

3.2

DATA Transport Header DATA

Process in Router B

Process in Router A

[email protected] Transport IP@ 3.2 Header DATA

[email protected] Transport IP@ 3.2 Header DATA

Mac@H1 [email protected] Frame Mac@A1 IP@ 3.2 Header DATA Check

1010011110001010101010101

1.1

Mac@A2 [email protected] Transport Frame Mac@B2 IP@ 3.2 Header DATA Check

Mac@B2

Mac@A2

Mac@A1

Transport Header DATA

[email protected] Transport IP@ 3.2 Header DATA Mac@B3 [email protected] Transport Frame Mac@H2 IP@ 3.2 Header DATA Check

1010011110001010101010101

1010011110001010101010101 2.1

DATA

2.2 3.1 Mac@B3

FDDI Ring

Network 1

Router A

Network 2

Router B Network 3

CISCO router introduction

Address Resolution Protocol •I heard that broadcast. The message is for me. Here is my Ethernet address

•I need the Ethernet address of 172.20.5.2

172.20.5.1 SP

172.20.5.2 DP

IP : 172.20.5.2 = ? ? ? IP : 172.20.5.2 Ethernet : 0800.0020.1111

Map IP

MAC Local ARP

yARP is used to resolve or map a known IP address to a MAC sublayer address in order to allow communication on a multi-access medium such as Ethernet. To determine a destination MAC address for a datagram, a table called the ARP cache is checked. If the address is not in the table, ARP sends a broadcast that will be received by every station on the network, looking for the destination station.

yThe term "local ARP" is used to describe the search for an address when the requesting host and the destination host share the same medium or wire.

CISCO router introduction

ARP Packet Format Protocol Type Port (16)

Hardware Type (16) Harware Address Length

Protocol Address length

Operation

Sender Hardware Address Sender Hardware Address Sender IP Address

Target Hardware Address

Target Hardware Address Target IP Address

Common Hardware Type codes

Sender IP Address

1

Ethernet

3

X25

4

Token Ring

6

IEEE 802

15

Frame Relay

16

ATM

17

HDLC

18

Fiber channel

20

CISCO router introduction

Application Layer Overview

Application

Transport Internet

Computer applications

Network applications

Internetwork applications

Word processing

Electronic Mail

Presentations Text Graphics (JPEG,GIF) Data (ASCII,EBCDIC) Audio Video (MIDI,MPEG)

File Transfer

Electronic data Interchange

Remote Access

World Wide Web E-mails –Gateways

Network Management

Spreadsheets

Oothers

Financial transaction services

Database

Data-Link

Design Project planning

Internet navigation utilities Conferencing Video, voice, data

Physical

y JPEG : Joint Photographic Experts Group (picture format standars) y MIDI : Musical Instrument Digital Interface (Digitized music) y MPEG : Motion Pictures Experts Group ( standard for compression and coding motion video, bits rate up to 1.5 Mbps)

CISCO router introduction

Application Layer Overview (2) File transfer -TFTP - FTP - NFS E-Mail

Application Transport Internet Data-Link Physical

-SMTP Worl Wide WEB - HTTP Remote Login - Telnet - rlogin Network Management - SNMP Name Management -DNS

y Application protocols exist for file transfer, e-mail, and remote login . y Network management is also supported at the application layer. y Telnet, rlogin, SNMP, DNS are also used by the router

CISCO router introduction

Transport Layer Overview Transmission Control

connection oriented

Protocol (TCP)

Application

User Datagram

Connectionless

Protocol (UDP )

Transport Internet Data-Link Physical

y y y y

Flow control provided by sliding windows Verification provided by sequence numbers and Acknowledgements TCP : Connection oriented protocol UDP Connectionless and unacknowledged , it depends on upper layer protocols for verifications

CISCO router introduction

TCP Segment Format Source Port (16)

Destination Port (16)

Sequence

Number (32)

Acknowledgement Number (32) Header

Reserved (6)

Length (4)

Code Bits (6)

Checksum (16)

Window (16) Urgent (16)

Options (0 or 32 if any) Data (Varies)

y y y y y y y y y y y y

Source Port – Number of the calling port Destination Port – Number of the called Port (16 Bits) Sequence Number- Number used to ensure correct sequencing of the arriving data (32 bits) Acknowledgement Number – Next Expected TCP octet (32 bits) Header Length – Number of 32 bit words in the Header (4bits) Reserved – Set to 0 (6bits) Code bits – Control functions such as setup and termination of a session ( 6bits) Window – Number of Octets that the device is willing to accept Checksum – Calculated checksum of he Header and data fields (16 bits) Urgent – Indicates the end of the urgent data (16 bits) Options – one currently defined : Maximum TCP segment size (0 or 32 bits if any) Data – Upper-Layer protocol data (varies)

CISCO router introduction

Port Numbers

Application LAYER

F

T

S

H

B

D

T

S

S

T

R

T

E

M

T

G

N

F

N

N

R

I

P

L

T

T

P

S

T

M

M

A

P

N

P

P

P

P

P

P

69

161

162

E T 21 Transport LAYER

y y y y

23

25

TCP

80

179

53

520

UDP

Both TCP and UDP use port ( socket) to pass information to the upper level Well known port numbers (below 1024) controlled by Internet Assigned Numbers Authority (IANA) Numbers 1024 and above are dynamically assigned ports. Registered port numbers are those registered for vendor-specific applications

Å Port Numbers

CISCO router introduction

TCP Port Number HOST A

Source

Destination

port

port

HOST B

TELNET B

SP

DP

1028

23

•DP = 23 send •Packet to •Telnet •Application

yEnd systems use port numbers to select the proper application. Originating source port numbers are dynamically assigned, by the Source Host, some number greater than 1023

CISCO router introduction

TCP Three-Way Handshake / Open Connection HOST B HOST A

1

Send SYN (Seq=100 ctl=SYN

SYN Received

3 y y y y

SYN Received Send SYN, ACK (Seq=300 ack= 101

2

Established (Seq=101 ackl=301 ctl=ack

TCP is connection-oriented, it requires connection establishment before data transfer begins. 1) A-Æ B SYN my sequence number is X, ACK number is 0 , ACK bit is not set 2) A Å B ACK your sequence number is X+1, SYN my sequence number is Y, ACK Bit is set. 3) A -> B ACK your sequence number is Y+1, my sequence number is X+1, ACK Bit is set.

CISCO router introduction

TCP Simple Acknowledgement Receiver Sender

Send 1 Received ACK 2 Send 2

Received ACK 3 Send 3 Received ACK 4

Receive 1 Send ACK 2

Receive 2 Send ACK 3 Receive 3 Send ACK 4

y The window size determine how much data the receiving station can accept at one time. with a window size of 1, each segment must be acknowledged before another segment is transmitted, efficient use of bandwidth

CISCO router introduction

TCP Sequence and Acknowledgement Numbers Source

Destination Port

Port

Sequence

Acknowledg ement

Just send Number 11

1028

23

I just got Number 11, Now I need number 12

10

100 23

1028

23

-------------

11

10 28

100

11

1000 23

10 28

101

12

CISCO router introduction

TCP Windowing Sender Window size =3, Send 1

Window Size = 2

Window size=3, Send 2 Window size=3, Send 3 ACK=3 Window Size = 2

PACKET 3 is Dropped

Window size=3, Send 3 Window size=3, Send 4 ACK=5 Window Size = 2

y TCP uses a flow control yThe receiving TCP reports a WINDOW to the sending TCP ( Number of Octets starting with ACK yWindow cut in half in case of congestion yTCP window size is documented in RFCs 793 and 813

CISCO router introduction

UDP SEGMENT Format Source Port (16)

Destination Port (16)

Length (16)

Checksum (16) DATA ( if any)

y No sequence or acknowledgement fields y UDP uses no windowing or acknowledgement y Source port --- Number of the calling port (16 bits) y Destination port --- Number of the called port (16 bits) y Length ---Length of UDP header and UDP data (16 bits) y Checksum --- Calculated checksum of the header and data fields (16 bits) y Data --- Upper layer Protocol data (varies) y Protocols using UDP : TFTP, SNMP, NFS and DNS

CISCO router introduction

Internet Layer Overview

Application

Internet (IP)

Transport

Internet Control Message Protocol(ICMP)

Internet Data-Link

Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP)

Physical y Several protocols operates at the TCP/IP internet layer, which corresponds to the OSI model network layer y IP provides connectionless, best effort delivery routing of datagrams. Not concerned with data contents but the way to move the datagrams to the destination

y The Internet Control Message Protocol ( ICMP) provides control and messaging capabilities y The Address Resolution Protocol (ARP) determines the Data-link layer address for known IP address y The Reverse Address Resolution Protocol (RARP) determines network address when data link layer address are known

CISCO router introduction

IP Datagram Version (4)

Header Length (4)

Priority and Type of service (8)

Identification (16) Time-to-live (8)

Total Length (16) Flags (3)

Protocol (8)

Fragment Offset (1)

Header Checksum ( 16)

Source IP address (32) Destination IP Address (32) OPTIONS (0 or 32 any) Data ( Varies)

y VERS -- version number y HLEN -- header length, in 32-bit words y type of service -- how the datagram should be handled y total length -- total length (header + data) y identification, flags, flag offset -- provides y fragmentation of datagrams to allow differing MTUs in the internetwork y TTL -- Time-To-Live y protocol -- the upper-layer (Layer 4) protocol sending the datagram y header checksum -- an integrity check on the header y source IP address and destination IP address - 32-bit IP addresses y IP options -- network testing, debugging, security, and other options y Data ---Upper-Layer protocol data (varies)

CISCO router introduction

Protocol Field Transport Layer

UDP

TCP 6

Internet Layer

17 IP

ÅProtocol Numbers

y The protocol field determines the Layer 4 being carried within IP datagram y Each IP Header must identify the destination Layer 4 protocol y P includes the protocol number in the protocol field Protocol

Protocol Field

Internet Control Message Protocol (ICMP)

1

Interior Gateway Routing Protocol (IGRP)

9

IP Version 6 (IPV6)

41

Generic Routing Encapsulation (GRE)

47

Internetwork Packet Exchange in Internet Protocol

111

Layer 2 Tunneling Protocol (L2TP)

115

CISCO router introduction

Internet Control Message Protocol

Application

Destination Unreachable

Transport Echo (Ping)ol(ICMP)

ICMP Other

Internet Data-Link Physical

y

All TCP/IP hosts implement ICMP. ICMP messages are carried in IP datagrams and are used to send error and

control messages. ICMP uses the following types of defined messages. Others exist that are not included on this list

y y y y y y y

Destination Unreachable Time to Live Exceeded Parameter Problem Source Quench Redirect Echo Echo Reply

y y y y y y

Timestamp Timestamp Reply Information Request Information Reply Address Request Address Reply

CISCO router introduction

TCP/IP Address Overview

172.21.0.1

172.20.0.2 172.20.0.1 172.22.0.1

10.13.0.0

y y y y

10.13.0.1

HDR

172.21.0.2

192.168.1.0

172.22.0.2 SA

DA

DATA

192.168.1.1

Unique Addressing allows Communication between end Stations Path choice is based on destination Address Each IP datagram includes Source IP Address and Destination IP Address Each Company on the Internet is seen as a single network.

CISCO router introduction

IP Addressing 32 Bits Dotted Decimal

NETWORK

Maximum

255

1 Binary

11111111

HOST 255

8

255

16 11111111

255

24

32

11111111

11111111 1 6 3 1 8 2 4 2 6

4 2 1

8

Example Decimal Example Binary

172

16

122

204

10101100

00010000

01111010

11001100

y The IP Address is 32 Bits in Length and has 2 parts : Network and Host number y The Address format is known as dotted decimal notation y Minimum value for an octet is 0 ( all 0 s) y Maximum value for an Octet is 255 (all 1s)

CISCO router introduction

IP Address Classes

8 Bits

8 Bits

8 Bits

8 Bits

Class A:

Network

Host

Host

Host

Class B:

Network

Network

Host

Host

Class C:

Network

Class D:

MULTICAST

Class E:

Research

y y y y y

Network

Network

Host

Class A : 8 Network bits and 24 bits in the Host field, class A networks are rare Class B : 16 Network bits and 16 bits in the Host field Class C : 24 Network bits and 8 bits in the Host field Class D : Addresses starts at 224.0.0.0 Class E : Addresses begin at 240.0.0.0

CISCO router introduction

IP Address Classes 1

8

9

16

17

24

25

Class A:

0NNNNNNN

Host

Host

Host

Class B:

10NNNNNN

Network

Host

Host

Network

Network

Class C: Class D:

y y y y y

110NNNNN

1110MMMM

Multicast

Multicast

32

Host

Multicast

Class A : First bit is 0 , Network 1.0.0.0 to 126.0.0.0, 127 networks,16 777 216 Hosts Class B : First 2 bits 10 , Network 128.0.0.0 to 191.255.0.0, 16384 networks, 65 536 Hosts Class C : First 3 bits 110 , Network 192.0.0.0 to 223.255.255.0, 2097152 networks, 254 Hosts Class D : First 4 bits 1110 , Network 224.0.0.0 to 239.255.255.255 10.0.0.0, 172.16.0.0 to 172.31.0.0 and 192.168.0.0 are private and not used in public network.

CISCO router introduction

Hosts Addresses 10.6.1.2 172.20..2.2

10.6.1.1 E0 10.6.1.3

172.20.2.3

172.20.2.1

E1 10.6.1.4

172.20.2.4 Routing Table

Network 172.20. Network y y y y

2.4 Host

Interface

172.20.0.0

E0

10.0.0.0

E1

Each device or interface must have a non zero number A value of 0 means this network A host address of all 1s is reserved for IP broadcast into that network Routing table contains entries for Network or wire Addresses

CISCO router introduction

Determining Available Host Addresses Network

Host

172

16

0

0

10101100

00010000

00000000

00000000

00000000

00000001

00000000

00000010

11111111

11111111

65536

2**(N)-2 = 2**(16)-2 =65534

y Once the network portion is determined, we can determine the total number of Hosts by the formula 2 **(N) – 2

y Subtract 2 ( 1 address of all 0s for network , 1 address of all 1s for broadcast address)

CISCO router introduction

Written Exercise 1 : IP Address Classes Address

Class

Network

Host

10.2.1.1 128.83.2.100 201.222.5.64 192.6.141.2 130.113.64.16 256.221.20.10

y Identify the appropriate class ( A, B or C), network component and host component for each address.

CISCO router introduction

Addressing without Subnets

172.20.0.1

172.20.0.2 172.20.0.3

172.20.1.1 172.20.1.2

172.20.1.3

Network 172.20.0.0

y All datagrams addressed to network 172.20.0.0 are treated in the same way, regardless of the third and the fourth octet of the address.

y All subsystems on the network encounter all the broadcast on the network, can result in poor performance

CISCO router introduction

Addressing with Subnets

172.20.2.1

172.20.2.2 172.20.2.3

Network 172.20.2.0

172.20.1.1 172.20.1.2

172.20.1.3

Network 172.20.1.0

y Dividing the network into smaller segments, or subnets, makes the network address use more efficient . From outside the network is seen in the same way .

y In the example, network 172.20.0.0 is subdivided into 2 subnets, 172.20.1.0 and 172.20.2.0. Router determine the destination network using the subnet address, limiting the amount of traffic on the network segment.

CISCO router introduction

Subnet Addressing 172.20.2.2 172.20.1.2

172.20.2.1 E0 172.20.2.3

172.20.1.3

172.20.1.1

E1 172.20.2.4

172.20.1.4 Routing Table

Network 172.20

1

Network

4

Subnet Host

Interface

172.20.1.0

E0

172.20.2.0

E1

y Subnets are an extension of the network number . y A network uses a subnet Mask to determine what part of the IP address is used for the network, the subnet, and y

the device (host) address. A subnet Mask is a 32 bit value containing a number of 1 bits for the network and subnet ID, and a number of 0 bits for the Host Id.

CISCO router introduction

Subnet Mask Network IP Address

Host

172

16

0

Network Default Subnet Mask 8-Bit Subnet Mask

255

0

Host 255

Network 255

0

Subnet 255

255

0

Host 0

y Subnet are taken from the Host field of the Subnet. The number of subnet bits taken from the host field is identified by a subnet mask.

y Each bit in the subnet mask is used to determine how the corresponding bit in the IP address has to be interpreted :

9 Binary 1 for the network and subnet bits 9 Binary 0 for the host bits

y The subnet mask can be denoted as follows 9 Dotted decimal : 255.255.255.0 9 Bit count : / 24 9 Hexadecimal : 0xFFFFFF00

CISCO router introduction

Decimal Equivalent of Bit Patterns 128

64

32

16

8

4

2

1

0

0

0

0

0

0

0

0

=

0

1

0

0

0

0

0

0

0

=

128

1

1

0

0

0

0

0

0

=

192

1

1

1

0

0

0

0

0

=

224

1

1

1

1

0

0

0

0

=

240

1

1

1

1

1

0

0

0

248

1

1

1

1

1

1

0

0

= =

1

1

1

1

1

1

1

0

254

1

1

1

1

1

1

1

1

= =

252

255

y Subnet bits come from the high-order bits of the host field y To determine a subnet mask for an address, add the decimal value of each position that has a 1 in it . For example : 224 = 128 + 64 + 32

CISCO router introduction

Subnet without Subnet Mask

NETWORK 172.16.2.160 255.255.0.0

Network Number

SUBNET

HOST

10101100

00010000

00000010

10100000

11111111

11111111

00000000

00000000

10101100

00010000

00000000

00000000

172

16

0

0

y Subnets not in use --- the default y The router performs a logical AND operation to obtain the network number (host portion removed)

CISCO router introduction

Subnet with 24 bits (Network+Subnet) Mask

NETWORK

SUBNET

HOST

172.16.2.160

10101100

00010000

00000010

10100000

255.255.255.0

11111111

11111111

11111111

00000000

10101100

00010000

00000010

00000000

Network Number

172

16

2

0

y Network Number extended by eight bits y With eight bits of subnetting, the extracted network (subnet) number is 172.16.2.0

CISCO router introduction

Subnet with 26 bits (Network+Subnet) Mask

NETWORK

SUBNET

HOST

172.16.2.160

10101100

00010000

00000010 10

100000

255.255.255.192

11111111

11111111

11111111 11

000000

10101100

00010000

00000010 10

000000

Network Number

172

16

2

128

y Network Number extended by 10 bits y With ten bits of subnetting, the extracted network (subnet) number is 172.16.2.128

CISCO router introduction

Written Exercise 2 : Subnet Mask Subnet Address

Mask

172.16.12.10

255.255.255.0

10.6.24.20

255.255.240.0

10.30.36.12

255.255.255.0

192.6.141.2

255.255.255.0

130.113.64.16

255.255.240.0

221.241.20.10

255.255.248.0

Class

Subnet

y Determine the address class and calculate the subnet of a given network address y Write the address class and subnet number next to the IP address in the table

CISCO router introduction

Written Exercise 2 : result Subnet Address

Mask

Class

Subnet

172.16.12.10

255.255.255.0

B

172.16.2.0

10.6.24.20

255.255.240.0

A

10.6.20.0

10.30.36.12

255.255.255.0

A

10.30.36.0

192.6.141.2

255.255.255.0

C

192.6.141.0

130.113.64.16

255.255.240.0

B

130.113.64.0

221.241.20.10

255.255.248.0

C

221.241.16.0

y Determine the address class and calculate the subnet of a given network address y Write the address class and subnet number next to the IP address in the table

CISCO router introduction

Broadcast Address

172.20.3.0 172.20.2.1 172.20.4.0 172.20.2.0 172.20.1.0 172.20.3.255 Directed Broadcast 255.255.255.255 Local Network Broadcast 172.20.255.255 All Subnets Broacast Directed Broadcast y y y y

Cisco IOS supports three kinds of broadcasts as follows : Flooding (flooded broadcast are not propagated but are considered as local broadcast) Directed Broadcast (broadcast a message to all hosts within a single subnet) All subnets broadcast (Broadcast a message to all hosts on all subnets)

CISCO router introduction

Addressing Summary Example 172

16

NETWORK

2

128

SUBNET

HOST

10101100

00010000

00000010 10

100000

Host

255.255.255.192 11111111

11111111

11111111 11

000000

Mask

172.16.2.128

10101100

00010000

00000010 10

000000

Subnet

172.16.2.191

10101100

00010000

00000010 10

111111

Broadcast

172.16.2.129

10101100

00010000

00000010 10

000001

First

172.16.2.190

10101100

00010000

00000010 10

111110

Last

172.16.2.160

y Draw a line after the last contiguous subnet mask 1 bit y On the right side place all 0 ‘s in the remaining spaces. This will be the subnet y In the next row place all 1’s in in the remaining spaces. This will be the broadcast address

CISCO router introduction

Class B Subnet Example IP Host Address : 172.16.2.121, Subnet Mask : 255.255.255.0

NETWORK

SUBNET

HOST

172.16.2.121

10101100

00010000

00000010

01111001

Host

255.255.255.0

11111111

11111111

11111111

00000000

Mask

172.16.2.0

10101100

00010000

00000010

00000000

172.16.2.255

10101100

00010000

00000010

11111111

Subnet Broadcast

172.16.2.1

10101100

00010000

00000010

00000001

First

172.16.2.254

10101100

00010000

00000010

11111110

Last

y This network has eight bits of subnetting that provide up to 254 subnets and 254 hosts addresses

CISCO router introduction

Class B Subnet Example (cont.) Number of bits

Subnet Mask

Number of Subnets

Number of Hosts / Subnet

17

255.255.128.0

2

32766

18

255.255.192.0

4

16382

19

255.255.224.0

8

8190

20

255.255.240.0

16

4094

21

255.255.248.0

32

2046

22

255.255.252.0

64

1022

23

255.255.254.0

128

510

24

255.255.255.0

256

254

25

255.255.255.128

512

126

26

255.255.255.192

1024

62

27

255.255.255.224

2048

30

28

255.255.255.240

4096

14

29

255.255.255.248

8192

6

30

255.255.255.252

16384

2

CISCO router introduction

Subnet Planning 3 subnets 10 Hosts / subnet Class C Address 192.168.5.16

192.168.5.32

y Class C Address 192.168.5.0, y 20 subnets are needed, y

5 hosts/ subnet

192.168.5.48

192.168.5.0

CISCO router introduction

Class C Subnet Planning Example 1 IP Host Address : 192.16.2.121, Subnet Mask : 255.255.255.248

NETWORK

Network

Subnet Host

11000000

00010000

00000010

01111 ! 001

Host

255.255.255.248 11111111

11111111

11111111

11111 ! 000

Mask

192.16.2.120

11000000

00010000

00000010

01111 ! 000

192.16.2.127

11000000

00010000

00000010

192.16.2.121

11000000

00010000

00000010

01111 ! 001

192.16.2.126

11000000

00010000

00000010

01111 ! 110

192.16.2.121

y

Subnet 01111 ! 111 Broadcast First Last

CISCO router introduction

Class C Subnet Planning Example 2 IP Host Address : 192.16.2.121, Subnet Mask : 255.255.255.252

NETWORK

Network

Subnet Host

11000000

00010000

00000010

011110 ! 01

Host

255.255.255.252 11111111

11111111

11111111

111111 ! 00

Mask

192.16.2.120

11000000

00010000

00000010

011110 ! 00

192.16.2.123

11000000

00010000

00000010

192.16.2.121

11000000

00010000

00000010

011110 ! 01

192.16.2.122

11000000

00010000

00000010

011110 ! 10

192.16.2.121

y

Subnet 01111 0 ! 11 Broadcast First Last

CISCO router introduction

Class C Subnet Possibilities

Number of bits

Subnet Mask

Number of Subnets

Number of Hosts / subnet

1

255.255.255.128

2

126

2

255.255.255.192

4

62

3

255.255.255.224

8

30

4

255.255.255.240

16

14

5

255.255.255.248

32

6

6

255.255.255.252

64

2

CISCO router introduction

IP Address Configuration

CISCO router introduction

IP Host Command

CISCO router introduction

Name Server Configuration

CISCO router introduction

Name System

CISCO router introduction

How Host command

CISCO router introduction

Show Host command ( cont.)

CISCO router introduction

Verifying Address Configuration

CISCO router introduction

Ping Command

CISCO router introduction

Extended Ping Command

CISCO router introduction

Trace Command