Sponsored Content
Special Forums IP Networking New-Bie doubt in TCP-IP 3 way hand shake Post 302877568 by baker on Monday 2nd of December 2013 09:04:03 AM
Old 12-02-2013
New-Bie doubt in TCP-IP 3 way hand shake

from my understanding

step 1:

From device A to device B , sending SYN.
SYN=1
ACK=0
Ackno=0
Sequence number=2000 [for example]

step 2:

from device B to A , sending SYN-ACK
SYN=1
ACK=1
ACKno=2001 [seq no +1]
Sequence number= 5000 [for example]


Step :3

From device A to B , sending ACK

SYN=0
ACK=1
ACKno=5001.
here is my doubt , as i saw in many examples why Sequence number will be 2001 ....?


hope you guys understood my question...
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

new bie questions

Hi all, I am a new bie and learning linux step by step. I am googling a lot but still unabel to find few things like below: 1. how to clean ipcs if I reboot the system it is cleaned but can I do that with out rebooting the system 2. I don't have any in side the folder /usr/src and one of my... (2 Replies)
Discussion started by: gauri
2 Replies

2. UNIX for Dummies Questions & Answers

few new bie questions related to gdb , telnet

Hi All, 1. how to what is the current line we are executing. List command will display the 10 lines by default. 2. how to put a pointer to the current excuting line when executing the list. 2. if i have set one break point and i want to set 2nd break point do i need to delete the first break... (1 Reply)
Discussion started by: gauri
1 Replies

3. UNIX for Dummies Questions & Answers

A complete New Bie Here

Hello Guys I am a complete New bie in UNIX ( Just know a few of the commands ). Please guide how should I learn Unix In a proper way . I am doing a job, so i will have to do the study at home . Which books , Links, Pages you will suggest me so that i can learn UNIX fast . Thanks (5 Replies)
Discussion started by: supercops
5 Replies

4. IP Networking

Doubt regarding TCP Options negotiation

Hi, I am aware that duirng the intial SYN, SYN-ACK, ACK (connection establishment) phase, both TCP ends advertize TCP options (or extended features) each would like to use for the connection. Ultimately both ends end up using TCP options commonly supported and advertized by both. My doubt... (2 Replies)
Discussion started by: jake24
2 Replies

5. Shell Programming and Scripting

Merge left hand strings mapping to different right hand strings

Hello, I am working on an Urdu to Hindi dictionary which has the following structure: a=b a=c n=d n=q and so on. i.e. Headword separated from gloss by a = I am giving below a live sample بتا=बता بتا=बित्ता بتا=बुत्ता بتان=बतान بتان=बितान بتانا=बिताना I need the following... (3 Replies)
Discussion started by: gimley
3 Replies
SYNCACHE(4)						   BSD Kernel Interfaces Manual 					       SYNCACHE(4)

NAME
syncache, syncookies -- sysctl(8) MIBs for controlling TCP SYN caching SYNOPSIS
sysctl net.inet.tcp.syncookies sysctl net.inet.tcp.syncookies_only sysctl net.inet.tcp.syncache.hashsize sysctl net.inet.tcp.syncache.bucketlimit sysctl net.inet.tcp.syncache.cachelimit sysctl net.inet.tcp.syncache.rexmtlimit sysctl net.inet.tcp.syncache.count DESCRIPTION
The syncache sysctl(8) MIB is used to control the TCP SYN caching in the system, which is intended to handle SYN flood Denial of Service attacks. When a TCP SYN segment is received on a port corresponding to a listen socket, an entry is made in the syncache, and a SYN,ACK segment is returned to the peer. The syncache entry holds the TCP options from the initial SYN, enough state to perform a SYN,ACK retransmission, and takes up less space than a TCP control block endpoint. An incoming segment which contains an ACK for the SYN,ACK and matches a syncache entry will cause the system to create a TCP control block with the options stored in the syncache entry, which is then released. The syncache protects the system from SYN flood DoS attacks by minimizing the amount of state kept on the server, and by limiting the overall size of the syncache. Syncookies provides a way to virtually expand the size of the syncache by keeping state regarding the initial SYN in the network. Enabling syncookies sends a cryptographic value in the SYN,ACK reply to the client machine, which is then returned in the client's ACK. If the corre- sponding entry is not found in the syncache, but the value passes specific security checks, the connection will be accepted. This is only used if the syncache is unable to handle the volume of incoming connections, and a prior entry has been evicted from the cache. Syncookies have a certain number of disadvantages that a paranoid administrator may wish to take note of. Since the TCP options from the initial SYN are not saved, they are not applied to the connection, precluding use of features like window scale, timestamps, or exact MSS sizing. As the returning ACK establishes the connection, it may be possible for an attacker to ACK flood a machine in an attempt to create a connection. While steps have been taken to mitigate this risk, this may provide a way to bypass firewalls which filter incoming segments with the SYN bit set. To disable the syncache and run only with syncookies, set net.inet.tcp.syncookies_only to 1. The syncache implements a number of variables in the net.inet.tcp.syncache branch of the sysctl(3) MIB. Several of these may be tuned by setting the corresponding variable in the loader(8). hashsize Size of the syncache hash table, must be a power of 2. Read-only, tunable via loader(8). bucketlimit Limit on the number of entries permitted in each bucket of the hash table. This should be left at a low value to minimize search time. Read-only, tunable via loader(8). cachelimit Limit on the total number of entries in the syncache. Defaults to (hashsize x bucketlimit), may be set lower to minimize memory consumption. Read-only, tunable via loader(8). rexmtlimit Maximum number of times a SYN,ACK is retransmitted before being discarded. The default of 3 retransmits corresponds to a 45 second timeout, this value may be increased depending on the RTT to client machines. Tunable via sysctl(3). count Number of entries present in the syncache (read-only). Statistics on the performance of the syncache may be obtained via netstat(1), which provides the following counts: syncache entries added Entries successfully inserted in the syncache. retransmitted SYN,ACK retransmissions due to a timeout expiring. dupsyn Incoming SYN segment matching an existing entry. dropped SYNs dropped because SYN,ACK could not be sent. completed Successfully completed connections. bucket overflow Entries dropped for exceeding per-bucket size. cache overflow Entries dropped for exceeding overall cache size. reset RST segment received. stale Entries dropped due to maximum retransmissions or listen socket disappearance. aborted New socket allocation failures. badack Entries dropped due to bad ACK reply. unreach Entries dropped due to ICMP unreachable messages. zone failures Failures to allocate new syncache entry. cookies received Connections created from segment containing ACK. SEE ALSO
netstat(1), tcp(4), loader(8), sysctl(8) HISTORY
The existing syncache implementation first appeared in FreeBSD 4.5. The original concept of a syncache originally appeared in BSD/OS, and was later modified by NetBSD, then further extended here. AUTHORS
The syncache code and manual page were written by Jonathan Lemon <jlemon@FreeBSD.org>. BSD
January 22, 2008 BSD
All times are GMT -4. The time now is 06:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy