Tag Archives: route packets

Computer Network – Tools and Supplies

Punch down tool

Punch down tool – The punch tool is used to insert the network cable in the patch panel or similar connection panels. For a small network up to 7 devices you might not need it as you can easily connect all of your devices directly into the switch.

Keystone module RJ45

Keystone Jacks – The RJ45 keystone jack is the female connector, usually immobile, part of a network connection that is mounted on the wall or similar. It provides a network connection close to the device to be connected. A patch-cord is used to connect the device to the keystone jack.

There are many types of RJ45 keystones, some require a punch down tool to be used, and some are tool-les, providing a lever for insertion and a retaining clip to secure the connection. The keystone is also produced for various categories, (Cat 3 – Cat 7), make sure you buy the correct one.

Deep Surplus
Wire Stripper Twisted Pair Cable

Wire stripper / Knife – I am not a fan of the wire stripper because it always cuts a little of the wires. Most of the times, the cut is superficial and it doesn’t get to the wire. But sometimes the stripper will scratch the wires. Using a utility knife or cutting pliers, is a little more laborious but I prefer it as I get more control. Moreover the many crimper tools come with a cable stripper. Don’t use that one, it doesn’t work for round cables, it only works for flat cables.

Simple Cable Tester

Network Tester – This is not a must, but if you are doing this for the first time, it will save you a lot of troubleshooting. For professional network cabling an expensive Network Tool that can measure attenuation, cable length, category supported, etc…, it’s a must. You need to give your client a report with your measurement results.
For small DIY jobs a simple tester will do it.

Patch Panel

Patch Panel – This is beyond the purpose of this article since it applies to bigger networks.

Network Switch

Network Switching device – The switching device switches packets between the different devices on your network. Modern switching devices can make a virtual map of all of the devices in your network and route packets according to this map.

Older connectivity devices, such as network hubs, used to indiscriminately broadcast the packets on all of the ports and only the device which the packet belonged to would have accepted it. This design creates a lot of collisions and saturates the network with unnecessary traffic.

Network hubs, (two or more ports), or repeaters, (only one port), are used to increase the maximum of 100m, (333 ft), between two devices connected on an Ethernet segment. Every repeater adds up another 100m.

How to – Debian Static IP Configuration

On a basic Debian machine without a graphical interface assigning the same IP address all the times can be achieved in two ways.

Static IP Address

To configure a static IP, (an IP that will never change), and not use DHCP you must edit the file /etc/networking/interfaces.
Insert the following code at the end of the file and don’t change anything else unless you know what you do:

# The first network card – this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
#Private Interface
iface eth0 inet static
## only use gateway if your machine is not multi-homed, (two network cards). You can only have a default route.
# gateway

In our case the IP of the Debian machine is The gateway, (the router), is and it is a standard Class C network.

To refresh the network configuration without restarting the server execute:
/etc/init.d/networking restart

If that doesn’t work reboot the machine (reboot or init 6).

For a second network card you should add at the end of the file another entry for your second card:
#External interface
iface eth1 inet static

Check the new configuration by issuing the command:

DHCP Reserved address

If you want to set this via DHCP you have to make a reservation into your DHCP server for your network card’s MAC address.
You can find your MAC address by using the command ifconfig.
The server will spit some information on the screen that looks like this:
eth0 Link encap:Ethernet HWaddr 00:33:ff:c4:2f:2b
inet addr: Bcast: Mask:
inet6 addr: fe80::230:f4ff:fdd4:bf33/64 Scope:Link
RX packets:93373 errors:0 dropped:0 overruns:0 frame:0
TX packets:38320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:76539317 (72.9 MiB) TX bytes:5551726 (5.2 MiB)
Interrupt:17 Base address:0x6000

The first line is the one you are interested in:
HWaddr 00:33:ff:c4:2f:2b
In your DHCP server make a reservation using 0033ffc42f2b as your MAC address. Note the removal of the colons in between.
Reboot the server and when the machine will try to renegociate its IP address the DHCP server will assign it the newly reserver address.

If you want to add a static route on your Debian machine edit your /etc/networking/interfaces file and add the following two lines at the end of your eth1, (eth0), configuration.
up route add -net netmask gw
down route del -net netmask gw
The two lines tell Debian to add a static route when the computer boots, and to remove the static route when it shuts down.

The parameters mean: is the network you want to make your Debian machine aware of; is the netmask of your added network, is the gateway to that network.

Why would you need a static network? In our configuration example your default route is through your public network interface.
Any additional internal networks or VPN’s will not be available. The configuration above tells your Debian machine how to reach any VPN or networks not reachable via the default Network.

There is another change needed if you plan to configure this machine as a simple router. You need to enable IP forwarding, in other words allow the machine to forward traffic for its clients.
# nano /etc/sysctl.conf
Change the following line : net.ipv4.ip_forward = 0
to net.ipv4.ip_forward = 1

Reboot the machine to make the setting active, or issue the following command to make the kernel aware of the change:
# echo 1 > /proc/sys/net/ipv4/ip_forward

Why do you want your Debian machine to connect to other networks or VPN’s? If your machine is a proxy, or a gateway it needs to know where to route packets for its clients. Even if your remote networks or VPN’s have their own proxy, if you have a shared server in one of these networks you need to make it available for your users. It is easier to maintain a static route on one server than add it to all of the clients.