AsGa Light
AsGa Light
AsGa Light
AsGa LightBOLT
BOLT
BOLT
BOLT 10GigE Switch
10GigE Switch
10GigE Switch
10GigE Switch
U
U
U
User Guide
ser Guide
ser Guide
ser Guide
Configuration
Configuration
Configuration
Configuration
36
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgment Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data | |U|A|P|R|S|F| |
| Offset| Reserved |R|C|S|S|Y|I| Window |
| | |G|K|H|T|N|N| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Programs utilize TCP by passing it buffers of data. TCP breaks this data into packages
known as segments, and then uses IP to further package these segments into datagrams. Finally, the
datagrams are embedded into a network packet which can be routed across a network.
When the packet arrives at its destination, the IP stack on the remote host extracts the
datagram from the packet, then the segment from the datagram. The segment is then passed up to
the TCP stack, where it can be validated. Ultimately the TCP stack can reassemble all the segments
into the complete buffer which is then passed to the application. TCP provides two way
communication, so this same process occurs in both directions.
Inside of the packet there are some bits related with control structures. Particularly there are
six 'control bits' defined in TCP, one or more of which is defined in each packet. The control bits are
'SYN', 'ACK', 'PSH', 'URG', 'RST', and 'FIN'. TCP uses these bits to define the purpose and contents
of a packet. We will briefly define them.
•
URG
means out of band data. For example in the telnet session if you press ctr-c tcp stack will
send a packet, which has this flag set.
•
SYN
bit has meaning only when establishing connection e.g. in the handsaking procedure.
Both sides of the connection needs to send this special packet with SYN flag on.
•
When the
ACK
flag is on the Acknowledgement field in the tcp packet contains the number of
the next acknowledgeable tcp packet with this sequence number. This bit is on almost in every
packet. ACK flag tells to the target machine that the sending machine has approved all
packets with sequence number below the Ack number in the packet.
•
If the reset flag (
RST
) is on then the connection is destroyed and all data structures in memory
for the connection must be freed.
•
With interactive connections
PSH
(push) flag is used to gain rapid and smooth interaction. The
packet is not queued but rather sent as soon as possible. Interactive programs should thus
use this flag.
•
FIN
flag tells to the target machine that it should not take anymore data packets from the
sending machine. E.g. the sending machine tells that it wount send anymore packets but can
still receive packets by himself.
AsGa LightBolt Switches has a hardware based built in mechanism to detect malicious
control flag bit combinations. The detected combinations are:
•
TCP SYN FLAG = 1 and Source Port < 1024.
•
TCP Control Flags =0 and sequence number 0.
•
TCP FIN, PUSH, URG bit set and sequence =0.
•
TCP SYN, FIN sets.