How does ISPs give out IP addresses? And how do I have 2 IP addresses?

1

I have two questions:

1) How does your ISP give you an IP address? Does it store your mac in some table and, if you disconnect and reconnect your router it gives you the same ip because it recognizes the mac address?

2) Something happened that confused me.. Apparantly we get 2 IP adresses to this apartment? This is how the routers and things are set up:

enter image description here

Somehow I'm getting 2 different external IP adresses?? I'm only paying for 1..?

user1021085

Posted 2013-08-28T22:28:31.357

Reputation: 129

By switch do you mean a modem - or modem+router built in? If it is indeed a switch, is it an smart or dumb switch? – nerdwaller – 2013-08-28T22:36:46.850

It is a switch. I'm quite sure it's a 'dumb' switch but I can't verify that at the moment. – user1021085 – 2013-08-28T22:56:37.673

Are you sure the switch isn't operating as a "NAT"? – Tom Wright – 2013-08-28T23:01:39.063

The two laptops get the same ip(66.66.66.66) when I visit "What's my ip?" websites. They also would get 88.88.88.88 as ip if that were the case, right? – user1021085 – 2013-08-28T23:05:36.880

What do you see on the What is my IP page is your external IP address. If you see the same address from all of your devices that means you have one external IP. You can call your provider and sort it out. Your provider knows what is addressing scheme being used. Is it DHCP which gives different addresses every time or DHCP with static leases. Just call your tech support and ask them. – VL-80 – 2013-08-28T23:22:50.077

What's "behind" the port in the wall? Is there a modem, router, or some other device back there, or does it connect directly to the ISP (this seems unlikely)? – ernie – 2013-08-28T23:48:36.930

I would assume isp, it's the closest thing I can get to my isp. It's where I connect to the internet. Last apartment was the same way. – user1021085 – 2013-08-28T23:53:00.597

Answers

0

1) Your ISP gives you an IP address via DHCP. They have pools dedicated to their customers, and IPs are leased out to customers from them for a certain period of time. During that time, if the same client (determined by MAC address) tries to acquire an IP again, they are given the same one. This same principle also is how your router gives local IPs to your wireless clients.

2) I'm not too sure on your setup, but I think you have a dumb switch uplinking to your port in the wall, then your router is dialling into your ISP and acquiring an external IP, then PC A is also dialling into the ISP, in order to connect to the internet. I'm guessing your ISP probably isn't actually checking if you are getting more than one IP from them. Out of curiosity, what is your ISP?

abc_harold

Posted 2013-08-28T22:28:31.357

Reputation: 36

So if I took my laptop and took the ethernet cable out of PC A and into one of the laptops, it would get a new IP address(not 66.66.66.66 or 88.88.88.88)? The ISP is Bredband2, in Sweden. – user1021085 – 2013-08-28T23:09:05.723

I believe that you would, but I think that PC A is using dialup somewhere along the line. Is the Ethernet port in the wall the same one that you plug your telephone into? And also, what IP does PC A show when you visit a what's my IP site. It could be that your switch is providing NAT, like @Tom said. – abc_harold – 2013-08-28T23:35:28.403

PC A shows 88.88.88.88 on "what is my ip" sites. The laptops show 66.66.66.66. Ethernet same one as I plug my phone into? Is that even possible? Doesn't it have it's own port? I believe there's some port right next to the ethernet port too. Don't have access too it at the moment as someone's sleeping in there. – user1021085 – 2013-08-28T23:44:36.217

PC A and into one of the laptops, it would get a new IP address(not 66.66.66.66 or 88.88.88.88)? No, DHCP is assigned by MAC address. If the same DHCP server is giving both address with will give the same IP to the same MAC address for as long as it has a lease available for it. – Austin T French – 2013-08-29T00:01:24.533

The laptops are in the LAN, so havn't gottena lease from isp. only from the router – user1021085 – 2013-08-29T00:06:55.610

Previously I thought that the Ethernet port mentioned was a phone port that you would plug a filter into, but I think you have a fibre solution that has an Ethernet port and phone socket. PC A is directly facing the internet then, and your router is separate. On both devices I think the username and password to authenticate to the ISP's network is the same. They should then be able to pick up on the fact that you are using 2 IPs, but if you aren't being charged extra for them, maybe your ISP doesn't care how many IPs you use? Just keep an eye out for any additional charges on your bill. – abc_harold – 2013-08-29T00:23:05.990

@AthomSfere OP commented 'took the cable out of PC A into a laptop'. The laptop would have a lease from the router not from the ISP. – abc_harold – 2013-08-29T00:29:45.933

@abc_harold I don't seem to need a username/password. My router has the "Does your Internet connection require a login?" checked as "No". How does my isp know which ip that's assigned to me then? – user1021085 – 2013-08-29T00:29:55.610

They still know who you are because of where the data physically comes from. We have ADSL from British Telecoms, and we just use the generic username and password, but we can still track our account at bt.com. As it's all implemented through the phone line, they know which customers are us. – abc_harold – 2013-08-29T00:44:33.423