You are on page 1of 56

Internetworking with

TCP/IP.

INTERNET/INTRANET/EXTRANET.

1
„ Introduction to TCP/IP
„ Architectural Overview of the TCP/IP Protocol Suite
„ IP Addressing
„ Subnetting
„ Implementing IP Routing
„ Dynamic Host Configuration Protocol

2
„ Implementing Windows Internet Name Service (WINS)
„ Administering a WINS Environment
„ Domain Name System (DNS)
„ Implementing Microsoft DNS Servers
„ Connectivity in Heterogeneous Environments
„ Implementing Microsoft SNMP Service

3
Introduction to TCP/IP

4
What Is TCP/IP?

ARPANET
commissioned TCP/IP
by DOD FTP Protocol Suite
1969 1973 1982

Telnet TCP IP DNS


1972 1974 1981 1984

1965 1970 1975 1980 1985

5
TCP/IP

„ Industry-Standard Suite of Protocols


„ Routable Enterprise Networking Protocol
„ Technology for Connecting Dissimilar Systems
„ Robust, Scalable, Cross-Platform Client/Server
Framework
„ Method for Gaining Access to the Internet

6
The Internet Standards Process

„ The Responsibility of the Internet Society (ISOC)


„ Governed by the Internet Architecture Board (IAB)
„ TCP/IP Standards are Published in Request for
Comments
„ Five Classifications of RFCs
z Required, recommended, elective, limited, use, not
recommended

7
TCP/IP Utilities

FTP
FTP TFTP
TFTP RCP
RCP Telnet
Telnet

RSH
RSH REXEC
REXEC LPR
LPR LPQ
LPQ LPD
LPD

PING
PING IPCONFIG
IPCONFIG NSLOOKUP
NSLOOKUP HOSTNAME
HOSTNAME NETSTAT
NETSTAT

NBTSTAT
NBTSTAT ROUTE
ROUTE TRACERT
TRACERT ARP
ARP Finger
Finger

8
Installing and Configuring Microsoft TCP/IP

9
Configuring TCP/IP Manually

10
Testing Microsoft TCP/IP with IPCONFIG and PING
1
Start IPCONFIG

2 Ping 127.0.0.1
(Loopback Address)

3 Ping IP Address of
the Local Host

4 Ping IP Address of
Default Gateway

5 Ping IP Address of
Remote Host End

11
Microsoft Network Monitor

12
Analyzing Network Traffic

13
Architectural Overview
of the TCP/IP Protocol
Suite
2
1
‹ Overview

„ The Microsoft® TCP/IP Protocol Suite


„ Network Interface Technologies
„ Address Resolution Protocol (ARP)
„ Internet Control Message Protocol (ICMP)
„ Internet Group Management Protocol (IGMP)
„ Internet Protocol (IP)
„ Ports and Sockets
„ Transmission Control Protocol (TCP)
„ User Datagram Protocol (UDP)

2
2
The Microsoft TCP/IP Protocol Suite
Windows
Windows®®Sockets
Sockets NetBIOS
NetBIOS Application
Applications
Applications Applications
Applications

NetBIOS
Sockets TDI
NetBIOS over TCP/IP

Transport
TCP
TCP UDP
UDP

ICMP IGMP Internet


IP
IP
ARP

LAN
LANTechnologies:
Technologies: WAN
WANTechnologies:
Technologies: Network
Ethernet,
Ethernet,Token
TokenRing,
Ring, Serial
SerialLines,
Lines,Frame
FrameRelay,
Relay,
FDDI ATM
FDDI ATM
2
3
Network Interface Technologies

„ IP Over LAN Technologies


z Ethernet
z Token ring
z ARCnet
z FDDI
„ IP Over WAN Technologies
z Serial lines
z Packet switched networks

2
4
Address Resolution Protocol (ARP)

„ Successful Mapping of an IP Address to a Hardware


Address
„ Address Resolution Is the Function of ARP
„ ARP Uses a Local Broadcast to Obtain a Hardware
Address
„ Address Mappings Are Stored in a Cache for Future
Reference

2
5
Resolving a Local IP Address
ping
ping 131.107.7.29
131.107.7.29

11 ARP
ARPCache
Cache
33 ARP
ARPCache
Cache
131.107.7.7
131.107.7.7 08004.
08004.. .. .
131.107.7.7
131.107.7.708004.
08004.. .. . 131.107.7.28
131.107.7.2808004.
08004.. .. .

22
ARP
ARP
Broadcast
Broadcast

Hardware Address = 08007. . .

44
IP Address = 131.107.7.28 IP Address = 131.107.7.29
Hardware Address = 08004. . .
2
Hardware Address = 08007. . .

6
Resolving a Remote IP Address
ping
ping 131.107.7.29
131.107.7.29
44
ARP
ARPCache
Cache
11 131.107.7.7
131.107.7.7 08009.
08009.....
ARP
ARPCache
Cache
131.107.7.1
131.107.7.1 08006.
08006.....
131.107.3.7
131.107.3.708004.
08004.....
ARP
ARPCache
Cache
131.107.3.1 131.107.7.1
08005... 33 08006...
ARP
ARP
Broadcast
Broadcastforfor A Router B
Router
Router AA

22 55
ARP
ARP
for
for Router
Router BB

IP Address = 131.107.3.24 IP Address = 131.107.7.29


Hardware Address = 08004. . . Hardware Address = 08009. . . 2
7
The ARP Cache

IP
IPAddress
Address Hardware
HardwareAddress
Address

131.107.255.255 = FFFFFFFFFFFF
131.107.3.5 = 080009654321

131.107.3.24
131.107.3.24 == 080004321371
080004321371
131.107.78.3 = 080006723111 22
131.107.9.4 = 080002345621

131.107.7.29
131.107.7.29 == 080009654441
080009654441 11

2
8
ARP Packet Structure

Hardware Type
Protocol Type 08 00
Hardware Address Length 06
Protocol Address Length 04
Operation (Opcode)
Sender's Hardware Address
Sender's IP Address
Target's Hardware Address
Target's IP Address
2
9
Internet Control Message Protocol (ICMP)

8 bits 16 bits

Type
Code
Checksum
Type Specific Data . . .

= 1 bit
2
10
Internet Group Management Protocol (IGMP)
4 bits 8 bits 16 bits

Version
Type
Unused
Checksum

Group Address

2
11
Internet Protocol (IP)

„ Addresses and Routes Packets


„ Connectionless
z No session is established
„ Nonguaranteed “Best Effort” Delivery
„ Reliability Is the Responsibility of Higher-Layer
Protocols and Applications
„ Fragments and Reassembles Packets

2
12
IP on the Router
„ Decrements the TTL
„ Fragments Large Packets Into Smaller Packets
„ Creates a New Header for Each New Packet
z Flag
z Fragment ID
z Fragment offset
„ Calculates a New Checksum
„ Obtains the Hardware Address of the Next Router
„ Forwards the Packet

2
13
IP Packet Structure
8 bits 16 bits 24 bits 32 bits

Version 0 10 0
Header Length
Type of Service 00
Total Length
Identifier
0
Flags
Fragment Offset
Time to Live
Protocol
Header Checksum
Source Address
Destination Address
Options + Padding
= 1 bit 2
14
Ports and Sockets
Windows Sockets
Applications Application
FTP TFTP Web Web
Server Server Server Browser

TCP Ports UDP Port TCP Port TCP Port


20,21 69 80 1210

Windows Sockets Interface

0 . . . 65536 0 . . . 65536 Transport


TCP UDP

Internet
IP

Network

2
15
Transmission Control Protocol (TCP)

„ Connection-oriented
z Session is established before exchanging data
„ Reliable Delivery
z Sequence numbers
z Acknowledgments (ACKs)
„ Byte-Stream Communications
„ Uses Port Numbers as Endpoints to Communicate

2
16
TCP Three-Way Handshake

Application
Application Application
Application

Data
Transport
Transport Data, ACK Transport
Transport

ACK

Internet
Internet Internet
Internet

Network
Network Network
Network 2
17
TCP Packet Structure

TCP Source Port


TCP Destination Port
Sequence Number
Acknowledgment Number
Data Length
Reserved
Flags
Window
Checksum
Urgent Pointer 2
18
User Datagram Protocol (UDP)

„ Connectionless
z No session is established
„ Does Not Guarantee Delivery
z No sequence numbers
z No acknowledgments
„ Reliability Is the Responsibility of the Application
„ Uses Port Numbers as Endpoints to Communicate

2
19
UDP Packet Structure

UDP Source Port


UDP Destination Port
Message Length
Checksum

2
20
IP Addressing

3
1
What Is an IP Address?

86

90 133.120.75.8
94
129.102.12.7

MARIA
MARIA AVE
AVE

133.120.0.0
133.120.0.0
129.102.0.0
131.107.0.0
131.107.0.0

131.107.3.27
129.102.16.2
3
2
Network ID and Host ID

32 Bits

Network ID Host ID
Class B

w. x. y. z.
Example: 131.107.3.24
Notación Decimal de Puntos

3
3
Converting IP Addresses from Binary to Decimal

8 Bits

11 11 11 11 11 11 11 11

