Posted on 01/24/2010 7:00:06 AM PST by djf
I have tried and tried to find USABLE info on the meaning and use of subnet masks.
Here is my issue.
I have a local wireless DSL router. He's configed to be 192.168.0.1 locally.
All my machines that talk to it have static IP addresses assigned to them from a range starting at 192.168.0.66 upwards
Now I have some software that runs on one of the boxes sorta like VMWARE where it runs a host image. He has a hard assigned IP address of 192.168.0.100
There is packet sniffing and routing software running ON THAT BOX that allows me, from a DOS prompt, to ping 192.168.0.100 Also, from the host image software running on that box, I can successfully ping 192.168.0.70 (the ip address for that flavor of windows).
But none of my other boxes anywhere on the network know who what or where is 192.168.0.100. Neither does the main ethernet dsl router.
So I'm trying to find the right (if there even is one) ROUTE command that I can enter on Box X that tells him "Listen: if you get a request for 192.168.0.100, the route for it is through 192.168.0.70"
I have searched in vain through the internet to find a page that gives a simple explanation of route masks, but it's been a total waste. I UNDERSTAND binary arithmetic!!
WHEN does he use a routing mask? WHAT is the input and WHAT IS THE SIGNIFICANCE of the output.
No matter what I try to enter on a ROUTE command I keep getting DESTINATION is the same as the Start or some such rubbish!!!
ARGHHHHH!!!
TIA!
Simple solution, set the netmask to 255.255.0.0 on all hosts in your network.
djf, do you really mean to route your addresses? I ask, because I think that your addresses are defined as non-routable. So there would theoretically no way for a router to route them.
Not to be picky but a mask of 255.255.255.248 allows 6 usable addresses....255.255.255.252 would allow for only a couple (2). A subnet mask is used ONLY by the local host (computer, router, whatever) when it has a IP packet to send - it uses the mask to make it’s one routing decision - (1) does this packet have a destination address for devices on my local network - if so it will “flood” out a query packets to all local devices asking “who has this IP address” or (2) this packet is not meant for anyone on my local network and therefore I will send this packet to may default gateway (typically your router). That is the only purpose for the mask - is a packet that I need to send out my interface local or not).....
Do you mean route in an active sense, as in “if you get this address send it to ABC to let him figure it out”, or do you mean route in a passive sense, as in like the results from a tracerte command?
There’s a good reason 9 out of 10 network engineers will tell you if they were to redesign the internet, they’d chuck ethernet/tcpip in the dumpster...
It’s Hardware!
No! It’s Software!!!
No, actually, sometimes it IS hardware!!!
ARRRRGGGGHHHHHHHH!!!!!
If you want to do that, you’ll need to either split 192.168.0.0/24 into two /28 subnets, or create another /24 for the machines you don’t want using the default gateway.
Sure, you could use the route command and make those routes persistent, but you’re going to hate life when you want to add hosts later on or if you need someone else to make sense of your home network.
On my main home pc I run linux - I have a “VM” type app called VirtualBox installed that allows me to install a virtual Windows XP. The XP thinks his network is 10.0.2.0 - in this virtual enviroment. This VM XP can ping devices on my 192.168.1.0 network - my router, my mythtv, VOIP box, etc - but this is possible because my Linux computer NATs the XP source address (10.0.2.15) to the linux interface address (192.168.1.111). But that only works for traffic origination from the XP VM - if I’m on my mythtv computer - and try to ping to 10.0.2.15 - that packet will get sent to the router. I would have to have a static route on my mythtv computer essentially saying for any packets going to 10.0.2.0 send them to 192.168.1.111....and to muddle the process more - the 192.168.1.111 - when he received that packet - would think that it was for him - he would not know that it was for the XP device. VirtualBox has some way to handle that case - but in the default install - which is what I using - that’s the way it works. I think VMware does things differently - not sure...
This whole deal MIGHT work if I have multiple gateways.
A big part of the problem here is there are a bunch of unknowns (like what does a box do with packet XYZ destined for IP address A.B.C.D if he doesn’t have any idea of where A.B.C.D is?
Does he just toss it over to the Gateway and say “not my problem...”
See what I mean, there is alot of default actions that I’m not sure of.
BTW, I had my first comp job in 1076. And it wasn’t data entry...
;-)
Thanks for the clarification on my sloppy use of the word “couple”. I meant only a limited number, but I did forget what it actually calculated to, and got lazy. FR is amazing in that nothing ever slips by!
However, let me get picky with you. Your statement “that is the only purpose for the mask” is correct from the viewpoint of the operation of the local device. However, from the viewpoint of setting up and designing local networks, the mask is used to establish the overall architecture. Do I have one network, or do I have multiple networks connected by routers? And when you go beyond one network the mask is essential in implementing the design.
If I read it, I wouldn't understand it.
Your question borders on the kinds of things I am trying to find out.
I sit at a DOS prompt and type “PING A.B.C.D”
The machine I’m on does not have A.B.C.D in his routing table.
Does my machine just hand it to the gateway? I don’t think so. Somehow, he does something with this magical “mask”.
What? What exactly? And how does the result affect what he does with the packet?
I need a freakin flowchart...
See reply # 23, how it works is defined very well there.
It uses the subnet mask to decide if the address is on the “local” network or a remote network. If it is not on the local network, it sends it to the DEFAULT gateway.
Ah Ha!
Light bulb moment! Thank you both very much.
I may need to define my virtual machine as something that looks more like a remote network.
I meant “route” in the sense of “If I get this destination address on an incoming packet I’ll send it out that particular port over there, which I have been told, or have figured out on my own, is where it should go.”
Did you have to learn French from the Normans in order to find work?
≤}B^)
Lol!
Guess I’m more of a geezer than even I realized...!
pfl
When confronted with a problem of this type, I simply call the 1-800 number on the box and let the Philipino walk me through it. It’s their job, so they’re good at it.
I don’t speak linux. Working with Win2K machines.
Just to experiment, I have a second network adapter on my machine A which is running the virtual machine I am trying to ping (I mean ping from another machine on my wireless net).
So now machine A has:
One net adapter, assigned 192.168.0.70, with a gateway of 192.168.0.1 and a DNS of 192.168.0.1, this is the wireless network
A second network adapter, assigned 10.1.66.20, which is TUNTAP’d to the virtual machine, whose home address is 10.1.66.40
On machine A I can PING 10.1.66.40 fine
On machine B, I did a
Route ADD 10.1.66.20 mask 255.255.255.255 192.168.0.70
From machine B I can ping 10.1.66.20 just fine
But I still cannot ping 10.1.66.40 from machine B no matter what. I even went in and did a REGEDIT on machine A and turned on IPRouteEnable.
It’s driving me freakin nuts. I just need simple answers to simple questions. What does machine A do with a packet if it’s not for him? WTF does it mean for something to be a “GATEWAY” (I thought that it meant it was sort of a default like if something is not for me I put it to the gateway and let him handle it, but that appears to not be the case)
What happens if the gateway definitions don’t line up with the route tables?
If the software on machine A gets a packet, does he send it to a hardware address or to software on the other side of the hardware?
TCPIP is the klugiest pile of crap I ever saw. And I’ve been in the business long enough to see some pretty big steaming piles.
Is the whole dam thing set up to be network-to-network, or peer-to-peer? Or both?
ARRRRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHH!!!!
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.