wan ip address vs default gatway ip address

Discussion in 'other security issues & news' started by wutsup, Oct 1, 2010.

Thread Status:
Not open for further replies.
  1. wutsup

    wutsup Registered Member

    Joined:
    Sep 20, 2009
    Posts:
    630
    Location:
    United States
    hey wilders,

    i was just looking at my router's status page under the WAN section.

    and i noticed that the WAN ip address(public ip given to me by ISP) is very similar to the default gateway ip address. the only digit that is different is the last one.

    is this normal?
     
  2. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    As an example..

    A typical home router is really a gateway to the internet for the home computers. A router might be assigned the IP address of 192.168.1.1. That is its local address. In your network settings on your computer, your gateway would be 192.168.1.1 - it needs to point to the gateway to the internet, which is your router. You network adapter will then be above that, but in the same segment normally, such as 192.168.1.100.

    When you look at your router, you are seeing either a WAN (wide area network aka the internet) or a local network that is belonging to your ISP. So for example...

    Your ISP has you on a network block starting at 2.2.2.1. Your IP assigned by them is lets say 2.2.2.122. This is the IP your router uses for your address in the world. Your router must know, what is the gateway it uses at the ISP to get out to the world. In this example it would be 2.2.2.1. The segments can be much larger. Here is an actual example of an IP a router uses 174.44.14.100. But it uses (notice it is lower) a gateway of 174.44.12.24.

    Now lets give another example. Suppose that your ISP has only 10 WAN IP addresses it can use. Two of them, lets say 2.2.2.1 and 2.2.2.2 are going to be gateways to the world. Lets say that they use the remaining IPs, 2.2.2.3 - 2.2.2.10 for DNS servers or something. Since this ISP only has 2 useable pipes for thier customers, they decide to build an "internal" network. So, they create a network with the IPs from 3.3.3.1 to 3.3.3.254. Your router at home then will be assigned one of the, lets say 3.3.3.100. That is your IP, although it only goes to the "internal" network at the ISP. The gateway for your router would then be 3.3.3.1, which is where the router needs to send data to get to the ISP. Becuase that 3.3.3.x network is "internal" to the ISP, it cannot get outside unless it has a gateway use - the gateway to the interent. So it might use 2.2.2.1 or 2.2.2.2, which are live pipes to the internet.

    When you use online tools to see something like "what is my ip", you might find that the actual IP it returns is 2.2.2.1 (the real pipe the ISP uses) but your router shows its ip as 3.3.3.100. It may confuse you, until you realize what is going on.

    These are just example numbers BTW, and a very simplistic example. Don't confuse this with what you would really see ;)

    Sul.
     
  3. wutsup

    wutsup Registered Member

    Joined:
    Sep 20, 2009
    Posts:
    630
    Location:
    United States
    ok thx for the info, but is the default gateway ip address and public(WAN, ip address give to me by ISP) ip address suppose to be really similar?
     
  4. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    Umm...

    A subnet is a range of ip addresses, from 1 to 254.
    192.168.1.0 is a subnet.
    You can have an ip address in this subnet starting at 192.168.1.1 up to 192.168.1.254.

    When you are assigned an ip address by your ISP, it is common practice to use a gateway.
    A gateway is the door to the internet. Your router gets an ip address but must use the gateway to get out of the ISP and onto the internet.

    It is very common for the gateway to be the very first node of the subnet, so 192.168.1.1. It doesn't have to be, but it is common.
    If you ISP has a subnet, lets call it 177.10.10.0, normally the gateway would be 177.10.10.1. The remaining ip addresses could be used for clients of the ISP.. you. You might have gotten the ip address 177.10.10.2. If this were the case, then yes, your ip address would be very close to the gateway.
    If you had signed up with the ISP a month later, your ip address might have been 177.10.10.250, which is not very close at all to the gateways ip address of 177.10.10.1.

    Are they supposed to be similar? The first three combinations of numbers generally are the same, so yes they are similar. The last set of numbers, it all depends.

    Which set of octets do you think are similar? Do you mean that 10.10.9.x is similar to 10.10.9.x? Or do you mean 10.10.9.5 is similar to 10.10.3.5? There is a vast difference between the two. BTW, an octet is the set of numbers, each separated by a period. So an ip address has 4 octets ( octet . octet . octet . octet ).

    HTH.

    Sul.
     
  5. wutsup

    wutsup Registered Member

    Joined:
    Sep 20, 2009
    Posts:
    630
    Location:
    United States
    im not talking about LAN, im talking about WAN.

    my wan(isp provided ip address, public) ip address is similar to the default gateway ip address in my router status page. this is all in the "WAN" section. not in the LAN. there is no default gateway ip address in the LAN section.

    its like this:

    wan ip address - xx.xxx.xxx.xxx

    default gateway ip address - xx.xxx.xxx.x

    the second to last x in the default gateway is the only digit that is different from the wan ip address.
     
  6. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    The examples I gave you apply to either LAN or WAN. No offense, but you need to do a little studying on the topic to understand it.

    With your example then and some imaginary numbers:

    Your IP = 12.100.101.12
    Your Gateway = 12.100.100.12

    It is acceptable for your gateway to be only 1 digit off your IP address. Many gateways I have seen would be 12.100.101.1. You just happen to be on a larger subnet is all.

    Sul.
     
  7. Tarnak

    Tarnak Registered Member

    Joined:
    Feb 5, 2007
    Posts:
    3,875
  8. wat0114

    wat0114 Guest

    Typically from what I've seen is the default gateway on the WAN side ends in a "1" Example of mine (I'll just change the numbers):

    Internet address (assigned to my router's WAN side) = 153.176.144.127

    Default gateway (DHCP server?) = 153.176.144.1

    Only the last octet is different.

    I think Sully just doesn't want to blurt out a stock answer. He wants to explain why, otherwise you don't really learn anything :)
     
  9. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    Well, if your net connection works with the gateway provided, and you ask a question is it supposed to be close, but don't provide the actual ips or an example, how are you supposed to answer "that looks ok"? For that matter, if it works, it must be ok, so why ask at all unless you want to know "why". At least thats how I took it.

    Sul.
     
  10. wutsup

    wutsup Registered Member

    Joined:
    Sep 20, 2009
    Posts:
    630
    Location:
    United States
    yea sorry sully, it was just a bit confusing lol.

    and to watt, the last 2 octects are different for me. but the first 2 octects are the same for wan ip and default gateway.
     
  11. wat0114

    wat0114 Guest

    Then as Sully explained, you must be on a larger subnet. This is stuff I used to know a bit better than I do now. Maybe it's time I took a refresher course on it :)

    That makes sense to me as well, and then all the better teachers/instructors I had through life didn't simply answer the question directly, but made me sweat through it in hopes I'd figure it out :)
     
  12. wutsup

    wutsup Registered Member

    Joined:
    Sep 20, 2009
    Posts:
    630
    Location:
    United States
    ok thx sully and watt

    but since im on a larger subnet, cause the last 2 octets in my wan ip address and default gateway address are different. is that normal and safe? lets say compared to someone who has only i 1 octet that is different.
     
  13. wat0114

    wat0114 Guest

    It just means your sharing the channel with more people, so as long as your ISP has the bandwidth to handle the number of subscribers on it, you should be okay. At least that's the way I see it, not as a security concern.
     
  14. wutsup

    wutsup Registered Member

    Joined:
    Sep 20, 2009
    Posts:
    630
    Location:
    United States
    oh ok so its not a security problem?
     
Loading...
Thread Status:
Not open for further replies.