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!
If you use a network mask of 255.255.255.0, then a total of 254 host ID's are addressable on any arbitrary network using the last octet. A subnet utilizes the mathematical bitwise operator AND. For the default private class C addressing scheme, any network ID that is returned after the subnet mask bitwise AND operator 255.255.255 that equals 192.168.0 is on the same network; any OTHER network ID will be a different network and will require a router to handle the packets addressed to it.
For example, 192.168.1 is on a different network than 192.168.0. If the subnet mask implemented is 255.255.255.0, then 254 hosts can exist on each of 254 seperate networks. A packet addressed to 192.168.1.10 from any host on network 192.168.0 gets sent by the router (192.168.0.1) to the router handling that network, i.e. 192.168.1.1. 192.168.0.1 knows to do that, because 192.168.1.10 is not in his domain.
If I utlize subnet mask 255.255.255.248, then I have 6 hosts avaialable on each of 8190 networks. I can use class A addressing of 10.10.10 if I'd like, but the last octet is tricky because its sharing network ID & host ID simultaneously. 248 translates to 11111000. And so any combination of 1 or 0 for the first 5 bits are available for network ID, while only the last three bits are avaialable for host ID.
28 bits translates to 256 combinations. However, 0 (all bits in the octet off) is reserved for the network address, and 255 (all bits in the octet on) is reserved for the broadcast address; two network IDs for each network are unuseable.
Your VM host machine has network ID of 192.168.0.70. That is the real network ID for the network adapter (NIC). The VM itself is configured with a virtual network adapter having a network address of 192.168.0.100. The VM should be able to ping itself, 127.0.0.1 (or 0.0.0.0), as the local loopback address. It should also be able to see 192.168.0.70 without any issues.
Any other host on the network, including the router, e.g., 192.168.0.1, should be able to see 192.168.0.70. However, NOBODY else is going to know what 192.168.0.100 is; as far as they're concerned it doesn't exist. Depending on how you configure the VM, will depend on the network resources available to 192.168.0.100.
When you use "host-only networking" on the VM, a network connection between the virtual machine and the host computer, using a virtual Ethernet adapter that is visible to the host operating system. This approach can be useful if you need to set up an isolated virtual network.
If you use host-only networking, your virtual machine and the host virtual adapter are connected to a private TCP/IP network. Addresses on this network are provided by the VMware DHCP server.
If you want to connect to the Internet or other TCP/IP network using the host computers dial-up networking or broadband connection and you are not able to give your virtual machine an IP address on the external network, NAT is often the easiest way to give your virtual machine access to that network. However your virtual machine will not have its own IP address on the external network when implementing NAT on the VM. Instead, a separate private network is set up on the host computer. Your virtual machine gets an address on that network from the VMware virtual DHCP server. The VMware NAT device passes network data between one or more virtual machines and the external network. It identifies incoming data packets intended for each virtual machine and sends them to the correct destination.
Bridged networking is often the easiest way to give your virtual machine access to the network when your host computer is on an Ethernet network. On a Windows host, you can use bridged networking to connect to either a wired or a wireless network. On a Linux host, you can use bridged networking to connect to a wired network.
If you use bridged networking, your virtual machine needs to have its own identity on the network. For example, on a TCP/IP network, the virtual machine needs its own IP address. Your network administrator can tell you whether IP addresses are available for your virtual machine and what networking settings you should use in the guest operating system. Generally, your guest operating system can acquire an IP address and other network details automatically from a DHCP server. You might need to set the IP address and other details manually in the guest operating system.
Using bridged networking enables the virtual machine to be a full participant in the network. It has access to other machines on the network and can be contacted by other machines on the network as if it were a physical computer on the network.
If the host computer is set up to boot multiple operating systems and you run one or more of them in virtual machines, you need to configure each operating system with a unique network address. People who boot multiple operating systems often assign all systems the same address, since they assume only one operating system will run at a time. If you use one or more of the operating systems in a virtual machine, this assumption is no longer true.
Thanks.
A comprehensive and informative reply.
I think part of my issue may be hampered by the fact I am using win2K.
By default, win2k doesn’t do any of the software routing stuff. I went in and REGEDIT’d it so that IPEnableRouting is turned on.
But there is another part, one of the system services a routing snapin of sorts, that I can’t find a clue out about how to actually USE it, I turned it on using Admin Tools, but can’t find any way how to tweak the settings once it’s started.
My idea has always been:
Machine A is 192.168.0.70 and runs VM 192.168.0.100
Machine B is 192.168.0.66 and can ping 192.168.0.70 quite ok.
Making NO CHANGES, I cannot ping 192.168.0.100 from machine B.
If I do this on B:
Route Add 192.168.0.100 mask 255.255.255.0 192.168.0.70
then does that not mean if I do a PING from machine B to 192.168.0.100, he knows enough to send it to 192.168.0.70
What does 192.168.0.70 do with it? I am assuming he at least looks at it and says, hey, this is for somebody else, not me... does he trash it without routing turned on? I added 192.168.0.100 to the routing table on 192.168.0.70 but it still didn’t get there, and I can only assume it’s because machine A doesn’t have all the router snapin stuff set up to serve as a router. Leave it to Microsoft to put in like 12 options that seem to possibly conflict with each other or override...
Anyways, thanks, if you have any ideas about what I just described, lemme know. I searched the internet far and wide and still couldn’t find out how to use that dm snapin thingie!
The class C address 192.168.0 with subnet mask of 255.255.255.0 will yield 254 host ID's on that network ID; 0 and 256 are reserved for network & broadcast IP addressing. The host ID's run from 1 through 255; given that host ID 1 is reserved (by convention) for the gateway, 192.168.0.100 is a legit host ID on the network 192.168.0.0.
I don't know what, if anything, intrinsic Win2k IP routing capability has to do with anything here. You're trying to implement NAT with the ROUTE command (that's just not right). Fundamentally all IP addresses boil down to MAC addressing. It doesn't matter how the IP addresses are assigned to particular nodes, i.e., APIPA, DHCP or static. What matters is that the gateway is aware of the nodes that exist on the network its serving. In most cases VM hosts will support multiple vms; this is especially true when running VM's on a laptop (where each vm needs a unique IP address on any arbitrary LAN). Given that laptops are portable, it is very desirable that a vmware network setup should have several key features:
[source: VMware Server Virtual Network Architecture]
- Bridged networking Although bridged virtual machines use the physical network connections on the host system, each virtual machine is treated as an independent client on the network. As such it will obtain an IP address from the network's DHCP server, or will require a static IP address to be manually configured if DHCP is not used. Virtual machines using bridged networking will be able to communicate directly with both the host system and other clients on the network to which the host is connected.
- Network address translation (NAT) One or more virtual machines share the IP and MAC address of the host system for the purposes of communicating with the external network. Virtual machines are able to communicate with other clients on the network to which the host is connected, but will appear to those clients as the host system, rather than as individual network clients. This approach allows multiple virtual machines to operate using a single IP address. IP addresses are allocated dynamically to NAT based virtual machines by VMware Server's internal DHCP server. Communication with the external network can only be established by the virtual machine. It is not, therefore, possible for a client on the external network to initiate a connection with a NAT based virtual machine (although port forwarding may be configured to allow traffic to a particular port, such as HTTP traffic on port 80, to be directed to a specific virtual machine).
- Host-only networking - Creates a private sub-net within the host for virtual machines for which no external network access is required or desired. Virtual machines configured with host-only networking can communicate directly only with the host system and virtual machines which are also members of the same host-only network. The virtual machines cannot, however, communicate with the network to which the host is connected. IP addresses are allocated to Host-only based virtual machines by VMware Server's internal DHCP server.
When a VM comes on-line, it needs to either obtain an IP address from somewhere, i.e., either static, or dynamically via APIPA or DHCP. DHCP can be either a dedicated server to that end, or a functionality of the router. Former case and latter case there is no negotiation; the IP is either declared by the node (static) or assigned to it (DHCP). In the case of APIPA there is negotiation between the gateway and the node until a unique network ID is established. It doesn't matter how the VM gets its unique IP address, but the VM must utilize one of the three aforementioned networking methods.
Don’t take this the wrong way.
I ONLY want answers to my questions, as posed.
I DO NOT want to spend alot pf time debating what the “perfect network config” is, or the theory behind IP addressing or whatever.
I NEED TO KNOW how Windows handles a packet if it gets plunked on his lap but he realizes it’s not for him.
Thanks, but I am not trying to set up some network so perfect my name would go down in history for it, and me, myself, and I am the ONLY user.
djf
Also, put out of your mind that we are talking about VMWARE in any way. What I will say is it is a “virtual machine” type application that the host communicates with through TUN/TAP.
Everything between the host and the virtual machine works perfect, I can FTP, I can TELNET, I can PING, I can see all of the virtual machines TCPIP ports from the host.
But I cannot see the virtual machine from any other machine on the same network as the host.
For Win2K it sounds like you have to use Internet Connection Sharing(ICS). However, when you use ICS, the IP address of TAP will be forced to 192.168.0.1. If a router in a real network uses 192.168.0.1 as its Host ID, the network will be unuseable; instead configure the router to use 192.168.1.1 and specify 192.168.1.x for the network.
Then right-click on a real network adapter and select property. Select sharing and check to use ICS. Then push OK. The IP address of Tap adapter will now be set to 192.168.0.1
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.