The Guide to XBOX Networking
by gsgleason


I am writing this little tutorial to explain basic networking. A lot of the posts I see regarding one's inability to FTP to their xbox is because of simple little things such as using the wrong cable or wrong addresses. I am hoping this helps those situations.


Crossover cable vs. Patch cable

The 568B wiring convention (most common) tells us the order in which the wires need to be on your cable. Here is a picture of a normal cable pinout.

STRAIGHT THRU PATCH CABLE

Regular 10/100 baseT ethernet uses 2 pairs of wire: one pair for transmitting data, and one for receiving data. As you can guess, the pinouts are the same for any user device (like your xbox, or a network card on your computer) The transmit pair on one device needs to go to the receive pair on the other device in order to communicate - simple, right?

So, what would happen if you connected two machines together with a straight-thru patch cable? The tramsmit pair on one device would be connected to the transmit pair on the other device, and the receive pair would be connected to the receive pair!!! This will not work.

A crossover cable switches the transmit and receive pairs on one end of the cable, making the transmit of one device connect to the receive on the other device, which is good. Here's a pic:



CROSSOVER

If you are connecting everything to a hub or switch, you will use regular patch cables, because a hub's TX and RX are already opposite that of your PC/Xbox. So, to review the main point:

Use a crossover when connecting to alike devices. (hub to hub, xbox to xbox, xbox to pc, pc to pc)

Use a patch cable when connecing a device to a hub or switch. (hub to xbox, hub to pc)



Binary

Before you can fully understand subnetting, you need to understand binary numbering. In order to truly understand binary, it's best if you truly understand decimal, which is our native numbering system.

"Decimal" means base ten. Each digit in a decimal number represents a the number of the particular value which that position represents. It's like this:
Decimal numbering
BasePower 107 106 105 104 103 102 101 100
Decimal value 10,000,000 1,000,000 100,000 10,000 1,000 100 10 1


Lets analyze a decimal number, lets say 2,857. First, we need to apply that number to our little table.

BasePower 107 106 105 104 103 102 101 100
Decimal value 10,000,000 1,000,000 100,000 10,000 1,000 100 10 1
Actual number 2 8 5 7

2,857 = (2x103) + (8x102) + (5x101) + (7x100)

This should all be common knowledge for you. It's important to realize exactly how a numbering structure works, because they're all the same.

Each digit place represents a value. The number of possibilities for that value is defined by the base, so for decimal, each place has ten different possibilities (deci=10), while with binary, each one has two possibilities (bi=2).

Whether you're working with binary, octal, decimal, or hexidecimal, they all work the same way.

Now let us take a look at binary numbering. Binary means "base 2." so the table is going to look very similar, but with "2" as the base instead of 10.

Binary numbering
BasePower 27 26 25 24 23 22 21 20
Decimal value 128 64 32 16 8 4 2 1


Let's convert the binary number 11010110 to decimal. First, let's apply that to our table.

Binary numbering
BasePower 27 26 25 24 23 22 21 20
Decimal value 128 64 32 16 8 4 2 1
Actual number 1 1 0 1 0 1 1 0


11010110 = (1x27) + (1x26) + (0x25) + (1x24) + (0x23) + (1x22) + (1x21) + (0x20) = 128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = 214

Now that you know how binary numbering works, lets move on to subnetting.



Subnetting

Every device on a network typically has these three things

IP address
Subnet mask
Default gateway

If you think of the whole internet as a pie, subnetworks are slices of that pie. The subnet mask determines how big the slices are.

Two devices must be on the same subnet in order to communicate, otherwise a router is needed.


In one byte (8 bits or digits) the numbers work like this.

128 64 32 16 8 4 2 1

therefore..
00000001 = 1
00000010 = 2
00000011 = 3
00000100 = 4
00000101 = 5
00000110 = 6
00000111 = 7

etc.

Here are some common subnet masks:

Subnet Masks
Decimal NetmaskBinary NetmaskNetmask BitsHost bitsPossible AddressesUsable Addresses
255.255.255.011111111.11111111.11111111.00000000248256254
255.255.255.12811111111.11111111.11111111.10000000257128126
255.255.255.19211111111.11111111.11111111.110000002666462
255.255.255.22411111111.11111111.11111111.111000002753230
255.255.255.24011111111.11111111.11111111.111100002841614
255.255.255.24811111111.11111111.11111111.1111100029386
255.255.255.25211111111.11111111.11111111.1111110030242
255.255.255.25411111111.11111111.11111111.111111103112
255.255.255.25511111111.11111111.11111111.11111111320


All subnet masks are going to be all ones followed by all zeros. In the chart above, the network portion of the netmask is in purple, and the host portion is in black. The host portion determines how many devices a network of that netmask can support. Here's why:

With of netmask of 255.255.255.0, there are 8 host bits. 8 binary bits equals 255 in decimal, which means there are 256 possibilities: 0-255

In any subnetwork, the lowest address is the network address, and the highest is the broadcast address.

Both the network and the broadcast addresses are reserved and may not be used by hosts!!

Therefore, to figure how many useble addresses there are, we must subtract 2 from the total amount of possible addresses for that subnet.



It's time for a little excercise. We're going to be given an IP Address and a Subnet Mask, and our job is to determine the network address, broadcast addresses, and range of usable host addresses. Here we go:


IP address192.168.5.125
Subnet Mask255.255.255.224

First we put the IP Address and Subnet Mask into binary and seperate the network portion from the host portion.

DecimalBinary
IP Address192.168.5.12511000000.10101000.00000101.011 11101
Netmask255.255.255.22411111111.11111111.11111111.111 00000


**To determine the network address, we fill the host portion of the address with all zeros. (the lowest possible address for the subnet)

**To determine the broadcast address, we fill the host portion of the address with all ones. (the highest possible address for the subnet)


DecimalBinary
IP Address192.168.5.12511000000.10101000.00000101.011 11101
Netmask255.255.255.22411111111.11111111.11111111.111 00000
**Network Address192.168.5.9611000000.10101000.00000101.011 00000
**Broadcast address192.168.5.12711000000.10101000.00000101.011 11111

Therefore...
Network Address192.168.1.96
Broadcast Address192.168.1.127
Usable Hosts192.168.1.97-192.168.1.126


All these addresses would be defined as network 192.168.1.96/27 (195.168.1.96 is the network address, and there are 27 ones in the subnetmask)



Most of us use subnet mask 255.255.255.0, which means that the XBOX and PC need to have the first three numbers of the ip address the same, and the last one can be different, but it cannot be 0 or 255, since those are reserved for the network address and broadcast address.

For instance, if your PC is 192.168.1.2, subnetmask 255.255.255.0, and your dsl modem is 192.168.1.1, your xbox, in order to be on the same subnet, can be anywhere from 192.168.1.3-192.168.1.254.

If you have two nics on your computer, one for internet and one with a crossover to your xbox, the xbox-pc network must be on a different subnet than the pc-internet network!!

I repeat, the xbox-pc network must be on a different subnet than the pc-internet network!!. Here is an example. This first picture is good.

GOOD!
As you see here, the two NICs are on different subnets.



VERY BAD!!!
Here, everything is on the same subnet. BAD!




Computers and routers route packets based upon the subnet of the destination. If a device has two interfaces on the same subnet, it may not send the packet to the right place.

The default gateway is simply the address of whatever device will get you out of your subnet and to the internet.

If your PC has two nics, the NIC which connectsto the x-box should not have a default gateway.

The gateway for the xbox will be the address of your PC's NIC to which it's connected.


That is all.

Email questions/comments to myself.