Tcpip

  • Uploaded by: Raj
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tcpip as PDF for free.

More details

  • Words: 3,785
  • Pages: 94
Chapter 8

Interconnecting  Networks with  TCP/IP © 1999, Cisco Systems, Inc. 

8­1

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­2

Objectives Upon completion of this chapter you will  be able to perform the following tasks: •  Identify the IP protocol stack, its protocol layer  functions, and commonly used IP protocols •  Identify IP address classes, IP addresses, IP subnet  masks, IP network numbers, subnet numbers, and  possible host numbers. •  Configure IP addresses and subnet masks on a  router interface and optionally configure a host table. •  Interconnect the VLANs with a layer three device  such as a router on a stick.  © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­3

Introduction to TCP/IP Host

Host

Internet TCP/IP

Early protocol suite Universal © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­4

TCP/IP Protocol Stack 7

Application

6

Presentation

5

Session

4

Transport

Transport

3

Network

Internet

2

Data Link

Data Link

1

Physical

Physical

© 1999, Cisco Systems, Inc. 

Application

www.cisco.com

5 4 3 2 1

ICND—8­5

Application Layer Overview

Application

Transport Internet Data Link Physical © 1999, Cisco Systems, Inc. 

File Transfer ­ TFTP * ­ FTP * ­ NFS E­Mail ­ SMTP Remote Login ­ Telnet * ­ rlogin * Network Management ­ SNMP * Name Management ­ DNS* *Used by the router

www.cisco.com

ICND—8­6

Transport Layer Overview

Application Transport Internet

Transmission Control Protocol (TCP)

Connection­ Oriented

User Datagram  Protocol (UDP)

Connectionless

Data Link Physical

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­7

TCP Segment Format Bit 0

Bit 15 Bit 16

Bit 31 Destination port (16)

Source port (16)

Sequence number (32) Acknowledgement number (32) Header length (4)

Reserved (6) Code bits (6) Checksum (16)

20 Bytes

Window (16) Urgent (16)

Options (0 or 32 if any) Data (varies) © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­8

Port Numbers

Application Layer

Transport Layer © 1999, Cisco Systems, Inc. 

F T P

T E L N E T

S M T P

D N S

T F T P

S N M P

R I P

21

23

25

53

69

161

520

TCP

UDP www.cisco.com

Port  Numbers

ICND—8­9

TCP Port Numbers Source Port

Telnet Z

© 1999, Cisco Systems, Inc. 

Dest. Port



Host Z

Host A

SP

DP

1028

23



www.cisco.com

Dest. port = 23. Send packet to my  Telnet  application.

ICND—8­10

TCP Three Way  Handshake/Open Connection Host A

1

Host B

Send SYN  (seq=100 ctl=SYN)

© 1999, Cisco Systems, Inc. 

SYN received

www.cisco.com

ICND—8­11

TCP Three Way  Handshake/Open Connection Host A

1

Host B

Send SYN  (seq=100 ctl=SYN)

SYN received Send SYN, ACK  2 (seq=300 ack=101 ctl=syn,ack)

SYN received

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­12

TCP Three Way  Handshake/Open Connection Host A

1

Host B

Send SYN  (seq=100 ctl=SYN)

SYN received Send SYN, ACK  2 (seq=300 ack=101 ctl=syn,ack)

SYN received

3

Established (seq=101 ack=301 ctl=ack)

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­13

TCP Simple Acknowledgment  Sender 

 Receiver

Window size = 1 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­14

TCP Simple Acknowledgment  Sender 

 Receiver

Send 1

Receive 1

Window size = 1 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­15

TCP Simple Acknowledgment  Sender 

 Receiver

Send 1

Receive 1 Send ACK 2

Receive ACK 2 

Window size = 1 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­16

TCP Simple Acknowledgment  Sender 

 Receiver

Send 1

Receive 1 Send ACK 2

Receive ACK 2  Send 2

Receive 2

Window size = 1 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­17

TCP Simple Acknowledgment  Sender 

 Receiver

Send 1

Receive 1 Send ACK 2

Receive ACK 2  Send 2

Receive 2 Send ACK 3

Receive ACK 3

Window size = 1 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­18

TCP Simple Acknowledgment  Sender 

 Receiver

Send 1

Receive 1 Send ACK 2

Receive ACK 2  Send 2

Receive 2 Send ACK 3

Receive ACK 3 Send 3

Receive 3

Window size = 1 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­19

TCP Simple Acknowledgment  Sender 

 Receiver

Send 1

Receive 1 Send ACK 2

Receive ACK 2  Send 2

Receive 2 Send ACK 3

Receive ACK 3 Send 3

Receive 3 Send ACK 4

Receive ACK 4

Window size = 1 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­20

TCP Sequence and  Acknowledgment Numbers Source Port

Dest. Port

Sequence #

Acknowledgement #



I just sent #10.

Source Dest. Seq. Ack. 1028

23

© 1999, Cisco Systems, Inc. 

10

1

www.cisco.com

ICND—8­21

TCP Sequence and  Acknowledgment Numbers Source Port

Dest. Port

Sequence #

Acknowledgement #

I just sent #10.



I just got #10, now I need #11.

Source Dest. Seq. Ack. 1028

23

10

Source Dest. Seq. Ack.

1

23

© 1999, Cisco Systems, Inc. 

www.cisco.com

1028

1

11

ICND—8­22

TCP Sequence and  Acknowledgment Numbers Source Port

Dest. Port

Sequence #

Acknowledgement #

I just sent #11.



I just got #10, now I need #11.

Source Ack. Source Dest. Dest. Seq. Seq. Ack. 1028

23

10

Source Dest. Seq. Ack.

1

23 1028

23

© 1999, Cisco Systems, Inc. 

11

1028

1

11

2

www.cisco.com

ICND—8­23

TCP Sequence and  Acknowledgment Numbers Source Port

Dest. Port

Sequence #

Acknowledgement #

I just sent #11.



I just got #11, now I need #12.

Source Ack. Source Dest. Dest. Seq. Seq. Ack. 1028

23

10

Source Dest. Seq. Ack.

1

23 1028

23

11

1

11

Source Dest. Seq. Ack.

2

23 © 1999, Cisco Systems, Inc. 

1028

www.cisco.com

1028

2

12 ICND—8­24

TCP Windowing Sender

© 1999, Cisco Systems, Inc. 

Receiver

www.cisco.com

ICND—8­25

TCP Windowing Sender

Window size = 3 Send 1

Receiver

Window size = 3 Send 2 Window size = 3 Send 3

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­26

TCP Windowing Sender

Window size = 3 Send 1

Receiver

Window size = 3 Send 2 Window size = 3 Send 3

© 1999, Cisco Systems, Inc. 

ACK 3 Window size = 2

www.cisco.com

Packet 3 is Dropped

ICND—8­27

TCP Windowing Sender

Window size = 3 Send 1

Receiver

Window size = 3 Send 2 Window size = 3 Send 3

ACK 3 Window size = 2

Window size = 3 Send 3

Packet 3 is Dropped

Window size = 3 Send 4

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­28

TCP Windowing Sender

Window size = 3 Send 1

Receiver

Window size = 3 Send 2 Window size = 3 Send 3

ACK 3 Packet 3 is Window size = 2 Dropped

Window size = 3 Send 3 Window size = 3 Send 4

© 1999, Cisco Systems, Inc. 

ACK 5 Window size = 2

www.cisco.com

ICND—8­29

UDP Segment Format Bit 0 1

Bit 15 Bit 16

Bit 31 Destination port (16)

Source port (16) Length (16)

Checksum (16)

8 Bytes

Data (if any)

No sequence or acknowledgment fields

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­30

Internet Layer Overview

Internet Protocol (IP) Application Transport Internet Data Link Physical

Internet Control Message Protocol (ICMP) Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP)

OSI network layer corresponds to the  TCP/IP internet layer © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­31

IP Datagram Bit 0 1 Version (4)

Bit 15 Bit 16 Header Length (4)

Priority  & Type  of Service (8)

Identification (16) Time to live (8)

Bit 31 Total Length (16)

Flags (3)

Protocol (8)

Fragment offset (13) Header checksum (16)

20 Bytes

Source IP Address (32) Destination IP Address (32) Options (0 or 32 if any) Data (varies if any) © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­32

Protocol Field Transport Layer

UDP

TCP 6

Internet Layer

17

Protocol Numbers

IP

Determines destination upper­layer protocol  © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­33

Internet Control Message  Protocol Application

Destination  Unreachable

Transport

1

ICMP

Echo (Ping)

Internet

Other

Data Link Physical

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­34

Address Resolution Protocol I need the  Ethernet  address of  176.16.3.2. 172.16.3.1

172.16.3.2

IP: 172.16.3.2 = ???

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­35

Address Resolution Protocol I need the  Ethernet  address of  176.16.3.2.

I heard that broadcast.  The message is for me.  Here is my Ethernet  address. 172.16.3.1

172.16.3.2

IP: 172.16.3.2 = ???

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­36

Address Resolution Protocol I need the  Ethernet  address of  176.16.3.2.

I heard that broadcast.  The message is for me.  Here is my Ethernet  address. 172.16.3.1

172.16.3.2

IP: 172.16.3.2 = ??? IP: 172.16.3.2  Ethernet: 0800.0020.1111 

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­37

Address Resolution Protocol I need the  Ethernet  address of  176.16.3.2.

I heard that broadcast.  The message is for me.  Here is my Ethernet  address. 172.16.3.1

172.16.3.2

IP: 172.16.3.2 = ??? IP: 172.16.3.2  Ethernet: 0800.0020.1111 

Map IP

             Ethernet Local ARP

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­38

Reverse ARP What is  my IP  address?

Ethernet: 0800.0020.1111 IP = ???

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­39

Reverse ARP I heard that  broadcast.  Your IP  address is  172.16.3.25.

What is  my IP  address?

Ethernet: 0800.0020.1111 IP = ???

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­40

Reverse ARP I heard that  broadcast.  Your IP  address is  172.16.3.25.

What is  my IP  address?

Ethernet: 0800.0020.1111 IP = ??? Ethernet: 0800.0020.1111 IP: 172.16.3.25

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­41

Reverse ARP I heard that  broadcast.  Your IP  address is  172.16.3.25.

What is  my IP  address?

Ethernet: 0800.0020.1111 IP = ??? Ethernet: 0800.0020.1111 IP: 172.16.3.25

Map Ethernet         © 1999, Cisco Systems, Inc. 

www.cisco.com

 IP ICND—8­42

Introduction to TCP/IP  Addresses 172.18.0.1 172.18.0.2 10.13.0.0 10.13.0.1

172.16.0.1

HDR SADA DATA

172.17.0.1

172.16.0.2

172.17.0.2

192.168.1.0 192.168.1.1

• Unique addressing allows communication  between end stations • Path choice is based on location Location is represented by an address © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­43

IP Addressing

otted ecimal Maximum

© 1999, Cisco Systems, Inc. 

32 bits Network

 255

255

www.cisco.com

Host

 255

 255

ICND—8­44

IP Addressing 32 bits

otted ecimal

Network

 255

Maximum 1

 255

255 16 17

8 9

 255 24 25

32

 11111111  11111111  11111111  11111111

© 1999, Cisco Systems, Inc. 

www.cisco.com

32 16 8 4 2

128 64 32 16 8 4 2 128 1 64

32 16 8 4 2 128 1 64 32 16 8 4 2 128 1 64

Binary

Host

ICND—8­45

IP Addressing 32 bits

Dotted Decimal

Network

 255

Maximum 1

 255

255 16 17

8 9

 255 24 25

32

128 64 32 16 8 4 2 128 1 64

Example Decimal Example Binary

 172

 16

32 16 8 4 2

 11111111  11111111  11111111  11111111 32 16 8 4 2 128 1 64 32 16 8 4 2 128 1 64

Binary

Host

 122

 204

 10101100  00010000  01111010  11001100

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­46

IP Address Classes 8 bits

8 bits

8 bits

8 bits

Host

Host

Host

Host

Host

Class A:  

Network

Class B:  

Network Network

Class C:   

Network Network Network

Host

Class D:        Multicast     Class E:       Research © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­47

IP Address Classes Bits:

Class A: Bits:

Class B: Bits:

Class C: Bits:

Class D: © 1999, Cisco Systems, Inc. 

1

8 9

0NNNNNNN

16 17

24 25

Host

Host

32 Host

Range (1­126) 1

8 9

10NNNNNN

16 17 Network

Range (128­191) 1 8 9 110NNNNN

Host 16 17

Network

Range (192­223) 1 8 9 1110MMMM

24 25 Host 24 25

Network 16 17

32

32 Host

24 25

32

Multicast Group Multicast Group Multicast Group

Range (224­239) www.cisco.com

ICND—8­48

Host Addresses 172.16.2.1 172.16.3.10

10.1.1.1

10.6.24.2 E1

E0 172.16.2.1

10.250.8.11

172.16.12.12

172.16 Network © 1999, Cisco Systems, Inc. 

.

12 . 12 Host

10.180.30.118

Routing Table Network Interface 172.16.0.0

E0

10.0.0.0

E1

www.cisco.com

ICND—8­49

Determining Available Host  Addresses Network

Host

N

6 5 4 3 2 1

16 15 14 13 12 11 10 8   9 7

 172       16         0           0

2N­2 = 216­2 = 65534 © 1999, Cisco Systems, Inc. 

www.cisco.com

...

...

...

 10101100  00010000  00000000 00000000 1  00000000 00000001 2  00000000 00000011 3  11111111  1111110165534  11111111  1111111065535  11111111  1111111165536

­ 2 65534 ICND—8­50

IP Address Classes Exercise Address

Class

Network

Host

10.2.1.1 128.63.2.100 201.222.5.64 192.6.141.2 130.113.64.16 256.241.201.10

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­51

IP Address Classes Exercise  Answers Address

Class

10.2.1.1

A

10.0.0.0

0.2.1.1

128.63.2.100

B

128.63.0.0

0.0.2.100

201.222.5.64

C

201.222.5.0

0.0.0.64

192.6.141.2

C

192.6.141.0

0.0.0.2

130.113.64.16

B

130.113.0.0

0.0.64.16

256.241.201.10

Nonexistent

© 1999, Cisco Systems, Inc. 

Network

www.cisco.com

Host

ICND—8­52

Addressing without Subnets

172.16.0.1 172.16.0.2 172.16.0.3

172.16.255.253 172.16.255.254 …...

172.16.0.0

Network 172.16.0.0 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­53

Addressing with Subnets

172.16.3.0 172.16.4.0

172.16.1.0

172.16.2.0

Network 172.16.0.0 © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­54

Subnet Addressing 172.16.2.200 172.16.2.2

172.16.3.5

172.16.3.1 E1

E0 172.16.2.1

172.16.3.100

172.16.2.160

172.16 Network © 1999, Cisco Systems, Inc. 

.

  2 . 160 Host

172.16.3.150

New Routing Table Network Interface 172.16.0.0

E0

172.16.0.0

E1

www.cisco.com

ICND—8­55

Subnet Addressing 172.16.2.200

172.16.3.5

172.16.3.1 E1

E0 172.16.2.1

172.16.2.2

172.16.3.100

172.16.2.160

172.16

.

2

Network Subnet © 1999, Cisco Systems, Inc. 

172.16.3.150

.

160 Host

New Routing Table Network Interface 172.16.2.0

E0

172.16.3.0

E1

www.cisco.com

ICND—8­56

Subnet Mask Network IP Address

172

Host

16

0

Network

0 Host

Default Subnet Mask  11111111  11111111 00000000 00000000 Also written as “/16” where 16 represents the number of 1s  in the mask. Network Subnet Host

255

255

0

0

8­bit Subnet Mask Also written as “/24” where 24 represents the number of 1s  in the mask.

255

© 1999, Cisco Systems, Inc. 

255

www.cisco.com

255

0

ICND—8­57

Decimal Equivalents of Bit  Patterns 128   64

32

16

8

4

2

1

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

=

252

1

1

1

1

1

1

1

0

=

254

1

1

1

1

1

1

1

1

=

255

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­58

Subnet Mask without Subnets Network

Host

172.16.2.160

10101100

00010000

