|
The
TCP/IP protocol is the protocol that holds the Internet together.
It is also found in most internal company networks. This article
will give an overview of TCP/IP and basic network devices
How does TCP/IP work?
Each person is given (either automatically or manually) his
or her own IP address. This IP address is unique to them and
can not be used by anyone else inside your network. Think
of an IP address as a telephone number, if several people
had the same telephone number in your town, then there would
be a conflict.
A typical IP address might
look something like this:
220.0.0.80
That's it, it's not a huge
number that takes half an hour to type in, it's a simple four
digit number that identifies your PC.
You can't just make up these
addresses, there is a numbering convention that you must use,
however, if we go back to the telephone analogy, we can explain
how it works.
If you live in the Australia,
specifically in Melbourne, you are given a dialing code of
03. As soon as anyone in the Australia sees this 03 number
they know that the person lives in Melbourne. This means that
everyone else in Melbourne has a 03 number by default, they
can't have a 02 number as this is already allocated to Sydney.
The IP address works in the
same way - On a typical TCP/IP network, the first three digit groups
can not be changed (they're the 03 equivalent). In other words
the 220.0.0 digit groups are fixed. We can only change the last
digit. Don't think that all TCP/IP numbers begin with 220.0.0,
that just happens to be the example, you WILL use a different
set of numbers in your TCP/IP network.
Here are two examples of a
incorrect and correct Class C TCP/IP address (assuming that
the subnet mask is set to 255.255.255.0)
Incorrect
Computer A: 220.0.0.180 Computer
B: 220.0.1.181
These IP addresses are wrong
because the first three digit groups are different even though
the last digit group is correct.
Correct
Computer A: 220.0.0.180 Computer
B: 220.0.0.181
These IP addresses will work
because the first three digit groups are the same and the last digit
is different. If we changed our subnet mask to 255.255.0.0
it would be possible to communicate using these IP addresses.
Network Devices
Hubs
A hub is a simple device. It works strictly at hardware level.
It has ONE ingress port and a number of egress ports. So whatever
you put into a hub just blindly comes out all it's egress
ports. Hubs are dumb. They connect everything. They make no
decisions. They need no configuration. With a hub, a packet
might arrive at machine A on your network, but it's destined
for B. if A is "polite", it will know the packet
is not for it and throw it away. You depend on your network
to be polite and not "promiscuous" (the opposite
of polite!). Normally your NIC (Network Interface Card) is
not in promiscuous mode; people in a household tend to more
or less trust each other anyway; and hubs are cheap. Hubs
have largely given way to switches.
Switches
A switch may selectively connect any of its ports to each
other. If you use a switch, it will make the decision to send
a packet destined for B only to B. A will not even know that
a packet went to B. Switches prevent people on your local
network from sniffing packets not addressed to them. Even
if a host is configured to be promiscuous, on a switched network
it will not so easily be able to sniff other computers' traffic
on that network.
Routing and Routers
Routing is the process of delivering information to its intended
destination. A router is a device that actually delivers information
to its intended destination, using one of several different
routing protocols.
The process of routing begins
when a host computer transmits a packet of information that
is destined for a computer that is not physically attached
to the network that the sending computer resides on. Put simply,
this means any computer not on the same Ethernet network.
This packet of information, which could be part of an email
message, or part of a file transfer, is sent to what is referred
to as the default router, or the gateway router. This is a
router that gets all packets whose destination address is
different from the sender's network address.
A router is basically a very
fast computer. It has a processor, memory, software, and one
or more input and output devices. The input and output devices
are network interface modules. There must be at least two
interfaces: one input, and one output, but there can be several
inputs and several outputs. The simplest router setup, one
where only two networks are interconnected, would have one
Ethernet interface, and one WAN (Wide Area Network) interface.
Packets sent from the local area network (LAN) with destination
addresses that referred to the network at the other end of
the WAN link, would all be sent out on the WAN interface.
This would be the case with a PPP (Point-to Point Protocol)
communications link or a Frame Relay connection.
When used in a local area network,
a router can be used to send traffic to network segments that
have a different topology. For example, a router could be
used to connect an Ethernet segment with a Token Ring segment.
In this scenario the router would have a Token Ring interface
and an Ethernet interface. It may also have a serial interface
if it is connected to a WAN.
The simplest routing protocol
is static routing. Static routing requires that each individual
destination address be entered into the router's memory, along
with the address of the next router in the chain, and the
physical interface associated with that next router. The next
router in the chain is referred to as the "next hop".
When a router receives a packet
of information, it looks inside of the packet to determine
the destination address of the data. The router then examines
its internal routing table (or database) to determine where
to send the packet. The router then sends the packet out on
the interface that has been specified for the next hop.
Static routing works for internet
works that are relatively small, but can become unmanageable
as the internet work grows in size and requires more and more
individual routes.
Larger internet works require
the use of RIP, or Routing Information Protocol, to keep track
of new routes. Very large networks require the use of a link-state
protocol such as OSPF (Open Shortest Path First). OSPF is
a more efficient routing protocol which does not suffer from
the limitations of RIP.
Gateways
A Gateway is a device which "knows" about other
networks. If you need to send a packet of information to a
device on another network you forward the packet to a gateway
and it does the rest. Most routers also function as gateways.
If you don't tell the originating device the address of the
gateway any packets of information it sends will not reach
their destination.
Not all IP networks use a gateway.
A simple network of interconnected computers without any link
to another network will usually not have a gateway. On the
other hand if there is a router in the network to interconnect
2 networks then there will be a gateway.
Ports
Generally speaking, a computer has a single physical connection
to the network. All data destined for a particular computer
arrives through that connection. However, the data may be
intended for different applications running on the computer.
So how does the computer know to which application to forward
the data? Through the use of ports.
Data transmitted over the Internet
is accompanied by addressing information that identifies the
computer and the port for which it is destined. The computer
is identified by its 32-bit IP address, which IP uses to deliver
data to the right computer on the network. Ports are identified
by a 16-bit number, which TCP and UDP use to deliver the data
to the right application.
|