Network Devices

Read the manual

This is not a guide to setting up of any hardware. You should always consult manuals which came with the hardware and refer problems to your supplier.

Equipment

nw-01: A typical network layout

You will need the following equipments to complete an internet host setup:

  • modem
  • router
  • switch (omit this for small network if router has a switch function)
  • network interface card (NIC) or Ethernet interface built into mainboard.

Preferably, all the above equipments are individual units. Combination units are usually built with shared components. It might be substantially cheaper to buy a combination unit, the saving will hardly compensate the hassle in configuration if you run into problems.

A typical network hardware setup:

The figure shows a typical network setup. If you are new to networking and your hardware setup is different, chances are you will run into some form of problem.

Examples used:

  • 192.168.1.101> = myhost, myhost.mydomain.tld
  • 192.168.1.1 = router
  • 192.168.1.151 = Windows client host
  • 123.456.789.012 = public IP

Setting up internet connection sharing:

  • Modem: nothing to do here.
  • Switch: nothing to do here.
  • Router (example) (Visit Port Forwarding and Virtual Servers pages for real world examples):
    • Point your browser to http://192.168.1.1
    • log in as admin with password password (factory default of some router)
    • WAN setup:
      • protocol PPPOE or as per your ISP's instruction
      • user account: your ISP account name
      • user password: your ISP account password
    • DHCP setup:
      • activate DHCP server (whether you use it or not)
      • note the private IP range, say 192.168.1.100 to 192.168.1.199
      • note the attached devices and their IPs (so that you will not assign a conflicting IP)
      • disable wireless service unless you know how to set up MAC address authentication.
    • Port forwarding (for Athena, Apache, ProFTPd and SMTP):
      • source IP 0.0.0.0 port 6900 destination IP 192.168.1.101 port 6900 TCP
      • source IP 0.0.0.0 port 6121 destination IP 192.168.1.101 port 6121 TCP
      • source IP 0.0.0.0 port 5121 destination IP 192.168.1.101 port 5121 TCP
      • source IP 0.0.0.0 port 80 destination IP 192.168.1.101 port 80 TCP
      • source IP 0.0.0.0 port 21 destination IP 192.168.1.101 port 21 TCP
      • source IP 0.0.0.0 port 25 destination IP 192.168.1.101 port 25 TCP
    • Firewall (do not follow without considering your own situation):
      • disable ICMP pings
      • enable log
      • in-bound firewall: deny all except open ports
      • out-bound firewall: allow all except (list what you want to block here)
  • Network Interface

Know your network hardware

You should get to know your network equipment, especially the router. It mignt appear to be a traffic director but in reality a router is a computer in its own right. It is hosting a DHCP server and a firewall or firewall-like application, such as port forwarding or virtual servers. You should, in fact you must, also change the default user name and password for security reason. This first line of defence must be up.





Q&A

Can I use a router-switch combination unit?

Yes. Such units, usually with four Ethernet ports, are useful in a network of no more than 4 hosts. Expand the network with a switch.

Should I use one with USB port?

No. You should always get network devices with RJ45 (Ethernet) ports.

Why is a port not opened for MySQL?

In one word, dangerous. Once MySQL server is crippled, other hosts or servers which depends on it will fail. In term of performance, an internet attached MySQL server is slow comparing to one attached to a local net.

What is that local net connected only by cables?

That is still a local net. A cross-over cable is used to connect one host to another, specifically one NIC to another. Another pair of NICs will be needed to add one host to the net. Usual one host will act as the router and switch. As you have already guessed, it is difficult to configure such a network.

What is a cross-over cable?
Most RJ45 cables used in networks are of the straight type, i.e. both ends are identically configured. In a cross-over cable, wires are crossed, i.e. the ends are different from one another.
Why is the modem not configured?

Modems are driven by software. In the sample setup mentioned earlier, the modem is driven by software built into the router. The Linux installer is capable of detecting your hardware and sets up the necessary drivers. Generally, you have to install the driver on Windows.

Why is the switch not configured?

There is no need to configure a switch or a hub. A switch inspects an in-coming packet and delivers it to the destination IP. A hub sends a copy of an in-coming packet to all IPs in the local net and the destination host picks it up while the rest drops it.