On Wed, 31 Jan 2001, Dave Williams wrote:
Dan
Is this possible?
Presumably, yes. But why can't you keep using 172.19.50.x, but with a subnet mask of 255.255.252.0?
The LEA allocated this range and the others in 172.19.x.y are used by other local schools. We all access an LEA proxy so I'd rather use something different.
Ah. Okay.
This will allow you to have 172.19.48.0 -> 172.19.51.255
I'm confused here - I thought 255.255.252.0 would leave 172.19.0.0 to 172.19.3.255
It *could* do, but not necessarily :-) Okay, beginners' guide to Subnet Masking, even though it's late and I should be in bed. Put simply, the Subnet mask placed a restriction on the range of IP addresses available. It defines the "unchangeable" portion of an IP address. So, using binary numbers: Your IP address was 172.19.50.0, which in binary would become: 10101100.00010011.00110010.00000000 Your proposed subnet mask would be in binary: 11111111.11111111.11111100.00000000 The 1s here define the unchangeable part of the IP address, so it'll become: 10101100.00010011.001100xy.* Now the .* you know can be any number between 0 and 255. The interesting bit will be the x & y. This can take the values of 00, 01, 10 and 11. If they're both 0, that bit of the IP address become 00110000, or 48 in decimal (hence, 172.19.48.*). If they're both one, it become 51 decimal (hence, 172.19.51.*). Making sense so far? Now, of course, you could put any values into that 3rd byte of the IP address, so you'll end up with a range of addresses, going like: 172.19.0.* -> 172.19.3.* 172.19.4.* -> 172.19.7.* 172.19.8.* -> 172.19.11.* and so on. Does that make any sense, or should I try explaining slightly better when I'm more awake?
What does "route -n" give?
root@derby:/home/dw > route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.19.50.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 172.16.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0
Seems okay if you've only got one network card. Would it be possible to put a second network card in? It might work better, possibly, or be easier to set up? (Just a suggestion).
And then I'd presume you'd have to set up the clients to say that if the need to access 172.19.50.0/255.255.255.0, they should route to 172.19.50.2,
How would I do this?
If you're using Linux, something fairly similar to "route add -net 172.19.50.0 netmask 255.255.255.0 gw 172.19.50.2". Under Windows, I'm not so sure; I haven't played with it.
otherwise go to your default gateway (whatever that may be; usually an Internet gateway).
The gateway on each client is set to the relevant IP on Derby.
Good. Sounds fair enough.
Am I trying something silly and if not what other steps do I need?
How about "route add 172.16.0.2 netmask 255.255.252.0 dev eth0:1". Or something similar?
This gives the error "netmask doesn't make sense with host route"
Ah, yes. Whoopsy. It should have been "172.16.0.0", otherwise it'll treat it as an IP address, rather than a network address.
Thanks again
No problem :) It's what I'm (usually lurking) on this list for. Dan -- dankolb@ox.compsoc.net Oxford University Computer Society Secretary --I reserve the right to be completely wrong about any comments or opinions expressed; don't trust everything you read above--