Professional Documents
Culture Documents
Full TCP Ip PDF
Full TCP Ip PDF
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
5
TCP/IP
6
The Internet Standards Process
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
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
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
2
4
Address Resolution Protocol (ARP)
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
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
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)
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
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
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
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
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?
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
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
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
4
3
What Are Subnet Mask Bits?
4
4
Defining a Subnet Mask
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
4
6
Defining Subnet IDs
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
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