12.07.2015 Views

BROCADE IP PRIMER

BROCADE IP PRIMER

BROCADE IP PRIMER

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Layer 4 TCP/<strong>IP</strong>: TCP/UDPtions will attempt to connect on TCP 22. Both connections will have the samesource <strong>IP</strong> address and the same destination <strong>IP</strong> address. How will eithermachine know which conversation is which?First off, the connection from the client to host uses TCP 22 as its destinationport. On the Transport Layer (just like addressing on the lower layers), youneed a source port and a destination port. What actually happened when youmade that SSH connection is that the client used TCP 22 for its destinationport, but it used another port number for its source port. The source port numberis a random number between 1024 and 65,535 that is chosen by theoperating system. Every time a new Transport Layer session is initiated, a newsource port is chosen. So, in our example, the first SSH connection will useone source port, and the second SSH connection will use a different sourceport.TCP src: 2000 dst: 22TCP src: 4000 dst: 22TCP src: 54321 dst: 22The source port is also used so that the destination host knows how to talkback to the client. Just like in Layer 3 (<strong>IP</strong>) and Layer 2 (MAC) addressing, theclient will initiate the connection to the destination host using a source portand a destination port, and the destination host will reply by reversing thesource and destination. This is probably seen best in an illustration.TCP src: 1024 dst: 22TCP src: 22 dst: 1024In this example, the client is initiating a SSH session to the server. The client'ssource port is TCP 1024 and its destination port is TCP 22. When the serverreplies, it uses a source port of TCP 22 and a destination port of TCP 1024.A session is distinguished by the following items:• Source <strong>IP</strong> address• Destination <strong>IP</strong> address• Source port• Destination port• Protocol (e.g., TCP or UDP)Both TCP and UDP use source and destination ports to distinguish the serviceand multiple sessions. Now let's see what makes them different.Brocade <strong>IP</strong> Primer 55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!