128
128 64
64 32
32 16
16 88 44 22 11
255 Decimal Value

3
4
Address Classes
Class A 77bits
bits
Network Host ID
ID
0

Class B 14
14bits
bits
Network ID Host ID
10

Class C 21
21bits
bits
Network ID Host ID
110

w x y z 3
5
Address Class Summary

Range
Rangeofof
Number
Number Number
NumberofofHosts
Hosts Network
Network IDs
IDs
of
ofNetworks
Networks per
perNetwork
Network (First Octet )
(First Octet)

Class
Class AA 126
126 16,777,214
16,777,214 11 –– 126
126

Class
Class BB 16,384
16,384 65,534
65,534 128
128 –– 191
191

Class
Class CC 2,097,152
2,097,152 254
254 192
192 –– 223
223

Class
ClassDD 224.0.0.0
224.0.0.0--239.255.255.255
239.255.255.255 No
Nouso
usoComercial
Comercial 224
224--239
239

240.0.0.0 240
240--254
Class
ClassEE 240.0.0.0--254.255.255.255
254.255.255.255 Experimentales
Experimentales 254

3
6
Addressing Guidelines

„ Network ID Cannot Be 127


z 127 is reserved for lookback functions
„ Network ID and Host ID Cannot Be 255 (All Bits Set to 1)
z 255 is a broadcast address
„ Network ID and Host ID Cannot Be 0 (All Bits Set to 0)
z 0 means “this network only”
„ Host ID Must Be Unique to the Network

3
7
Assigning Network IDs – http: internic.net RFC 1918

11 22 33

Router Router

124.x.y.z
124.x.y.z 192.121.73.z
192.121.73.z 131.107.y.z
131.107.y.z

3
8
Assigning Host IDs
11 22 33

124.0.0.27
124.0.0. 27 124.0.0.1
124.0.0. 1 192.121.73.2
192.121.73. 2 131.107.0.27
131.107.0. 27

Router Router

124.0.0.28
124.0.0. 28 192.121.73.1
192.121.73. 1 131.107.0.1
131.107.0. 1 131.107.0.28
131.107.0. 28

124.x.y.z
124.x.y.z 192.121.73.z
192.121.73.z 131.107.0.z
131.107.0.z
124.0.0.29
124.0.0. 29 131.107.0.29
131.107.0. 29
3
9
What Is a Subnet Mask?

„ Distinguishes the Network ID from the Host ID


„ Used to Specify Whether the Destination Host is Local or
Remote
3
10
Default Subnet Masks (No Subnetting)
Address Dotted
Dotted Decimal
Decimal
Bits Used for Subnet Mask
Class Notation
Notation

Class
Class AA 11111111
11111111 00000000
00000000 00000000
00000000 00000000
00000000 255.0.0.0
255.0.0.0
Class
Class BB 11111111
11111111 11111111
11111111 00000000
00000000 00000000
00000000 255.255.0.0
255.255.0.0
Class
Class CC 11111111
11111111 11111111
11111111 11111111
11111111 00000000
00000000 255.255.255.0
255.255.255.0

Class
Class BB Example
Example

IP Address 131.107. 16.200


Subnet Mask 255.255. 0.0

Network ID 131.107. y.z


Host ID w.x. 16.200
3
11
Determining the Destination of a Packet

„ Local and Destination Host’s Subnet Masks Are ANDed


z 1 AND 1 = 1
z Other combinations = 0
z If ANDed results of source and destination hosts match,
the destination is local.
159.
159. 224.
224. 7.7. 129.
129.

IP
IPAddress
Address 10011111
10011111 11100000
11100000 00000111
00000111 10000001
10000001
Subnet
SubnetMask
Mask 11111111
11111111 11111111
11111111 00000000
00000000 00000000
00000000

Result
Result 10011111
10011111 11100000
11100000 00000000
00000000 00000000
00000000
3
12
IP Addressing with IP Version 6

„ Expanded Addressing Capabilities


„ Simplified Header Format
„ Support for Time-Dependent Options
„ Support of IP Header Extensions for Future
Technologies
„ IPng 128 bits (4 IPv4).
„ RFC 1883.

3
13
Subnetting

4
1
What Is a Subnet?
131.107.3.27
131.107.3.27

131.107.12.7
131.107.12.7

131.107.12.0 Subnet
Subnet22
Subnet
Subnet11 131.107.3.0
131.107.3.0
131.107.10.0
131.107.10.0 Main Network

131.107.12.31
131.107.12.31
131.107.10.12
131.107.10.12
4
2
Implementing Subnetting

„ Determine the Number of Required Network IDs


z One for each subnet
z One for each wide-area network connection

„ Determine the Number of Required Host IDs per Subnet


z One for each TCP/IP host
z One for each router interface
„ Define One Subnet Mask Based on Requirements
„ Define a Unique Subnet ID for Each Physical Segment Based on the
Subnet Mask
„ Define Valid Host IDs for Each Subnet Based on the Subnet ID

4
3
What Are Subnet Mask Bits?

Example of Class B Address

Number of Subnets 0 . . . 254

Network ID Subnet Host ID


ID
1 0

Number of Hosts 65,534 . . . 254

4
4
Defining a Subnet Mask

11 Convert the Number of Segments to Binary


22 Count the Number of Required Bits
33 Convert the Required Number of Bits to Decimal
(High Order)
Example of Class B Address
Number
Number of
of Subnets
Subnets 6
Binary
Binary Value
Value 0 0 0 0 0 1 1 0 (3 Bits)

4+2 = 6
Convert
Convert to
to Decimal
Decimal 11111111 11111111 11100000 00000000

Subnet
Subnet Mask
Mask 255 . 255 . 224 . 0
4
5
Subnetting More than One Octet

Example of Class A Address

Number of Subnets 0 . . . 65,534

Network ID Subnet ID Host ID

Number of Hosts 16,777,214 . . . 254

4
6
Defining Subnet IDs

255 255 224 0


11
11111111 11111111 11100000 00000000

00000000 = 0
00100000 = 32
01000000 = 64
01100000 = 96
10000000 = 128
10100000 = 160
11000000 = 192
11100000 = 224
22 33
4
7
Defining Host IDs for a Subnet
Subnet
SubnetIDs
IDs Host
HostID
IDRange
Range

00000000==00
00000000 Invalid
Invalid
00100000==32
00100000 32 x.y.32.1
x.y.32.1 –– x.y.63.254
x.y.63.254
01000000==64
01000000 64 x.y.64.1
x.y.64.1 –– x.y.95.254
x.y.95.254
01100000==96
01100000 96 x.y.96.1
x.y.96.1 –– x.y.127.254
x.y.127.254
10000000==128
10000000 128 x.y.128.1
x.y.128.1–– x.y.159.254
x.y.159.254
10100000==160
10100000 160 x.y.160.1
x.y.160.1–– x.y.191.254
x.y.191.254
11000000==192
11000000 192 x.y.192.1
x.y.192.1–– x.y.223.254
x.y.223.254
11100000==224
11100000 224 Invalid
Invalid

„ Each Subnet ID Indicates the Beginning Value in a Range


„ The Ending Value Is One Less Than the Beginning Value of the
Next Subnet ID
4
8
La Figura 5 ilustra cómo la utilización de VLSM ayudó a ahorrar más de la mitad del espacio de direcciones.

CIDR
Classless Interdomain Routing (CIDR) se presentó para mejorar tanto la utilización del espacio de direcciones como la escalabilidad de ruteo en
Internet. Era necesario debido al rápido crecimiento de Internet y al crecimiento de las tablas de ruteo IP contenidas en los routers de Internet.

CIDR se aparta de las clases IP tradicionales (Clase A, Clase B, Clase C y así sucesivamente). En CIDR, una red IP se representa mediante un
prefijo, que es una dirección IP y alguna indicación de la longitud de la máscara. Por longitud se entiende el número de bits de máscara contiguos
del extremo izquierdo que están establecidos en uno. Por lo tanto, la red 172.16.0.0 255.255.0.0 se puede representar como 172.16.0.0/16. CIDR
también representa una arquitectura de Internet más jerárquica, donde cada dominio toma sus direcciones IP de un nivel superior. Permite que se
realice el resumen de los dominios al nivel más alto. Por ejemplo, si un ISP posee la red 172.16.0.0/16, el ISP puede ofrecer 172.16.1.0/24,
172.16.2.0/24, y así sucesivamente a los clientes. No obstante, cuando anuncia a otros proveedores, el ISP sólo necesita anunciar 172.16.0.0/16.

Para más información sobre CIDR, vea RFC 1518 y RFC 1519.

Apéndice
Configuración de ejemplo
Los routers A y B se conectan a través de la interfaz serial.

router A

hostname routera
!
ip routing
!
int e 0
ip address 172.16.50.1 255.255.255.0
!(subnet 50)
int e 1 ip address 172.16.55.1 255.255.255.0
!(subnet 55)
int t 0 ip address 172.16.60.1 255.255.255.0
!(subnet 60) int s 0
ip address 172.16.65.1 255.255.255.0 (subnet 65)
!S 0 connects to router B
router rip
network 172.16.0.0

router B

hostname routerb
!
ip routing
!
int e 0

You might also like