Alright, so at my home connection my router gets a connection to my ISP. I get that device then needs an IP address to communicate with the external web. Now as I add devices to my personal network do these devices then get a specific IP from my ISP or does it simply "borrow" the IP of my router.The whole process seems very mystical and arbitrary to me and to a certain degree from where I sit in the system, it seems very automated,
Your router will give your devices a "internal" IP address. (normally they look like 192.168.*.* or 10.0.*.* ...).
It is very complicated, I think that CCNA2 would be a perfect read for you, if you are interested in the whole process of how external sources communicate with internal devices.
Basically your home router does NAT (Network Address Translation), it takes your 192.x.x.x ip address assigned by your router and maps it to a public address assigned from your ISP . This basically allows all the devices on your home network "talk" to the internet. Without that NAT taking place, your home network would be unable to communicate to the "Internet".
And another note is when you see any ip address that is 192.168.x.x or 10.x.x.x or 172.x.x.x it is most likely a private address that is not route-able to the internet. Any other addresses that are not on those networks are most likely public meaning they can be routed on the internet. So the NAT just translates so your privates can talk to the public.
That is the best I can explain if without getting too in depth.
Also your router is a DHCP server which assigns ip addresses "dynamically" to your devices. If this function were turned off then you would have to put an ip address config in each of your devices. As mentioned in my previous post you are being assigned private ip addresses from your routers DHCP service.
Its not that complicated, if you understand the basics of LAN (Local Area Network) and WAN (Wide area network - The Internet).
If you want the details, that's when it takes multiple pages of text and visuals.
Internet Service Provider, is basically given a segment of IP adresses, this is done by Subnetting, a Small ISP is given a subnet of 255.255.240.0 what gives them 4096 Unique IP Adresses.
Those Addresses are assigned to customers, it can be done:
2) Manual Assignment (Static IP)
3) Port assigned IP adresses
What you usually end up with, is DHCP combined with MAC address, meaning you will be given a DHCP lease first time you connect to the ISP, and it ties your IP to your Routers MAC adress, so you cant change your IP at will, unless you change out the whole device or change the MAC adress.
Now for the LAN part, as you know, every device on your home network has an IP adress. your Router, what is also your Gateway, is set on 192.168.1.1 (Default, it can be different), The subnet is 255.255.255.0 Meaning there can be 254 Unique Devices with IP in your network. When a devices tries to contact let's say 18.104.22.168 (google.com), then because it is not in range for the subnet, device turns to the Gateway, what is your Router, what then turns to ISP Router, and so on, till it reaches its destination.
This means, the outside world, only sees that "yourIPAdress" requested information about google.com.
shit, you were right vmN, this is a shitty thing to explain :D
Anyway, hope this helps
Greetings everyone so I've been told two different things from my two teachers of networking (on is a lab teacher the other one a class teacher ).
My class teacher says that isps get a range of ips, let's say they get 200.10.2.x ( 22.214.171.124-126.96.36.199) and by using a /30 mask they can get 2^6 clients (because you can create 2^6 networks with 4 ips each (network/broadcast/your router's/ their router's ip) . (so basically subnetting)
The lab teacher said that they get very few ips <10 because each single ip supports up to 2^16 - 1024 which is the max number of ports you can simultaneously minus the reserved server ports so each client gets a port . (NAPT)
Which one is right is there something i don't get ? Sorry for my bad English hope you understand my question , thanks a lot :)
ISP's advertise their address range (what small chunk of the allocatable ipv4 range they have) via BGP to their peers, how they organise their internal network is entirely up to them. Some smaller isp's probably just have large arp tables then dhcp with strict lease times.
In all honesty this is quite the deep question with a lot to get into. Best bet is to youtube some ccna/ccnp content (like from anthony sequera etc) or read something like Doyles TCP/IP Vol.1 front to back.