Hot Downloads

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: TCP Question

TCP Question 7 years 10 months ago #28127

  • apit
  • apit's Avatar
  • Offline
  • Senior Member
  • Posts: 227
  • Karma: 0
From firewall.cx note, i found that TCP and UDP source & destination address is 16 bits..Actually what is 16 bits?

From my understanding, if hostA(client) transfer data to hostB(webserver) , they will using random port number at hostA.. let say port 1030 and hostB using port 80..

1030 decimal = 10000000110 binary
80 = 01010000 binary
The administrator has disabled public write access.

Re: TCP Question 7 years 10 months ago #28128

  • Chojin
  • Chojin's Avatar
  • Offline
  • Senior Member
  • Posts: 251
  • Karma: 0
16 bits = 65535.
That is the ammount of ports available on a computer.

As you know TCP and UDP make use of ports to communicatie (talk and listen).

The client will indeed use a free port to send information to the server. The server in this case is a HTTP server which is listening on port 80 (defined port)... so the client will send information from a source port (1025-65535 these are the undefined ports) to the destination port the server is listening on (80)

Now the webserver receives the information by IP address and recognizes the port 80 because the server has enabled data for port 80.

It will read the data (probably a HTTP requesT) and send the requested data back to the source port of the client, because in the mean time the client is listening on the port where it sends out the data (1030 in your example).. this way the computers can set up a session.

Hope this helps a bit
CCNA / CCNP / CCNA - Security / CCIP / Prince2 / Checkpoint CCSA
The administrator has disabled public write access.

Re: TCP Question 7 years 10 months ago #28141

  • S0lo
  • S0lo's Avatar
  • Offline
  • Moderator
  • Posts: 1577
  • Thank you received: 7
  • Karma: 3
Well explained Chojin :)
1030 decimal = 10000000110 binary
80 = 01010000 binary

I see what your getting at by this one. 10000000110 (1030) is 11 bits and 1010000 (80) is 7 bits. So why do they say 16bits ? ha?

10000000110 is saved in the packet as 0000010000000110
1010000 is saved in the packet as 0000000001010000

Trailing zeros are added to the left so that the total is 16 bits. Does that make sense?
Studying CCNP...

Ammar Muqaddas
Forum Moderator
www.firewall.cx
The administrator has disabled public write access.

Re: TCP Question 7 years 10 months ago #28145

  • Chojin
  • Chojin's Avatar
  • Offline
  • Senior Member
  • Posts: 251
  • Karma: 0
Well explained Chojin :)

Thanks :D

Also, nice remark about the trailing zero's... makes it even a bit more clear I guess.
CCNA / CCNP / CCNA - Security / CCIP / Prince2 / Checkpoint CCSA
The administrator has disabled public write access.

Re: TCP Question 7 years 10 months ago #28151

  • apit
  • apit's Avatar
  • Offline
  • Senior Member
  • Posts: 227
  • Karma: 0
thanks chojin & solo..

one more question..Port numbers is devide into 3 which is :
1. Well Known Port Numbers (0 through 1023)
2. Registered Port Numbers (1024 through 49151)
3. Dynamic Port Numbers (49152 through 65535)

Client will using registered port numbers & dynamic port numbers is it?

Why server is using fix port but client using dynamic port?

What software that you are using to analyst TCP header (refer to firewall.cx note)? Is it sniffer pro or ethereal / wireshark?
The administrator has disabled public write access.

Re: TCP Question 7 years 10 months ago #28155

  • S0lo
  • S0lo's Avatar
  • Offline
  • Moderator
  • Posts: 1577
  • Thank you received: 7
  • Karma: 3
Client will using registered port numbers & dynamic port numbers is it?
Yes.
Why server is using fix port but client using dynamic port?
Servers use a fixed port because clients need to know it when they initialize the connection. If it was dynamic, how can the clients know it?

Clients use a dynamic source port because they might have multiple processes (or connections) from the same client to one or more servers. If all processes (or connections) used the same fixed port then how will the reply packets from the server route to the write process (or connection) after it reaches the client?
What software that you are using to analyst TCP header (refer to firewall.cx note)? Is it sniffer pro or ethereal / wireshark?
I personally use wireshark and commview.
Studying CCNP...

Ammar Muqaddas
Forum Moderator
www.firewall.cx
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.082 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup