70
Transmission Control Protocol (TCP)

Transmission Control Protocol (TCP)

Embed Size (px)

DESCRIPTION

Transmission Control Protocol (TCP). Telnet. FTP. DNS. Uygulama. Uygulama. Sunum. Oturum. TCP. UDP. Taşıma. Taşıma. IP. ICMP. ARP. Ağ. Ağ. Veri İletim. SLIP ve PPP. L AN. W AN. Fiziksel. Fiziksel. OSI. TCP /IP. OSI vs. TCP/IP. Uygulama Katmanı (Application Layer) - PowerPoint PPT Presentation

Citation preview

Page 1: Transmission Control Protocol (TCP)

Transmission Control Protocol (TCP)

Page 2: Transmission Control Protocol (TCP)

OSI vs. TCP/IP1. Uygulama Katmanı (Application Layer)

2. Taşıma Katmanı (Transport Layer)

3. Ağ Katmanı (Network Layer/Internet Layer/Internetwork Layer)

4. Fiziksel Katman (Network Access Layer/Link and Physical Layer)

Page 3: Transmission Control Protocol (TCP)
Page 4: Transmission Control Protocol (TCP)
Page 5: Transmission Control Protocol (TCP)

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

reliable, in-order byte steam: no “message boundaries

” send & receive buffers

buffer incoming & outgoing data

flow controlled: sender will not

overwhelm receiver congestion controlled:

sender will not overwhelm network

point-to-point (unicast): one sender, one receiver

connection-oriented: handshaking (exchange of

control msgs) init’s sender, receiver state before data exchange

State resides only at the END systems – Not a virtual circuit!

full duplex data: bi-directional data flow in

same connection (A->B & B->A in the same connection)

MSS: maximum segment size

socketdoor

T C Psend buffer

T C Preceive buffer

socketdoor

segm ent

applica tionwrites data

applica tionreads data

Page 6: Transmission Control Protocol (TCP)

TCP segment structure

source port # dest port #

32 bits

applicationdata

(variable length)

sequence number

acknowledgement numberReceive window

Urg data pnterchecksum

FSRPAUheadlen

notused

Options (variable length)

URG: urgent data (generally not used)

ACK: ACK #valid

PSH: push data now(generally not used)

RST, SYN, FIN:connection estab(setup, teardown

commands)

# bytes rcvr willingto accept

countingby bytes of data(not segments!)

Internetchecksum

(as in UDP)

Page 7: Transmission Control Protocol (TCP)

TCP Connection-oriented demux TCP socket identified by 4-tuple:

source IP address source port number dest IP address dest port number

receiving host uses all four values to direct segment to appropriate socket

Page 8: Transmission Control Protocol (TCP)

TCP Demultiplexing Example

ClientIP:B

P

client IP: A

P1P

serverIP: C

SP: 80

DP: 9157

SP: 9157

DP: 80

SP: 80

DP: 5775

SP: 5775

DP: 80

P P

Page 9: Transmission Control Protocol (TCP)

Connection Termination

Reliable, In-OrderData Exchange

Connection Establishment

Typical TCP TransactionClient Server

timetime

A TCP Transaction consists of 3 Phases1. Connection

Establishment Handshaking between

client and server

2. Reliable, In-Order Data Exchange Recover any lost data

through retransmissions and ACKs

3. Connection Termination Closing the connection

Page 10: Transmission Control Protocol (TCP)

TCP Connection Establishment

TCP sender, receiver establish “connection” before exchanging data segments

initialize TCP variables: seq. #s buffers, flow control info (e.g. RcvWindow)

client: connection initiator Socket clientSocket = new Socket("hostname", port#);

server: contacted by client Socket connectionSocket = welcomeSocket.accept();

Page 11: Transmission Control Protocol (TCP)

Connection Establishment (cont)

Host A Host B

SYN, Seq=42

SYN+ACK, Seq=79, ACK=43

ACK, Seq=43, ACK=80

time

Three-way handshake

Three way handshake:

Step 1: client host sends TCP SYN segment to server specifies a random

initial seq # no data

Step 2: server host receives SYN, replies with SYNACK segment server allocates buffers specifies server initial

seq. #Step 3: client receives

SYNACK, replies with ACK segment, which may contain data

time

Connection

requesthost ACKs and selects its own initial seq #

host ACKs

Page 12: Transmission Control Protocol (TCP)

Connection Establishment (cont)

Host A Host B

SYN, Seq=42

SYN+ACK, Seq=79, ACK=43

ACK, Seq=43, ACK=80

time

Three-way handshake

time

Connection

requesthost ACKs and selects its own initial seq #

host ACKs

Seq. #’s: byte stream “number” of

first byte in segment’s data

ACKs: seq # of next byte

expected from other side cumulative ACK

Page 13: Transmission Control Protocol (TCP)

TCP Starting Sequence Number Selection

Why a random starting sequence #? Why not simply choose 0? To protect against two incarnations of the same connection

reusing the same sequence numbers too soon

That is, while there is still a chance that a segment from an earlier incarnation of a connection will interfere with a later incarnation of the connection

How? Client machine seq #0, initiates connection to server with seq

#0. Client sends one byte and client machine crashes Client reboots and initiates connection again Server thinks new incarnation is the same as old connection

Page 14: Transmission Control Protocol (TCP)

TCP Connection Termination

Closing a connection:

client closes socket: clientSocket.close();

Step 1: client end system sends TCP FIN control segment to server

Step 2: server receives FIN, replies with ACK. Server might send some buffered but not sent data before closing the connection. Server then sends FIN and moves to Closing state.

client

FIN

server

ACK

ACK

FIN

close

Datawrite

closed

tim

ed w

ait

close

ACK

DATA

Page 15: Transmission Control Protocol (TCP)

TCP Connection TerminationStep 3: client receives FIN, replies

with ACK.

Enters “timed wait” - will respond with ACK to received FINs

Step 4: server, receives ACK. Connection closed.

Why wait before closing the connection?

If the connection were allowed to move to CLOSED state, then another pair of application processes might come along and open the same connection (use the same port #s) and a delayed FIN from an earlier incarnation would terminate the connection.

client

FIN

server

ACK

ACK

FIN

closing

closing

closedti

med w

ait

closed

Page 16: Transmission Control Protocol (TCP)

CLOSED

LISTEN

SYN_RCVD SYN_SENT

ESTABLISHED

CLOSE_WAIT

LAST_ACKCLOSING

TIME_WAIT

FIN_WAIT_2

FIN_WAIT_1

Passive open Close

Send/ SYNSYN/SYN + ACK

SYN + ACK/ACK

SYN/SYN + ACK

ACK

Close /FIN

FIN/ACKClose /FIN

FIN/ACKACK + FIN/ACK

Timeout after two segment lifetimes

FIN/ACK

ACK

ACK

ACK

Close /FIN

Close

CLOSED

Active open /SYN

TCP State-Transition Diagram

Page 17: Transmission Control Protocol (TCP)

Typical TCP Client/Server Transitions

TCP clientlifecycle

TCP serverlifecycle

Page 18: Transmission Control Protocol (TCP)

How to program using the TCP?

TCP UDPIPLLPL

Socket Layer

TCP UDPIPLLPL

Socket LayerTCP UDP

IPLLPL

Socket Layer

Socket Layer: Programmer’s API to

the protocol stack

Typical network app has two pieces: client and server

Server: Passive entity. Provides service to clients e.g., Web server responds with the requested Web page

Client: initiates contact with server (“speaks first”) typically requests service from server, e.g., Web Browser

Page 19: Transmission Control Protocol (TCP)

Socket Creation

Family Type Protocol

TCPPF_INET

SOCK_STREAM IPPROTO_TCP

UDP SOCK_DGRAM IPPROTO_UDP

mySock = socket(family, type, protocol); UDP/TCP/IP-specific sockets

Socket reference File (socket) descriptor in UNIX Socket handle in WinSock

Page 20: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Assign a port to socket3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

Server starts by getting ready to receive client connections…

Page 21: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

/* Create socket for incoming connections */ if ((servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) DieWithError("socket() failed");

Page 22: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

echoServAddr.sin_family = AF_INET; /* Internet address family */ echoServAddr.sin_addr.s_addr = htonl(INADDR_ANY);/* Any incoming interface */ echoServAddr.sin_port = htons(echoServPort); /* Local port */

if (bind(servSock, (struct sockaddr *) &echoServAddr, sizeof(echoServAddr)) < 0) DieWithError("bind() failed");

Page 23: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

/* Mark the socket so it will listen for incoming connections */ if (listen(servSock, MAXPENDING) < 0) DieWithError("listen() failed");

Page 24: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

for (;;) /* Run forever */{ clntLen = sizeof(echoClntAddr);

if ((clntSock=accept(servSock,(struct sockaddr *)&echoClntAddr,&clntLen)) < 0) DieWithError("accept() failed");

Page 25: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

Server is now blocked waiting for connection from a client

Page 26: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

Later, a client decides to talk to the server…

Page 27: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

/* Create a reliable, stream socket using TCP */ if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) DieWithError("socket() failed");

Page 28: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

echoServAddr.sin_family = AF_INET; /* Internet address family */ echoServAddr.sin_addr.s_addr = inet_addr(servIP); /* Server IP address */ echoServAddr.sin_port = htons(echoServPort); /* Server port */

if (connect(sock, (struct sockaddr *) &echoServAddr, sizeof(echoServAddr)) < 0) DieWithError("connect() failed");

Page 29: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

echoStringLen = strlen(echoString); /* Determine input length */

/* Send the string to the server */ if (send(sock, echoString, echoStringLen, 0) != echoStringLen) DieWithError("send() sent a different number of bytes than expected");

Page 30: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

/* Receive message from client */ if ((recvMsgSize = recv(clntSocket, echoBuffer, RCVBUFSIZE, 0)) < 0) DieWithError("recv() failed");

Page 31: Transmission Control Protocol (TCP)

TCP Client/Server Interaction

Client1. Create a TCP socket2. Establish connection3. Communicate4. Close the connection

Server1. Create a TCP socket2. Bind socket to a port3. Set socket to listen4. Repeatedly:

a. Accept new connectionb. Communicatec. Close the connection

close(sock); close(clntSocket)

Page 32: Transmission Control Protocol (TCP)

TCP Tidbits

Clientsend(“Hello Bob”)

recv() -> “Hi Jane”

Server

recv() -> “Hello ”recv() -> “Bob”

send(“Hi ”)send(“Jane”)

Client knows server address and port No correlation between send() and recv()

Page 33: Transmission Control Protocol (TCP)

Uygulama Katmanı Protokolleri

DNS (Domain Name System-Alan Adı Sistemi) Alan adı verilen isimler (www.gazi.edu.tr) ile IP

adreslerini (194.27.16.10) birbirine bağlayan sistemdir.

Paylaştırılmış bir veritabanı olarak çalışır. HTTP (HyperText Transfer Protocol-Hiper

Metin Gönderme Protokolü) HTML sayfaları göndermek vb…

HTTPS (Secure HTTP-Güvenli HTTP) HTTP'nin RSA (İki anahtarlı şifreleme veya

asimetrik anahtarlı şifreleme) şifrelemesi ile güçlendirilmiş halidir. Örneğin bankaların internet siteleri.

FTP (File Transfer Protocol) SFTP veya FTPS (Secure FTP),

FTP'nin RSA ile güçlendirilmiş halidir.

Page 34: Transmission Control Protocol (TCP)

Uygulama Katmanı Protokolleri

DHCP (Dynamic Host Configuration Protocol) Terminallere otomatik ip adresi dağıtır.

SNMP (Simple Network Managment Protocol- Basit Ağ Yönetimi Protokolü) Ağlar büyüdükçe bu ağlar üzerindeki birimleri

denetlemek amacıyla tasarlanmıştır. PC’ye bağlı kullanıcılar, internet bağlantı hızı,

sistem çalışma süresi vb. bilgiler tutulur.

NFS (Network File System-Ağ Dosya Sistemi) Ağdaki paylaştırılmış dosyalara ulaşmayı sağlar

LPD (Line Printer Daemon) Ağdaki yazıcının kullanılmasını sağlar.

Page 35: Transmission Control Protocol (TCP)

Uygulama Katmanı Protokolleri

SMTP (Simple Mail Transfer Protocol, - Basit Posta Gönderme Protokolü) E-posta göndermek için kullanılır.

POP3 (Post Office Protocol 3) E-posta almak için kullanılır.

Telnet (Telecommunication Network) Çok kullanıcılı bir makineye uzaktaki başka

bir makineden bağlanmak için kullanılır.

Page 36: Transmission Control Protocol (TCP)

Fiziksel Katman Protokolleri SLIP (Serial Line Internet Protocol)

IP verilerinin, seri iletişim teknikleri ile iletimini sağlayan protokoldür. Dial-up veya kiralık hat bağlantılarında kullanılır. Veriler seri iletişim teknikleri kullanılarak iletilir.

PPP (Point-to-Point Protocol) SLIP’e benzer, yine dial-up bağlantıda

kullanılır. Ancak PPP;• Verileri sıkıştırır• Bir çok donanım çoğunlukla destekler• Hata düzeltme ve belirleme algoritmaları

kullanır.

Page 37: Transmission Control Protocol (TCP)

Taşıma Katmanı Protokolleri

TCP (Transmission Control Protocol-Transfer Kontrol Protokolü) Veri aktarımı yapılacak iki bilgisayar arasındaki

bağlantıyı kurar Hata denetimi yapar. Paketler gitmediyse bir daha

gönderir. UDP (User Datagram Protocol)

TCP gibi ağ üzerinden paketi gönderir ama bu protokol paketin gidip gitmediğini takip etmez ve paketin yerine ulaşıp ulaşmayacağını garantilemez. Daha çok küçük paketlerin tüm PC’lere gönderilmesinde kullanılır.

Page 38: Transmission Control Protocol (TCP)

TCP Başlığı (TCP Header)

Kaynak portu (16 bit) Hedef portu (16 bit)

Sıra numarası (32 bit)

Alındı bilgisi numarası (32 bit)

Veri ofseti (4 bit)

Ayrılmış (6 bit)

Bayraklar (6 bit)

Pencere (16 bit)

Checksum (Kontrol Toplamı – 16 bit)

Acil İşaretçiler (16 bit)

Opsiyonlar – Değişkenler

Veri

Page 39: Transmission Control Protocol (TCP)

UDP Başlığı

Kaynak portu (16 bit) Hedef portu (16 bit)

UzunlukChecksum (Kontrol Toplamı – 16 bit)

Veri

Page 40: Transmission Control Protocol (TCP)

Ağ Katmanı Protokolleri ICMP (Internet Control Message Protocol):

Paketin gönderilmesi sırasında hata oluştuğunda mesaj veya rapor gönderir.

• Ping komutu

ARP (Address Resolution Protocol) Yerel ağdaki adresleri veya donanım

adreslerini (MAC adres) ön bellekler. • MAC adresi ağ adresine ve ağ adresini de MAC

adresine çevirir.

IGMP (Internet Group Management Protocol) Belli bir gruptaki hostları, multicast (Bir

gönderici ile ağ üzerinde birden fazla alıcı arasında kurulan iletişimbir grup) router’a bildirir.

Page 41: Transmission Control Protocol (TCP)

Ağ Katmanı Protokolleri

IP (Internet Protocol) IP adresi bir ağa bağlı bilgisayarların ağ üzerinden

birbirlerine veri yollamak için kullandıkları adrestir. IP Başlığı:

IP versiyonIP başlık uzunluğu

Hizmet türüToplam uzunluk

KimlikParçalanma

durumuParçalanma

Ofseti

TTL ProtokolBaşlık kontrol toplamı

(Checksum)

Kaynak Adresi

Hedef Adresi

Opsiyonlar

Veri

Page 42: Transmission Control Protocol (TCP)

IP (Internet Protocol) Yaygın olarak IPv4 adresler kullanılıyor. Toplam 32 bit ve noktalarla ayrılmış 4

adet 8 bitlik sayı. Örnek bir IP adresi:

10000000 10011100 00001110 00000111 w.x.y.z 128.156.14.7

Ip adresleri dünyada 232 = 4 milyardır. Dinamik ip adresleri : Evden modem ile

bağlanma Statik ip adresleri: IIS

Page 43: Transmission Control Protocol (TCP)

IPv4 Adresleme

Sınıf IP adresAğ No

Host No

Ağ bit sayısı

Host bit sayısı

Ağdaki PC Sayısı

A 1-126 w x.y.z 8 24 224 = 16,777,214

B 128-191 w.x y.z 16 16 216 =65534

C 192-223 w.x.y z 24 8 28 = 254

• D sınıfı 224-239 ve ağ 28 bit ile gösterilir.

• 240 ve üzeri E sınıfı

•127 ile başlayan adresler : Bir makinenin kendisi ile konuşması (loopback)

•Localhost: 127.0.0.1

•İlk oktet 0 veya 255 olamaz.

Page 44: Transmission Control Protocol (TCP)

Ayrılmış IP Adresler

Bazı IP adresleri bazı kullanımlar için ayrılmıştır. Yerel ağlar için ayrılmış adresler: 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 169.254.0.0 - 169.254.255.255

0 bir ağı göstermektedir 255 broadcast adres; bir ağ

içerisindeki tüm PC’ler

Page 45: Transmission Control Protocol (TCP)

Ağ ve Broadcast Numaraları

C sınıfı 129.23.123.2 adres için; Ağ numarası: 129.23.123.0 Bu ağdaki tüm PC’lere mesaj göndermek

isteyen bir cihaz şu adrese mesajı atacaktır;• 129.23.123.255

B sınıfı 124.50.120.2 adres için; Ağ numarası: 124.50.0.0 Bu ağdaki tüm PC’lere mesaj göndermek

isteyen bir cihaz şu adrese mesajı atacaktır;• 124.50.255.255

Page 46: Transmission Control Protocol (TCP)

Alt Ağ Maskesi (Subnet Mask)

Ağdaki iki bilgisayarın veya cihazın aynı ağda olduklarını anlamalarını sağlar.

Sınıf IP adresAğ No

Host No

Ağ bit sayısı

Host bit sayısı

Ağ Maskesi

A 1-126 w x.y.z 8 24 255.0.0.0

B 128-191 w.x y.z 16 16 255.255.0.0

C 192-223 w.x.y z 24 8 255.255.255.0

255.0.0.0 (11111111.00000000.00000000.00000000

255.255.0.0 (11111111. 11111111.00000000.00000000

255.255.255.0 (11111111. 11111111. 11111111.00000000

Page 47: Transmission Control Protocol (TCP)

A Sınıfı (1-126)

ağ host

8 24 bit

18.26.0.1

32-bit

Host (Pc veya cihaz)

IP adres: 18.26.0.1

Ağ adresi: 18.0.0.0

Alt Ağ maskesi: 255.0.0.0

Broadcast adres: 18.255.255.255

Page 48: Transmission Control Protocol (TCP)

B Sınıfı (128-191)

ağ host

16 16 bit

181.26.0.1

32-bit

Host (Pc veya cihaz)

IP adres: 181.26.0.1

Ağ adresi: 181.26.0.0

Alt Ağ maskesi: 255.255.0.0

Broadcast adres: 181.26.255.255

Page 49: Transmission Control Protocol (TCP)

C Sınıfı (192-223)

ağ host

24 8 bit

194.26.5.1

32-bit

Host (Pc veya cihaz)

IP adres: 194.26.5.1

Ağ adresi: 194.26.5.0

Alt Ağ maskesi: 255.255.255.0

Broadcast adres: 194.26.5.255

Page 50: Transmission Control Protocol (TCP)

Alıştırma

a) 131.107.20.4b) 208.234.23.4c) 108.15.45.4 Yukarıdaki adreslerin

IP sınıfını Alt ağ maske numarasını Bağlı olduğu ağ numarasını Broadcast adreslerini yazınız.

Page 51: Transmission Control Protocol (TCP)

IPv6

IPv4: 32 bit IPv4: 232 = 4,3 109

IPv4:10’luk sayı sistemi

IPv6:128 bit IPv6: 2128 = 3,4

1038

IPv6:16’lık sayı sistemi

•Eski adı: IPng: IP next generation

•Bazı ülkeler (Amerika, Japonya…) kullanıyor.

•Uygulama ve fiziksel katman değişmedi.

•Daha hızlı, güvenli ve daha az başlık (header)

Page 52: Transmission Control Protocol (TCP)

IPv6 adresler

8 adet 4’lü hexadecimal sayıdan oluşur. 2001:0DB8:400:965a:0000:0000:000

0:0001 2001:0DB8:400:965a::1 (aynı adres)

(::) adreste 0 olan yerlerde kullanılarak adres kısaltılır

Örnek:2001:0DB8:400:965a::

2001:0DB8:400:965a:0000:0000:0000:0000

2001:0DB8:400:965a:0042::1 2001:0DB8:400:965a:0042:0000:0000:0001

Page 53: Transmission Control Protocol (TCP)

IPv6 adresler

IPv6 adres:FE80:0000:0000:0000:02A0:D2FF:FEA5:E9F5

/ 64/ x ağ numarasını gösteren bit sayısı

Örneğin; /32 ise 128 bitin ilk 32 biti ağ numarasını diğerleri host numarasını gösterir/64 ise 128 bitin ilk 64 biti ağ numarasını diğerleri host numarasını gösterir

Ağ no : FE80:0000:0000:0000Host no: 02A0:D2FF:FEA5:E9F5

Page 54: Transmission Control Protocol (TCP)

IPv6 adresler

Ayrılmış adresler 0:0:0:0:0:0:0:1 ::1 loopback 0:0:0:0:0:0:0:0 :: belirsiz

IPv6 ve IPv4 adreslerin kullanımı 128 – 32 = 96 x:x:x:x:x:x:d.d.d.d

• x: IPv6 ve d: IPv4 Örnek:

• 0:0:0:0:0:0:1.2.3.4/96 ::1.2.3.4/96

Page 55: Transmission Control Protocol (TCP)

IP and IPv6

Page 56: Transmission Control Protocol (TCP)

TCP/IP Sorun Çözme

Ağ bağlantılarını kontrol edin Ping 127.0.0.1 (loopback) ile ethernet

kartınızı kontrol edin Kendi bilgisayarınızın IP adresine ping

atabilirsiniz. Varsayılan (Default) Router veya

gateway (ağ geçidi) varsa ona ping atarak pc-alt ağ iletişimini kontrol edebilirsiniz.

Uzaktaki bir hosta ping atabilirsiniz.

Page 57: Transmission Control Protocol (TCP)

Ping Komutu

Ping komutu bir bilgisayara 32 byte’lık bir ICMP paketi gönderir ve sonuçta elde ettiği raporu gösterir.

Ping 127.0.0.1

Page 58: Transmission Control Protocol (TCP)

Ping Komutu

Ping www.gazi.edu.tr

Page 59: Transmission Control Protocol (TCP)

Ping Komutu

Ping /?

Page 60: Transmission Control Protocol (TCP)

IPConfig Komutu Tüm ip ile konfigürasyonu (MAC adres

vb.) görmek için kullanılır.

Page 61: Transmission Control Protocol (TCP)

IPConfig Komutu İpconfig /? ipconfig /all ile tüm seçenekler görülebilir.

Page 62: Transmission Control Protocol (TCP)

Tracert Komutu Bir adrese giden yolu gösterir. Microsoft’ta tracert ve ping komutlarının

birleşimi olan pathping komutu kullanılabilir.

Page 63: Transmission Control Protocol (TCP)

ARP (Adres Çözümleme Protokolü)

IP adreslerini fiziksel adrese dönüştürmek için kullanılır.

Bir paketin bir bilgisayardan çıktığında nereye gideceğini IP numarası değil gideceği bilgisayarın fiziksel adresi (MAC) belirler.

Bu adreste paketin gideceği ip numarası kullanılarak elde edilir.

Page 64: Transmission Control Protocol (TCP)

ARP (Adres Çözümleme Protokolü)

Ardından paket yönlendirilir. ARP adres çözümlemek istediği zaman

tüm ağa bir ARP istek mesajı gönderir ve bu IP adresini gören yada bu IP adresine giden yol üzerinde bulunan makine bu isteğe cevap verir ve kendi fiziksel adresini gönderir.

ARP isteğinde bulunan makine bu adresi alarak verileri bu makineye gönderir.

Page 65: Transmission Control Protocol (TCP)

ARP (Adres Çözümleme Protokolü)

Page 66: Transmission Control Protocol (TCP)

Netstat Komutu

TCP/IP bağlantılarını, gönderilen ve alınan paketlerin detaylarını görmek için kullanılır.

Page 67: Transmission Control Protocol (TCP)

Nslookup Komutu

Bir adresin TCP/IP numarasını bulunmasını sağlar.

Page 68: Transmission Control Protocol (TCP)

Nslookup Komutu

Page 69: Transmission Control Protocol (TCP)

Nbstat Komutu

TCP/IP üzerinden NETBIOS bağlantılarının detaylarını görmeyi sağlar.

NETBIOS (Network Basic Input/Output System) : Farklı bilgisayarlardaki uygulamaların bir yerel alan ağı ile iletişim kurabilmelerini sağlayan program.

Page 70: Transmission Control Protocol (TCP)

Nbstat Komutu