Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Seems like it would be smarter to have the router recognize it's own IP, but I guess maybe always following the same protocol would be cleaner/more stable.

I just had this idea that I might test this out as well with the regular mail. Address a letter to myself, put stamps on it, and place it in my mailbox...lol.

So does anyone know for sure, if within my network, I have two computers and my router is configured to forward inbound request on port 80 to one, my webserver, and I try to access my external ip from the other computer (client), does the router recognize that it is about to send a request to itself and just keep the request, sending it straight to my server on my network, or does the request make it to my ISP, who then sends it back?

share|improve this question
1  
It is looking for a destination; it is adhering to the protocol. The ISP is nothing more than the loaner of the IP, the actual device is current owner. –  Aaron McIver May 18 '12 at 4:09
    
Does it work then? I know in the past at least, accessing a server from an internal computer, with router's external IP didn't work. I heard routers have a new feature now.. don't recall the name –  barlop May 18 '12 at 4:35

2 Answers 2

up vote 1 down vote accepted

When you make a network request to an IP address, your computer typically broadcasts an ARP request to ask 'Who has this IP address?'. The clients on the network then check their addresses and the one host that has the IP address then replies to the requesting host 'Oh! That's me!!'. The request can the be routed to the appropriate host.

Because the 'external' interface of the router has it's public IP address assigned to it, when the network is asked 'Who as this IP?', the router looks at it's addresses and replies 'Oh! That's me!!' and takes the request from your host and, because of the requested port, uses it's logic to then forward the request to the appropriate server.

What happens if no one on the network has the address? Well, that's what the gateway setting is for! When the host sees that the address is on a different network, it sends the request up to the host that is listed as the gateway and says 'Dunno where this goes, figure it out.' This continues from router to router until either the time to live (TTL) or the hop count on the request run out, at which point the request is sent back as a failure.

Naturally all this happens AFTER DNS resolution...provided the domain name resolves to a correct address. But that is for another answer.

share|improve this answer
    
this probably won't surprise you but just comment that I see that after arp -d, deleting te arp cache, tracert publicip still does 1ms and does it directly to the gateway. –  barlop May 18 '12 at 4:38
    
@barlop that's what I said... lol –  Bon Gart May 19 '12 at 4:20

Trace Route.

if you are in Windows, bring up a command prompt. type "tracert" and your external IP. You'll see it make one hop. Should be a 1ms hop. So, it doesn't go out to your ISP (1 hop) and then back to you (2nd hop).

Same thing if you tracert with the name of one of your computers on the network.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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