Bridging a wireless and an Ethernet port in XP?

OK, this seems to be a pretty with-it group, so what the hell.

I’ve got a desktop computer with both a wireless and an Ethernet (LAN) port, running Windows XP Home. The wireless connects to a wireless router and through it to the Internet. I’m also running file and printer sharing and I can see my other wireless-enabled computers on my household net. So far so good.

I can also run wireless on my laptop (which runs XP Pro), and it joins the household net and gets Internet access too. Again, OK so far. BUT…

I need to transfer big files from my desktop to my laptop. So big that the wireless connection often drops packets and causes the copy to fail. (I’ve gotten around this by running FTP and a server that accepts retries, but that’s a kludge.) Besides, the laptop only has an 802.11b card (11 MPBS), not 802.11g (56MBPS) like everything else, so it’s slow. So what I really want to do is connect the laptop to the desktop via their respective 100MBPS Ethernet ports, and let the laptop get its Internet access, plus access to the other computers on the net, THROUGH the desktop machine. I turn off the laptop’s wireless altogether.

I’ve got a crossover cable. I hook 'em up. I make sure their TCP/IP addresses don’t interfere with anything else on the net by setting them manually. Enable the LAN ports on both machines. Haven’t done the Windows XP software bridge thing yet.

At this point, on the desktop, I lose wireless and access to the other machines on that network. My network is up but the only thing I can see on it is the laptop. Which is OK for transferring the files, but I really want EVERYTHING all hooked together. Furthermore the laptop does not get an Internet connection through the desktop.

So this is what the software bridge is for, right? I bridge the two connections, wireless and LAN, on the desktop machine. The command, at least, succeeds. The bridge appears.

No dice. Desktop (and laptop too, obviously still don’t get Internet); laptop and desktop still can only see each other on the network.

Don’t tell me about “netsh bridge set adapter 1 forcecompatmode=enable”. It doesn’t help.

Don’t tell me about Internet Connection Sharing. ICS REQUIRES the host machine (the desktop) to be 192.168.0.1, and that already belongs to the wireless router.

Firewalls are all off. (Don’t panic, I’m behind a router, remember.)

The LAN side has no DHCP, so I have to assign the IP addresses by hand. No probs, and I make sure they’re in the same general range as the router uses, but don’t conflict with anything else around. The “Automatic Private IP Address” mechanism also seems to work if I tell both machines to get their IP addresses automatically, although it assigns IP addresses that are totally different from the ones used by the wireless network.

Why can’t I bridge my wireless and wired connections together trivially? What am I doing wrong here? This really should be a no-brainer.

Can you make the wireless router use something other than 192.168.0.1?

First, yes, I can get the router to use a different IP address. However, I solved it without that.

In setting up the laptop and desktop’s Ethernet ports manually, I neglected to put in the gateway address (the router) and the DNS address (also supplied by the router). Once I did that, it all came together. I now have a fast connection between laptop and desktop, and both machines can see each other AND the others on the network as well. Whew. This has only cost me about 10 hours, but it was chiefly my own ignorance that was at fault… I STILL don’t know what the heck a subnet mask is.

Basically a subnet mask tells the computer what portion of the IP address identifies the network, and what portion identifies the host. So a 192.168.0.1 address with a subnet mask of 255.255.255.0 means that 192.168.0 is the network and the 1 identifies the host on that network. There is alot more to subnetting than that, but it isn’t an easy subject. If you want a more detailed explanation just ask.

-Otanx

I have worked in IT for 8 years (not networks though) and I never knew what a subnet mask was. It is as clear as day now although not something I would have guessed. Thanks for that. I will have to slip “subnet mask” into conversations with coworkers as many times as possible to keep up the impression that I know mysterious things that they can only hope to one day grasp.

I’d like to know, please :slight_smile:

With a subnet of 255.255.255.0 you can use the IP range of 192.168.0.0 to 192.168.0.255 or 255 addresses (or computers on a network).

With the subnet of 255.255.0.0 you can use the IP range of 192.168.0.0 to 192.168.255.255 or 65534 addresses.

With the subnet of 255.0.0.0 you can use the IP address of 192.0.0.0 to 192.255.255.255 or 16,777,214 addresses. You really don’t want to do that though.

Back in the days of Class A, B and C networks, there were no subnet masks or network masks. If the 32-bit IP address started with 0 in binary, that is 0.x.x.x to 127.x.x.x in decimal, it was assumed that the first eight bits were the network address i.e. that it was a Class A network.

If the first two bits were 10 (128.x.x.x to 191.x.x.x) it was a Class B network in which the first 16 bits were the network address. And if the first three bits were 110 it was Class C, with 24 bits for the network part. Only having to check the first three bits of the address made things easier for routers, which had less processing power back then.

Network masks came along as routers became more powerful and had more storage space. They allow you to designate any portion of the IP address as the network part, not just the first 8, 16, or 24 bits. A network mask like 255.255.192.0 is 11111111 11111111 11000000 00000000 in binary, so it means that the first 18 bits are the network part. Class A, B, and C are therefore equivalent to having network masks of 255.0.0.0, 255.255.0.0 and 255.255.255.0 respectively, and these became the default network masks for those classes.

