3

I just purchased a static IP from my ISP. The tech installed a cable modem and gave me some information:

IP Address: 1.2.3.61
Gateway:    1.2.3.62
Subnet Mask 255.255.255.252

I could mindlessly transcribe this stuff into my server, but I want to better understand what these mean. Questions:

  1. What is the IP address of my cable modem?
  2. What is the IP address of my wireless router, directly connected to my cable modem?
  3. Is the gateway a machine I control or is that a remote machine controlled by my ISP?

As you can see, I'm having difficulty conceptualizing how the IPs are assigned to the network devices in my home. Insight would be greatly appreciated!

Update:

The tech was wrong: 1.2.3.62 was not my gateway. 1.2.3.62 is my static IP (which matches the whatismyip.com reported IP), and my 1.2.3.61 is my subnet's gateway (on Comcast equipment). The cable modem they required me to lease defaults to a NAT box and DHCP router using the 10.0.0.0/8 non-routeable address range. The Comcast Business Class cable modem has a web interface; comcast support will supply customers with a username and password to configure the modem appropriately.

3
  • IPs in your LAN will be assigned from the DHCP of your router which I can only assume has something like this 192.168.1.1 as an IP. To find IP of your router you should run ipconfig/all and see what the gateway IP address is, that address is your router's address.
    – Darius
    Aug 22, 2012 at 16:05
  • @Darius ipconfig/all shows a gateway of 192.168.2.1 (ie, a non-routable address), which doesn't help me. I want to know what my router's public IP is.
    – Fixee
    Aug 22, 2012 at 16:20
  • Type in that address in your preferred browser and head to the WAN settings. The info that your ISP has provided you can be entered there. The LAN info still stands I as said before unless your server is acting a DHCP.
    – Darius
    Aug 22, 2012 at 16:23

3 Answers 3

5

Quick Answers:

  1. 1.2.3.61
  2. Unknown with the information given. It is likely DHCP assigned by the cable modem.
  3. You don't likely control the gateway.

Derived from the information provided in your question:

  • A netmask of /30 (255.255.255.252) gives a network of 2 usable IP addresses + a network address and a broadcast address. These two addresses are your cable modem and your gateway.

Assumed based on the information provided:

  • The ISP provided cable modem is a switch/router with 1 or more LAN/RJ45 connections. It provides access to the Internet via NAT/PAT (Network Address Translation/Port Address Translation). It is also likely a DHCP server. Plug a computer set to obtain a DHCP lease into the cable modem. Take a look at the details of the network connection.

  • If you plug a router into the cable modem, you'll likely be double NAT'ing the connection. This will not break anything but it will add a layer of complexity which could be confusing if you're trying to provide access to a Web Server (or other service) on your home LAN.

You should look into the following topics to fully understand this:

EDIT:

Another possibility which I overlooked in my original answer is that the device you're calling a cable modem is actually a bridge. If the device the technician installed is actually a bridge, then you'll need to plug the WAN connection of your router into the bridge and enter the connection details provided by the technician for your wireless router WAN configuration. In all cases, your external IP address will be 1.2.3.61 and your home LAN will have RFC1918 addresses with Internet access provided via NAT.

11
  • This is what I thought; something has me confused: whatismyip.com shows 1.2.3.62 (ie, the gateway IP). Doesn't this mean my ISP gateway is rewriting its IP addr in the outgoing packet? Doesn't that mean I can't route to my home network?
    – Fixee
    Aug 22, 2012 at 16:32
  • I think your edited scenario must be the correct one since an RFC1918 address assigned to my router would prevent my server inside the DMZ from being reached from the outside. I still don't understand why my externally-reported IP is that of the gateway, however.
    – Fixee
    Aug 22, 2012 at 16:39
  • Do you have a link to the service you purchased from the ISP?
    – Sean C.
    Aug 22, 2012 at 16:42
  • I viewed business.comcast.com/smb/services/Internet/ipaddress and then called to request a static IP.
    – Fixee
    Aug 22, 2012 at 16:54
  • Do you have access to a computer with Internet connectivity but not using this new Internet connection?
    – Sean C.
    Aug 22, 2012 at 17:00