00000010

10100000

  255.255.0.0

11111111

11111111

00000000

00000000

10101100

00010000

00000000

00000000

172

16

0

0

Network Number

Subnets not in use—the default © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­59

Subnet Mask with Subnets Network

Subnet

Host

10101100

00010000

00000010

10100000

  255.255.255.0

11111111

11111111

11111111

00000000

10101100

00010000

00000010

00000000

172

16

128 192 224 240 248 252 254 255

172.16.2.160

Network Number

2

0

Network number extended by eight bits © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­60

Subnet Mask with Subnets  (cont.) Network

Subnet

Host

10101100

00010000

00000010

10100000

  255.255.255.192

11111111

11111111

11111111

11000000

10101100

00010000

00000010

10000000

172

16

128 192 224 240 248 252 254 128 255 192 224 240 248 252 254 255

172.16.2.160

Network Number

2

128

Network number extended by ten bits © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­61

Subnet Mask Exercise

Address

Subnet Mask

172.16.2.10

255.255.255.0

10.6.24.20

255.255.240.0

10.30.36.12

255.255.255.0

© 1999, Cisco Systems, Inc. 

www.cisco.com

Class

Subnet

ICND—8­62

Subnet Mask Exercise  Answers

Address

Subnet Mask

Class

Subnet

172.16.2.10

255.255.255.0

B

172.16.2.0

10.6.24.20

255.255.240.0

A

10.6.16.0

10.30.36.12

255.255.255.0

A

10.30.36.0

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­63

Broadcast Addresses

172.16.3.0 172.16.4.0

172.16.1.0 172.16.2.0

172.16.3.255 (Directed broadcast) 255.255.255.255 (Local network broadcast)

X

172.16.255.255 (All subnets broadcast) © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­64

Addressing Summary  Example

172.16.2.160

172

16

10101100

00010000

2

160

00000010 10100000 Host

255.255.255.192

1

Mask Subnet 4 Broadcast First Last

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­65

Addressing Summary  Example 172

16

172.16.2.160

10101100

00010000

00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

2

160

1

Subnet Broadcast First Last © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­66

Addressing Summary  Example 172

16

2

160 3

172.16.2.160

10101100

00010000

00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

1

Subnet Broadcast First Last © 1999, Cisco Systems, Inc. 

www.cisco.com

7 ICND—8­67

Addressing Summary  Example 172

16

2

160 3

172.16.2.160

10101100

00010000

00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

1

10000000 Subnet 4 Broadcast First Last © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­68

Addressing Summary  Example 172

16

2

160 3

172.16.2.160

10101100

00010000

00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

1

10000000 Subnet 4 10111111 Broadcast 5 First

6

Last © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­69

Addressing Summary  Example 172

16

2

160 3

172.16.2.160

10101100

00010000

00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

1

10000000 Subnet 4 10111111 Broadcast 5 10000001 First

6

Last © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­70

Addressing Summary  Example 172

16

2

160 3

172.16.2.160

10101100

00010000

00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

1

10000000 Subnet 4 10111111 Broadcast

© 1999, Cisco Systems, Inc. 

www.cisco.com

5 10000001 First

6

10111110 Last

7 ICND—8­71

Addressing Summary  Example 172

16

2

160 3

172.16.2.160

10101100

00010000

00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

10101100

00010000

00000010 10000000 Subnet 4

10101100

00010000

00000010 10111111 Broadcast

10101100 10101100 © 1999, Cisco Systems, Inc. 

8

1

00010000

5 00000010 10000001 First

6

00010000

00000010 10111110 Last

7

www.cisco.com

ICND—8­72

Addressing Summary  Example 172

16

2

160 3

10101100

00010000

00000010 10100000 Host

255.255.255.192 11111111 8 9 172.16.2.128 10101100

11111111

11111111 11000000 Mask 2

00010000

00000010 10000000 Subnet 4

172.16.2.191

10101100

00010000

00000010 10111111 Broadcast

172.16.2.129

10101100

172.16.2.190

10101100

172.16.2.160

© 1999, Cisco Systems, Inc. 

1

00010000

5 00000010 10000001 First

6

00010000