Subnetting meant using a longer network mask than the default, so that in addition to the class’s standard network part, you had your own extra part for dividing your network internally. Nowadays, the concept of classes is largely obsolete, and you just have a network part and a host part. Which part is considered the network part varies as the packet travels around the internet.

OK, here you go…

An IP address is broken into a network portion, and a host portion. The network portion indicates what network the IP address is on, and the host portion indicates a specific host on that network.

The subnet mask is used to determine what part of the address is for networks, and which is for hosts. If a bit in the subnet mask is set to a 1 then that bit is used for the network portion of the adderss. If set to 0 then that bit is for the host. So if an entire byte is used for the network it will be set to 11111111 = 255. If an entire byte is used for the host portion it will be set to 00000000 = 0

As stated in a post above there are several classes of IP addresses. Class A, B, C, D, E. D is used for multicasting, and E is an experimental range. A, B, and C are the ones you will run into on a normal network.

Class A is the first class. It uses the first byte of the IP address for the network. Network addresses for Class A is 0 - 127. In this range 0 is never used for a network, 10 is a private network, and 127 is for loopback. If you convert the first byte of a Class A address it will always have the first bit of 0. The default subnet mask for Class A is 255.0.0.0

Class B uses the first two bytes for network. Range is from 128 - 191 for the first byte. Second byte can be 0 - 255. 172.16 is a private network. If you convert the first byte of a Class B address the first two bits will be 10. The default subnet mask for Class B is 255.255.0.0

Class C uses the first three bytes for the network. Range is 192 - 223 for the first byte. Second and third can be 0 - 255. 192.168 is a private network. First 3 bits will be 110. The default subnet mask for Class C is 255.255.255.0

So if you have a Class A address lets say 102.0.0.0 you can have one network with 16.7 million hosts on it. I am not aware of any network in the world with 16.7 million hosts.

Now lets say you have 3 networks with 10 computers on each network. If you have the above 102 network you can either request 2 more network address spaces for your other two networks, or you can subnet the address you have.

The default mask for a Class A address is 255.0.0.0. That means that the first byte is for the network, and the last three are for the host. You can change the mask so you can use more of the address for networks. We will use 255.255.0.0.

Now with the new mask your IP address uses the first two bytes for network address, and the last two for hosts. So for your 3 networks you can have network 102.1.0.0, 102.2.0.0, and 102.3.0.0. Then assign each host on the networks addresses on those networks. A host on 102.1.0.0 network would have an address of 102.1.0.1 to 102.1.255.254. A host on 102.2.0.0 network would have an address of 102.2.0.1 to 102.1.255.254.

Following so far? Good, now comes the harder stuff.

In the real world you will probably never be assigned a Class A (or B) address. You will get a Class C. So we will say you got assigned 200.136.42.0 for your network. You still have the 3 networks with 10 hosts on each from above. Again you can request 2 more network addresses, or you can subnet. Obviously because we are using a Class C we only have the last byte to use for hosts. The rest is already used for networks.

The default mask for Class C is 255.255.255.0. So what do you do? You can’t take the last byte for network because then you don’t have any left over for hosts. What you have to do is break down to bits. We will take the first 4 bits of the last byte for networks. The subnet mask for this would be 255.255.255.240. That is the default mask of 255.255.255.0 plus the last byte is 11110000 = 240.

Now the first three bytes will stay the same for all your networks 200.136.42. The first 4 bits will change to designate the network. The first subnetwork will be 0. That is the four bits set to 0. Then the hosts are only using the last 4 bits so the host addresses will run from 0001 to 1110. 0000 and 1111 are special host addresses that can not be assigned to a host.

The second subnet would be 16. The first four bits set to 0001. Then again your hosts would run from 0001 to 1110. Third subnet would be 0010 = 32, fourth 0011 = 48, on up to 1111 = 240. Each subnet would have host address ranges from 0001 to 1110 for the last 4 bits. To figure out the last byte of the address just add the subnet and host together. So on subnet 64 host 8 would be 01000100. The first 4 bits are set to subnet 64 0100, and the last 4 are set to host 8 0100. So the last byte is 72. Entire address for this host is 200.136.42.72.

Now above I said that having the host bits all set to 0 or 1 are special addresses. When the host portion of the address is set to all 0s that is used to refer to a network as a unit. When set to all 1s that is used to refer to all hosts on a network. So above if I was on subnet 64, and set my host bits to 1111 I would get 200.136.42.127. If I sent a packet to that address all hosts on the 64 subnet would get it.

Subnet masks can also be writen in slash notation. Bascially a short hand so us lazy computer geeks don’t have to type out 255.255.255.0 over and over. Slash notation is basically using /x after the address where x is the number of bits in the subnet mask set to 1. So for the default mask for a Class C the slash notation would be /24. On the subnet example above it would be /28. So instead of typing 200.136.42.72 255.255.255.240 I could just type 200.136.42.72/28.

I think I covered most of subneting. If I missed something I am sure someone will post an addition. If you have more questions just ask. I am studying for CCNA and Network+ exams so the review is good for me.

-Otanx