After reading this article you will be able to generate complete understanding about real IP (public IP) and shared IP.
BitTorrent is a peer-to-peer file transfer protocol. Understanding different types of IP addresses is pretty important to get the best out of this protocol!
BitTorrent is a peer-to-peer file transfer protocol. Understanding different types of IP addresses is pretty important to get the best out of this protocol!
What do you mean by the terms Public IP/Real IP/Shared IP?
Public IP is basically the IP address that you use to access the internet. Websites see this address when you access them. It's also known as the external IP address. When a public IP address is being used by multiple users behind a router, it's called a shared IP. However if it's allocated to only one user, it'll be addressed as a real IP.
_______
Since the client is behind a NAT firewall, it’s not directly reachable from the internet, unless a port is specifically forwarded for the client.
However if the ISP allocates a dedicated public IP for the client, It allows the client to easily host any services or perform peer-to-peer connectivity seamlessly as all their ports are open.
_______
Both static and dynamic IP can be shared or a real IP.
_______
When the website sends a reply to the source port, your ISP router looks up in the NAT table and forwards the data to your PC.
In this case, you're just opening an outgoing port to connect with the website's server which has a public IP.
So you do not need a real IP to browse a website or download something from it.
_______
The entire file transfer happens between the two peers where one peer acts as a server and another as a client.
In such a scenario one end needs to have a public IP and port which is accessible by the other peer.
_______
Peer B's ISP router looks up in the NAT table for that destination port but fails to find any and the packet gets dropped.
Similarly, client B's packet also gets dropped at A's ISP router when it attempts a connection.
To overcome this problem one of them could "forward" their incoming port in the ISP router and the connection would be possible. But most ISP would not do that.
TLDR, if both peers have shared IP there's no way they can connect "directly".
However, there are other methods of NAT traversal like UDP hole punching which is unreliable.
_______
This is because the shared user's NAT will drop any incoming connections as the destination port isn't forwarded to a private address.
_______
Since tracker announces take time, even if you have a real IP you can't instantly connect with a shared IP peer.
You'll have to wait for that user to announce to the tracker and make an outgoing connection with you.
But it's still better than not being able to connect at all!
Soon, IPv6 will be the new standard where every device will get a public IPv6 address and NAT-related issues will become nonexistent.
_______
Log in to your Router WebUI(usually 192.168.0.1) and match your connection IP with your IP address shown in whatismyipaddress.com.
If they match then you have a real(public) IP.
But if your connection IP starts with one of those private IP series mentioned earlier then you're using a shared IP.
This is the surest method of determining if you have a real IP connection.
_______
Go to your torrent clients’ settings and find the port.
Check that port in canyouseeme.org and see if it's open or closed. If it says open then you have real IP.
*Your ports could be closed if you do not forward them or have UPnP turned off in your router or clients’ settings.
Your port could also show as open whereas it can be some service running on your ISP’s router.
_______
What is the difference between shared IP/real IP?
IPv4 addresses are limited and costly and therefore some ISPs share one public IP address among multiple users. They allocate private IP addresses(192.168.x.x or 10.x.x.x or 172.16.x.x) to their clients for connecting with their router instead of a dedicated public IP.Since the client is behind a NAT firewall, it’s not directly reachable from the internet, unless a port is specifically forwarded for the client.
However if the ISP allocates a dedicated public IP for the client, It allows the client to easily host any services or perform peer-to-peer connectivity seamlessly as all their ports are open.
_______
What is the difference between static/dynamic IP?
A static public IP doesn’t change when you restart your router/PC. The opposite of this is a dynamic IP.Both static and dynamic IP can be shared or a real IP.
_______
Do I need a real IP to browse the internet?
When you try to access any website from a shared IP connection, your ISP NAT adds the source & destination IP: Port to a table.When the website sends a reply to the source port, your ISP router looks up in the NAT table and forwards the data to your PC.
In this case, you're just opening an outgoing port to connect with the website's server which has a public IP.
So you do not need a real IP to browse a website or download something from it.
_______
Why do I need real IP to get the best experience in torrenting?
Torrents utilize peer-to-peer communication to transfer files between users.The entire file transfer happens between the two peers where one peer acts as a server and another as a client.
In such a scenario one end needs to have a public IP and port which is accessible by the other peer.
_______
What happens if two peers are using shared IPs and try to connect?
Let's assume peer “A” sends a request packet to peer “B” to its public IP & port 6881.Peer B's ISP router looks up in the NAT table for that destination port but fails to find any and the packet gets dropped.
Similarly, client B's packet also gets dropped at A's ISP router when it attempts a connection.
To overcome this problem one of them could "forward" their incoming port in the ISP router and the connection would be possible. But most ISP would not do that.
TLDR, if both peers have shared IP there's no way they can connect "directly".
However, there are other methods of NAT traversal like UDP hole punching which is unreliable.
_______
What happens if one of the peers has a shared IP but the other has real IP?
This is the tricky part. If the peer with real IP tries to establish a connection with the shared IP user it will fail.This is because the shared user's NAT will drop any incoming connections as the destination port isn't forwarded to a private address.
_______
So then how does a real IP user connect with a shared IP user?
The answer is the same as loading a website! The shared IP peer establishes an outgoing connection with the real IP peer. The real IP user acts the same way as a website's server.Since tracker announces take time, even if you have a real IP you can't instantly connect with a shared IP peer.
You'll have to wait for that user to announce to the tracker and make an outgoing connection with you.
But it's still better than not being able to connect at all!
Soon, IPv6 will be the new standard where every device will get a public IPv6 address and NAT-related issues will become nonexistent.
_______
So what kind of IP are you using? Still don't know? Find out using any of the methods below.
Method 1:
Log in to your Router WebUI(usually 192.168.0.1) and match your connection IP with your IP address shown in whatismyipaddress.com.If they match then you have a real(public) IP.
But if your connection IP starts with one of those private IP series mentioned earlier then you're using a shared IP.
This is the surest method of determining if you have a real IP connection.
_______
Method 2: (Less accurate)
Go to your torrent clients’ settings and find the port.Check that port in canyouseeme.org and see if it's open or closed. If it says open then you have real IP.
*Your ports could be closed if you do not forward them or have UPnP turned off in your router or clients’ settings.
Your port could also show as open whereas it can be some service running on your ISP’s router.