00000010 10111110 Last

7

www.cisco.com

ICND—8­73

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

Host

172.16.2.121: 10101100

00010000

00000010

01111001 

255.255.255.0: 11111111

11111111

11111111

00000000

Subnet: 10101100

00010000

00000010

00000000

Broadcast: 10101100

00010000

00000010 11111111

Subnet Address = 172.16.2.0 Host Addresses = 172.16.2.1–172.16.2.254 Broadcast Address = 172.16.2.255 Eight bits of subnetting © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­74

Subnet Planning 20 subnets 5 hosts per subnet Class C address:  192.168.5.0 Other  subnets

192.168.5.16

192.168.5.32

© 1999, Cisco Systems, Inc. 

192.168.5.48

www.cisco.com

ICND—8­75

Class C Subnet Planning  Example IP Host Address: 192.168.5.121 Subnet Mask:   255.255.255.248 Network

Network

Network Subnet Host

192.168.5.121: 11000000

10101000

00000101

01111001  

255.255.255.248: 11111111

11111111

11111111

11111000

Subnet: 11000000 Broadcast: 11000000

10101000

00000101

01111000

10101000

00000101

01111111

Subnet Address = 192.168.5.120 Host Addresses = 192.168.5.121–192.168.5.126 Broadcast Address = 192.168.5.127 Five Bits of Subnetting © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­76

Broadcast Addresses Exercise

Address

Subnet Mask

201.222.10.60 

255.255.255.248

15.16.193.6 

255.255.248.0

128.16.32.13 

255.255.255.252

153.50.6.27 

255.255.255.128

© 1999, Cisco Systems, Inc. 

Class

www.cisco.com

Subnet

Broadcast

ICND—8­77

Broadcast Addresses Exercise  Answers Address

Subnet Mask

Class

Subnet

Broadcast

201.222.10.60  255.255.255.248

C

201.222.10.56

201.222.10.63

15.16.193.6 

255.255.248.0

A

15.16.192.0

15.16.199.255

128.16.32.13 

255.255.255.252

B

128.16.32.12

128.16.32.15

153.50.6.27 

255.255.255.128

B

153.50.6.0

153.50.6.127

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­78

Switch IP Address  Configuration Switch(config)#ip address ip­address subnet­mask

• Assigns an address and subnet mask • Starts IP processing on a switch Switch(config)#ip default­gateway ip­address

• Specifies a default gateway

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­79

Router IP Address  Configuration

Router(config­if)#ip address ip­address subnet­mask

• Assigns an address and subnet mask • Starts IP processing on a router interface

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­80

Router IP Address  Configuration Router#term ip netmask­format {bitcount|  decimal | hexadecimal} 

• Sets display format of network mask for current session Router(config­line)#ip netmask­format  {bitcount | decimal | hexadecimal} 

• Sets format of network mask for a  specific line © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­81

Router IP Host Names Router(config)#ip host name [tcp­port­number] address [address]

• Defines static host name to IP address  mapping ip host Norine 172.16.3.1  192.168.3.1 ip host Roger 172.16.4.3

• Hosts/interfaces selectable by name or IP  address © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­82

Router Name Server  Configuration DNS Server

Router(config)#ip name­server server­address1   [[server­address2]...[server­address6]]

• Specifies one or more hosts that supply host name to logical address resolution

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­83

Router Name System

Router(config)#ip domain­lookup Router(config)#end Router#pat Translating ”pat"...domain server (255.255.255.255) % Unknown command or computer name, or unable to find computer address Router#config t Router(config)#no ip domain­lookup Router(config)#end Router#pat Translating ”pat" % Unknown command or computer name, or unable to find computer address Router#

DNS enabled by default © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­84

Router Display Host Names Router#show hosts Default domain is not set Name/address lookup uses domain service Name servers are 255.255.255.255 Host                     Flags      Age Type   Address(es) Norine                   (perm, OK)  0   IP    172.16.100.100 Roger                    (perm, OK)  0   IP    172.16.100.101 Frank                    (perm, OK)  0   IP    172.16.200.200 Bob                      (perm, OK)  0   IP    172.16.200.201

Shows the host table © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­85