1

IP Address : Most likely the static (dynamic with most ISP) IP provided by your cable modem

Gateway : Your ISP router

Subnet Mask : Define the IP address pool available in your subnet

If you have a built in router in your cable modem, then the "IP Adress" above is given to it. As for how your home devices are connected to that, the cable modem's router will give private IP address (on the range 192.168.x.x for example) on your home side, while on the internet side it communicates with the public IP.

0

The ip address that you have posted is not the static ip you have purchased. Before I start talking about the static ip, I should explain to you somethings regarding ips.

First of all, the address you have linked to, is your local network ip address. This may be static (your router or otherwise dhcp server may be assigning you the same internal network address) or dynamic (meaning that it changes between set intervals, or that it changes everytime your computer logs in and out of the network). That ip address is only useful to you if you would like your computer to communicate with other computers in the SAME network (be it a home network, or an enterprise network). Other than that, that ip address is only useful to you when you might want to set up port forwarding in your router. Your router is the only device that makes heavy usage of your ip address during an activity called NAT.

Secondly the public Ip address (which is what you are seeking), is what your router is using, in order for your internal network to be able to communicate with the Internet. The public Ip address may too, be dynamic (changing at set intervals, or at certain events, like resetting your router etc), or static (which is what you have bought). Static means, that if your network's ip is something like, (example) 143.72.94.54 it will stay like this, for as long as you have agreed with your ISP. This is certainly a convenience, as you know where your network is, and you can access the computers from any part of the world, using that IP address. For instance, you might be able to remote connect via SSH to do some administration to a computer inside your network.

Right now, you should have a question: What if I have several computers inside my network? What if I have 5 computers, all connected to the internet. And most importantly, how do packets reach them, If I only have one Ip address, and several computers listening on the same port?

And that takes me to the part where I explain NAT. NAT is an acronym for Network Address Translation. NATing is an activity your router uses to multiplex several computers connectivity and allow them to use network services simultaneously. For instance, let's say that you have 3 computers that are using a web browser and are accessing several web pages each time. How do the web servers know which computer asked for each website? SPOILER: They don't. What happens is that your router translates each computer's port and internal ip to a unique public port and ip address.

For a better explained example, look at the following:

Let's suppose you have a network with public ip 143.72.94.54, 3 computers, each with its own internal ip, and suppose that each one of them is using port 32 to access a web page

- Computer a: 192.168.1.2 : 32 -> http request to www.facebook.com -> 143.72.94.54:32 (?)
 - Computer b: 192.168.1.3 : 32 -> http request to www.superuser.com -> 143.72.94.54:32 (?)
 - Computer c: 192.168.1.3 : 32 -> http request to www.youtube.com -> 143.72.94.54:32 (?)

Since your network has only one ip, communication would seem impossible as all computers would race to get access to port 32 of the router, and only one of them could use it. So two of the computers would not get access to the required service.

That's where NAT steps in and translates internal ip addresses to external ones like this (and vice versa, of course):

 - Computer a: 192.168.1.2 : 32 -> http request to www.facebook.com -> 143.72.94.54:64
 - Computer b: 192.168.1.3 : 32 -> http request to www.superuser.com -> 143.72.94.54:876
 - Computer c: 192.168.1.3 : 32 -> http request to www.youtube.com -> 143.72.94.54:987

Now all computers can have reliable services.

Now regarding your questions:

  1. You should be able to see your ip (and some more info): here
  2. This is the modem address, and the address your router uses to route packets outside your local network. The ip address your router uses for internal network communications commonly is something like: 192.168.1.1 EDIT: In your case it appears to be 1.2.3.62.
  3. There are 2 levels of gateways, local (your router perhaps) and remote (your isp's routers)

Hope that helped.

2
  • This is a wonderful post with lots of detail, but it's all about NAT. I understand NAT perfectly well, I just don't understand which IPs are assigned where in my home network.
    – Fixee
    Aug 22, 2012 at 16:33
  • 1
    You can learn this either from inside the clients, using network configuration commands, (ipconfig and ifconfig quickly come to mind), and/or via your routers web interface. Aug 22, 2012 at 16:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .