Networking chapter VII
-
Upload
jayakumar-balasubramanian -
Category
Technology
-
view
383 -
download
1
description
Transcript of Networking chapter VII
![Page 2: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/2.jpg)
Transmission Control Protocol (TCP)
![Page 3: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/3.jpg)
The TCP service modelUnderlying media is ‘unreliable’An ‘end-to-end’ connection oriented, reliable
protocol is requiredTCP functionalities:
Service mapping based on port numbers Congestion control Connection establishment and termination Acknowledgement Timeout and re-transmission
![Page 4: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/4.jpg)
Transport addressing - Ports
![Page 5: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/5.jpg)
Ports and services
192.18.22.13
Port 80 25 23
Application WWW E-mail Telnet
![Page 6: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/6.jpg)
Ports and services
![Page 7: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/7.jpg)
How does TCP achieve all this?The TCP maintains a method called as
‘three-way-handshake’ for connection establishment
The connection termination also happens in a pre-defined way
Since both ends know each other, the ‘connectedness’ comes is achieved
Various flag fields are used: ACK, SYN, RST, FIN
![Page 8: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/8.jpg)
Connection establishment
![Page 9: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/9.jpg)
Connection termination
![Page 10: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/10.jpg)
UDP header
![Page 11: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/11.jpg)
The RAW sockets
![Page 12: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/12.jpg)
How to program RAW sockets?Use simple socket() call with some different
parametersCreating a RAW socket:
TCP protocol: IPPROTO_TCP UCP protocol: IPPROTO_UDP
socket (AF_INET,SOCK_DGRAM,IPPROTO_IP)
Sending and receiving data: Send: write() system call Receive: read() system call
Can be used for any packet capturing and analyzing protocol
![Page 13: Networking chapter VII](https://reader038.fdocuments.in/reader038/viewer/2022102815/555971e0d8b42a65298b496e/html5/thumbnails/13.jpg)
Web : http://www.jwritings.comEmail: [email protected]