VLAN to VLAN Overview Fast E0/0 ISL VLAN 1

Router on  a stick

VLAN 2 Application

10.1.1.2

10.2.2.2

TCP IP ISL Ethernet

Network layer devices combine multiple broadcast domains

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­86

Dividing a Physical Interface  into Subinterfaces FastEthernet 0/0.1 FastEthernet 0/0.2 FastEthernet 0/0.3

FastEthernet 0/0

Physical interfaces can be divided into multiple  subinterfaces

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­87

ISL Encapsulation

Router(config­subif)#encapsulation isl domain

Enables ISL on a subinterface

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­88

Routing Between VLANs Fast E0/0 ISL VLAN 1

10.1.1.2

© 1999, Cisco Systems, Inc. 

VLAN 2

10.2.2.2

interface fastethernet 0/0  no ip address ! interface fastethernet 0/0.1  ip address 10.1.1.1 255.255.255.0  encapsulation isl 1 interface fastethernet 0/0.2  ip address 10.2.2.1 255.255.255.0  encapsulation isl 2

www.cisco.com

ICND—8­89

Routing Between WANS ISL VLAN 1

10.1.1.2

VLAN 2

S0 172.16.1.1

Application

10.2.2.2

interface Serial0  ip address 172.16.1.1 255.255.255.0

© 1999, Cisco Systems, Inc. 

172.16.1.2

www.cisco.com

TCP IP HDLC Serial

ICND—8­90

Visual Objective SUBNET 10.1.1.0 10.2.2.0 10.3.3.0 10.4.4.0 10.5.5.0 10.6.6.0 10.7.7.0 10.8.8.0  10.9.9.0 10.10.10.0 10.11.11.0 10.12.12.0 10.13.13.0

VLAN 1 2 3 4 5 6 7 8  9 10 11 12 13

POD wg_ro_x, wg_sw_x, core_sw_a, core_sw_b wg_pc_a, core_server, core_ro wg_pc_b, core_server, core_ro wg_pc_c, core_server, core_ro wg_pc_d, core_server, core_ro wg_pc_e, core_server, core_ro wg_pc_f, core_server, core_ro wg_pc_g, core_server, core_ro wg_pc_h, core_server, core_ro wg_pc_i, core_server, core_ro wg_pc_j, core_server, core_ro wg_pc_k, core_server, core_ro wg_pc_l, core_server, core_ro

VLAN2 fa0/26 e0/1 (port A)

fa0/0 fa0/23 fa0/24

core_ server

VLAN13

© 1999, Cisco Systems, Inc. 

... fa0/1

  

wg_pc_l 10.13.13.12 fa0/27 (port B)

wg_sw_l 10.1.1.120

fa0/12 fa0/13

core_sw_a fa0/14 10.1.1.2

www.cisco.com

fa0/27 (port B)

wg_sw_a 10.1.1.10

fa0/26 e0/1 (port A) Core_ro

wg_pc_a 10.2.2.12

fa0/12 fa0/13

fa0/1

fa0/14 core_sw_b 10.1.1.4 ICND—8­91

Summary After completing this chapter, you should be  able to perform the following tasks: • Identify the TCP/IP protocol stack and the  functions of each layer • Separate an IP address into its subcomponents:  the network, subnet, and host portions • Configure IP addresses on Cisco router and  switch interfaces • Interconnect VLANs using a layer three device  such as a “router on a stick” © 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­92

Review Questions 1. What is the difference between the TCP and  UDP transport layer protocols?  2. Given a host with IP address, 192.168.20.1  255.255.255.240, how many other hosts can  you have in that network?  3. What is required to interconnect separate  VLANs?

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­93

Do not delete

© 1999, Cisco Systems, Inc. 

www.cisco.com

ICND—8­94

Related Documents

Tcpip
October 2019 44
Tcpip
April 2020 27
Tcpip
November 2019 40
Tcpip Vista
May 2020 25
Internetworking Tcpip
April 2020 29
Taller Tcpip
October 2019 28

More Documents from "Fulvio"

Access Ays Issa
May 2020 12
Gimble
May 2020 11
Sample Booklet
April 2020 15
Yogesh1
May 2020 14