What's new

ISP router / switch setup

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Scooterit

Regular Contributor
I am wandering how an ISP manages the IP addresses of their clients without them being all on the same network.

In my regular home / office network setups, all devices are connected to the same network and can connect with each other. How does for example an ISP manage this so I want be able to connect to my neighbor who is also using the same ISP...

Or for example how to go about subletting office space with internet connection without connecting to the other occupants?
 
They are actually all on the same network.
Its called the Internet.

Usually the reason you cannot easily connect is due to your router being a NAT firewall.

Sublet offices do something different. They either;
Use a split infrastructure with different switches and routers connected with a different WAN IP.
Use VLANs to a different router using a different WAN IP.
Use VLANs to the same router but with firewall rules set up to prevent inter-VLAN traffic.
Use Private-VLANs/source port filters/ACLs to share resources like printers without the computers and to talk to each other directly yet still be on the same subnet and using the same routers and switches.
 
To expand upon what Cloud2000 was saying, the ISP doesn't "manage" how you connect to your neighbor. All of your devices behind your router are running one range of IPs. When they go out from your router to the internet at large through the ISP, they go out with the WAN IP address from your router. Your router knows which route outgoing packets went on, so when it receiving incoming packets from the same destination, it sends them on to the proper internal IP address.

The destination that you are sending your packets as two choices. It has a router which is NOT doing NAT, so the IPs of the machines behind it are exposed to the internet, or does NAT (possibly with load balancing).

In the case of NAT, incoming connection attempts (IE not the result of an internally initiated connection to the outside) get forwarded to the proper machine based on port forwarding/routing rules. If no routing/port forwarding rule exists, the packets get dropped and nothing can connect from outside->in (IE connections can only be initiated the other direction, from inside->out). The router can also load balance, so even if you are trying to connect to the same service internally to the network, it could send the request to one of several different internal targets based on load balancing rules. So the first connection to a web server internal to the network could be sent to server 1, the second connection to server 2, the third to server 1, etc. Often times in larger organizations this is not done at the router level, but all requests get sent to a load balance server, which then farms out the request to multiple servers.

So in the case of you connecting to your friend's network, as an example to copy a file over FTP from them, you'd need to know the IP address of their WAN connection. Lets call it 111.111.111.111. Their router would then need a port forward rule for port 22 to your friends computer. Say they were running 192.168.0.x internally and their desktop that you want to grab the file from was 192.168.0.2. Their router would need a port forwarding rule for port 22 to point to 192.168.0.2.

So your FTP connection request hits your router, gets converted to your WAN IP address (let's say 111.111.111.112), it hits your ISP's router, since it is in the same neighborhood, probably just the ISP's edge router, which then sends the TCP/IP packets to your neighbor's router at 111.111.111.111. When it hit's your neighbor's router with a port request of 22, the router sees a rule that all packets coming in on port 22 should go to 192.168.0.2, so it forwards the packets to your friend's desktop. Some ack packets get sent back on their merry way since the return IP address is known and your router knows anything originating back with that TCP/IP session should go to your computer, everything is right in the world and it works.

If their router didn't have a port forwarding rule, the packets would hit their router and be dropped.

If you don't know the IP address of your friend, they'd need to register with a dynamic DNS service, which resolves a name to a dynamic IP address (because your ISP are jerks and they don't give you a static IP as an example). So you simply type in the unresolved name "dynDNS.com/MyNeighborsWaresStash" or whatever, which will then go out to your DNS server of choice and since the dynamic DNS server is auto updating the DNS information as your friend's IP address is dynamically changed, it has the latest IP address of 111.111.111.111, which your computer then gets the name resolution for dynDNS.MyNeighborsWaresStash to 111.111.111.111 and thus then attempts the TCP/IP session connection to that IP and everything I mentioned before happens.
 
Wow thanks for taking the time to write all this down, very educational!

In this topic I was just wandering how an ISP distributes the internet to their clients without them unintentionally connecting to each other.

Smiles across the wires,

Rogier
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top