Here's a list of Network Commands that you can use to modify your TCP/IP settings. You will need to be connected to a Wireless Network first before any of these will work. More than likely you want to skip right to the section on DHCP.

TableOfContents

IP overview

Every computer on your network will need a unique IP address. An IP address looks like 207.41.233.12.

Your Internet connection should already have an IP address. For your own network, you may have been assigned IP addresses from your Community Network or Service Provider, otherwise you can use one of the following IP address ranges:

Decide what IP address should be assigned to every computer on the network. Many people use x.x.x.1 as their router (the device that connects your local network to your Community Network or ISP). Write it down on a piece of paper.

What's a Netmask anyway?

Netmasks are used to group bunches of IP addresses together. A very common netmask is 255.255.255.0, which means that 255 IP addresses can be used on that particular network. For example, if your IP address is 1.2.3.1 and your netmask is 255.255.255.0, the other machines that are directly attached to the network would have addresses ranging from 1.2.3.2 through 1.2.3.255.

If you had two networks in your house (UPSTAIRS and DOWNSTAIRS, for example), you probably wouldn't need 255 IP addresses available on each network. Instead you could use a netmask of 255.255.255.248 which would give 6 IP addresses per network. Of course if you had more than 6 computers on either network you would need a larger netmask.

If this scares you, don't worry about. Even seasoned professionals get scared away by this sort of thing. ;-)

The NetmaskTable lists all of the available netmasks.

Using DHCP to automagically set your IP address

DHCP (short for Dynamic Host Configuration Protocol) is used by many Networks to automatically configure network users. This is the easiest way to configure your wireless card if it is supported by the network.

Linux

Depending on what distro, and release of that distro, there are a lot of ways to do this. Common applications are dhcpd, dhclient and pump. Below are examples of how to use each one, remember to change eth0 in this example to whatever your wireless card is.

dhclient eth0
pump -i eth0
dhcpcd eth0

Any one of these should work, and you need only run one of them. Redhat, Suse and Mandrake all have graphical configuration tools as well, in fact for Redhat, it somtimes might be a better idea to use the gui, as I have found that you might end up with conflicts if you try and use the command line directly.

Redhat (8.0) and Debian (3.0) both use dhclient, Gentoo (1.4) uses dhcpcd by defualt.

*BSD (FreeBSD, OpenBSD, NetBSD, etc.

Many of the BSD's have dhclient. To run dhclient manually use:  dhclient wi0 (where wi0 is the name of your network card)

FreeBSD users can have dhclient run automagically at bootup by adding the line ifconfig_wi0="dhcp" to /etc/rc.conf

Microsoft Windows

Mac OS X

To get an address via DHCP, open the System Preferences (either from the Apple, or from the Dock), select Network, select the Airport interface from the pulldown menu, select Using DHCP from the Configure pull down menu.

How do I add an IP address to my network card?

This is how you would set the ip address on your wireless card if you are unable to use DHCP.

Linux (Redhat, Debian, etc.)

Setting your IP address is done using:

ifconfig eth1 ipaddress netmask yournetmask

for example, you want to make your card listen to 192.168.0.1 with a netmask of 255.255.255.0. You would use:

ifconfig eth1 198.168.0.1 netmask 255.255.255.0

*BSD (FreeBSD, OpenBSD, NetBSD, etc.

Similiar to Linux, however the commands are slightly different. Setting your IP address is done using:

ifconfig wi0 inet youripaddress netmask yournetmask

for example, you want to make your card listen to 192.168.0.1 with a netmask of 255.255.255.0. You would use:

ifconfig wi0 198.168.0.1 netmask 255.255.255.0

Microsoft Windows (Windows NT, 2000 and XP+)

Most Network settings can be found in your Settings -> Networking and Dialup Connections folder.

Mac OS 9

Your TCP/Ip settings can be changed from the Apple Menu -> Control Panels -> "TCP/IP Settings". Each Network Device is configurable from the drop-down menu. You should consider upgrading to Mac OS X if you can.

Mac OS X

Open the System Preferences (either from the Apple, or from the Dock), select Network, select the Airport interface from the pulldown menu, then fill choose Manually from the Configure pulldown menu. Fill in the ip information for the network you are connected to, and hit Apply Now.

What are routes?

routes are used to tell your computer where to send data. They basically say "send data for <this network> through <this computer>". You can create routes for a specific host, network(s), and a special route known as the "default route" which handles everything that is not explicitly set.

What should I set my routes to?

At the very minimum you will probably want to set your default route to point to your router.

Linux

route add default gw <your_routers_ip_address>

for example:  route add default gw 192.168.0.1  would cause all traffic that is not destined for your local network to be directed through 192.168.0.1

FreeBSD

route add default <your_routers_ip_address>

for example:

route add default 192.168.0.1

To have your system automatically set the default route when it starts up, add/change the line:

defaultrouter="192.168.0.1"

in /etc/rc.conf

Windows NT 3.51/4.0

You can specify your default route through the "Network" Control Panel.

Windows 2000/XP+

You can specify your default route through your Network and Dialup Connection properties.

How can I set the routes on Windows NT/2000/XP manually?

You can use the route.exe command line tool to modify your routing parameters. Here's an example:

route add 0.0.0.0 mask 0.0.0.0 192.168.0.1

BR

I did a little adding and restructuring, hope you don't mind. --ForrestEnglish


CategoryDocumentation