View Full Version : Mapping IP Block to Assigned static IP
mattwood
26-05-2003, 12:05 PM
Hello everyone,
I recently signed up for the 256/64 package, and have been assigned IP address 202.154.113.104. I also purchased a block of 4 IP addresses so I could run a web server etc, and was assigned the range 202.154.104.156/30 (ie .157 and .158 being usable addresses).
I can get out to the internet via my 202.154.113.104 address with no problem, and I am loving my new found speed! However, I have not yet been able to get my web server to be visible on the internet just yet and have a question about the net mask that should be used.
I have a Sonicwall firewall with a DMZ port. I have my PC connected to the LAN port and am using a 192.168.2.X address plan. My assigned static IP address is configured on the WAN port. And my web server with address 202.154.104.157 is on the DMZ port.
Now, the Sonicwall picks up address 202.154.96.169 as the gateway when I connect to Swiftel.
So, in order to pick up the addresses I have been assigned (202.154.113.104 and 202.154.104.156/30) as well as the gateway router (202.154.96.169) I need to have a netmask of 255.255.224.0. Seems awfully large to me??
Anyone else out there bought and extra "block" of public IPs to use in conjection with their assigned Static IP address? Do you have the same large netmask set as me?
Thanks,
Matt
Sadin
26-05-2003, 12:24 PM
Something is wrong. How are you picking up these additional addresses? To pick them up automatically you and swiftel must be running some sort of routing protocol and if that is the case something must be misconfigured. Easiest thing to do would be to manually configure the address of your DMZ port to .157 and put your webserver on .158.
I think the reason why the netmask is so huge is because it is trying to encompass all of the addresses you quoted in your post:
i.e. 202.154.96.x 202.154.156.x 202.154.113.x
Some routers also won't let you see your other IPs from the inside of your lan. You may need to ask someone else to try to connect to your web server etc.
DSL_Tech
16-06-2003, 11:24 AM
Originally posted by mattwood
So, in order to pick up the addresses I have been assigned (202.154.113.104 and 202.154.104.156/30) as well as the gateway router (202.154.96.169) I need to have a netmask of 255.255.224.0. Seems awfully large to me??
Matt
The static IP address is a /32, the subnet block assigned is a /30. They are not meant to be part of a contiguous net block.
This is how we route the subnet to you, which may help to clarify:
ip route 202.154.104.156 255.255.255.252 202.154.113.104
You only need to know the gateway address as a host address for your default route, that also does not need to be included in any net block.
Sadin
16-06-2003, 12:07 PM
Do you guys run (have option of running) any dynamic routing protocols w/regards to these additional IP addresses?
DSL_Tech
16-06-2003, 12:58 PM
Originally posted by Sadin
Do you guys run (have option of running) any dynamic routing protocols w/regards to these additional IP addresses?
We do that for some of our corporate customers who use our ADSL/ISDN auto-failover product. So the general answer is not unless there is a very good reason.
Can you expand on that - in what circumstances would you see is as necessary? Would you want all that ospf chatter?
Sadin
16-06-2003, 01:46 PM
The only reason why I'd think of doing this in the (distant) future would be multi-homing. (preferrably on something like reliable wireless/something other than ADSL in case ADSL goes down)
Right now the reason I asked was just to confirm that I wouldn't need to setup anything "fancy" to get my ordered IPs working. :) ("fancy"="gated", since I dont have a "new-n-fancy" adsl modem/router that does some of these routing protocols and use linux for all the routing/fw)
Thanks for the confirmation btw.
whoozle
16-06-2003, 05:57 PM
Originally posted by DSL_Tech
You only need to know the gateway address as a host address for your default route, that also does not need to be included in any net block.
Ok...can someone explain why in some cases you would need the gateway to be in the same net block, and in other cases you don't? I've noticed for dial-up, the gateway isn't in the same netblock (as I'm given a /32 subnet), but say, in LANs, you have to be part of the same subnet as the gateway, otherwise, how will you contact the gateway?
A little confused here...
DSL_Tech
16-06-2003, 06:58 PM
Originally posted by whoozle
Ok...I've noticed for dial-up, the gateway isn't in the same netblock (as I'm given a /32 subnet), but say, in LANs, you have to be part of the same subnet as the gateway, otherwise, how will you contact the gateway?
With a PPP circuit the gateway and your router are actually is in the same netblock - their own /32 netblock, our LNS (gateway) sees your router as a /32 host directly connected and your router sees our LNS as a /32 host directly connected. This works because each device performs a routing function, which by definition enables it to reach to addresses other than it's own.
On the other hand, your PC on a LAN generally isn't a routing device, so it needs to sit on the same subnet as the gateway router.
whoozle
16-06-2003, 09:13 PM
I see...thanks very much for the explanation.
Zoolander
17-06-2003, 01:58 PM
I'm wondering, if I use my modem to pass my static IP on directly will I then be able to use all 4 ip adresses if I purchase some ?
What i'm saying is at the moment i've set up my alcatel modem so my ethernet address is my static swiftel address, if I purchase a block of ips will I just be able to do the same process as I did with the static ip and use all 4 ? Or will I have to use the limited netmask ?
DSL_Tech
17-06-2003, 02:54 PM
Originally posted by Zoolander
What i'm saying is at the moment i've set up my alcatel modem so my enternet address is my static swiftel address, if I purchase a block of ips will I just be able to do the same process as I did with the static ip and use all 4 ? Or will I have to use the limited netmask ?
There is no reason you couldn't route the /30 as 4 x /32's in your own network. It makes no difference to us either way.
craigh
17-06-2003, 10:05 PM
DSL_Tech, could you please clarify something?
I've always pictured the relationship between the IP address, subnet mask and gateway as being like this:
When an IP stack needs to send a directed (i.e. not broadcast) packet, it determines whether the destination address is on the same subnet by applying (bitwise ANDing) the subnet mask to its own address and the destination address. If the destination turns out to be on the same subnet (i.e. the results of the bitwise ANDs were the same) then the packet is transmitted directly to the MAC address of the destination (retrieved via ARP), otherwise it is transmitted to the MAC address of the gateway and the gateway is then responsible for figuring out what to do with the packet from that point on.
For a multi-homed host the stack just applies this logic to all the adapters, and either the destination will be on one of the adapter subnets or it will get sent to one of the gateways.
And the "transmit" side of a router is really just another host, but one that hopefully has some clue as to which gateway a particular IP address would best be forwarded to if it is not addressed to a "local" subnet, and the "clues" are passed around via routing protocols.
Is this roughly correct? I've never actually seen a description of the process that is this simple, but I've never seen anything that contradicts this picture either.
DSL_Tech
17-06-2003, 10:49 PM
Yes, that sounds about right. The _only_ thing a host needs to know is where to send a packet if it's not on it's local subnet. And the _only_ thing a gateway or router has to know is how to get to the next hop, or to the best device for the next hop if there is more than one choice.
Both devices _can_ know a lot more that that, like putting static routes on a host to direct packets to the best gateways for further forwarding. Or like routing protocols which allow a router to 'hear' and learn the networks other routers know about.
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.