I'm having some difficulty understanding ip addresses. Let's say:

Question Info:

private subnet

IP addresses

Now, a host retrieves a web page from the web server at

Then, host retrieves a web page from the web server at

Answer Part:

Now, I have this information for first the request part:

internal (src) (dest)

external: (src) (dest)

Where does 80 come from at the end of dest?

Now, for the second request, the src address of external is

Why is it 2.1234? In the 3rd one, it was 1 again.


1 Answer 1


Usually writing an ip address and a number after the : ,it means the number after the : is the port

In the internal part: is the private ip address of the host its his ip address inside the network,notice that we have 2 types of ip addresses: private ip address-which is the ip address inisde out network and public ip address which is our ip address in the "internet" so its the private ip address of the host and the 1234 its the port of the client-the host

now the is the ip address of the web page and the page listens to the port 80

In the external part: we can see the ip address of the host has changed,why has it changed?because what i said before about private and public ip addresses this-this ip is the external ip which the host was provided(i suggest reading about NAT if you want to understand this part deeper) the port of the host stays 1234

  • $\begingroup$ I have read and understood how NAT generally works. But my question was that where does the value 80 originate from in the answer? Is it like a standard value? Because no such value was given in the qs $\endgroup$
    – x89
    Commented Apr 18, 2020 at 13:57
  • $\begingroup$ Its the port number the web page listens to $\endgroup$
    – Noname
    Commented Apr 18, 2020 at 16:36
  • $\begingroup$ For the first external req, the src is `````` . This makes sense. Now the second external req, src is and the third is `````` again. So why is this and changing? $\endgroup$
    – x89
    Commented Apr 20, 2020 at 21:55
  • $\begingroup$ Read here about dynamic nat i think it will make things more clear for you:speedcheck.org/wiki/nat/#dynamic-nat $\endgroup$
    – Noname
    Commented Apr 21, 2020 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.