Thursday, October 22, 2009

Classful vs. Classless Routing

Classful vs Classless routing protocols=

Classful routing protocols do not send subnet mask information with their
routing updates. A router running a classful routing protocol will react in one
of two ways when receiving a route:

• If the router has a directly connected interface belonging to the same
major network, it will apply the same subnet mask as that interface.

• If the router does not have any interfaces belonging to the same major
network, it will apply the classful subnet mask to the route.
Belonging to same “major network” simply indicates that they belong to the
same “classful” network. For example:

• 10.3.1.0 and 10.5.5.0 belong to the same major network (10.0.0.0)
• 10.1.4.5 and 11.1.4.4 do not belong to the same major network
• 192.168.1.1 and 192.168.1.254 belong to the same major network
(192.168.1.0)
• 192.168.1.5 and 192.167.2.5 do not belong to the same major
network.
Take the following example (assume the routing protocol is classful):
If Router B sends a routing update to Router A, it will not include the subnet
mask for the 10.2.0.0 network. Thus, Router A must make a decision.
If Router A has a directly connected interface that belongs to the same major
network (10.0.0.0), it will use the subnet mask of that interface for the route.
For example, if Router A has an interface on the 10.4.0.0/16 network, it will
apply a subnet mask of /16 to the 10.2.0.0 network.
If Router A does not have a directly connected interfacing belonging to the
same major network, it will apply the classful subnet mask of /8. This can
obviously cause routing difficulties.
When using classful routing protocols, the subnet mask must remain
consistent throughout your entire network.

The Difference Between Traceroute and Ping

When data is sent over the Internet, it's sent in small blocks of data, called packets. Messages are divided into packets before they are sent, and each packet is then transmitted individually and can even follow different routes to its destination. Once all the packets forming a message arrive at the destination, they are recompiled into the original message.

Sometimes when you are trying to send or receive data over the Internet you may experience timeouts, or a Web server may be down, which prevents you from accessing services and Web sites. There are two common programs that can be used to test your Internet connection and even help you diagnose congestion between your computer (your ISP) and the destination server you're trying to reach. The programs you can use are called Ping and Traceroute.


Ping =

Ping (also written as PING or ping) is a utility that you use to determine whether or not a specific IP address is accessible. Ping works by sending a packet to a specified address and waiting for a reply. Ping is used primarily to troubleshoot Internet connections and there are many freeware and shareware Ping utilities available for download.

On a Windows PC you can run Ping using a command prompt. To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type ping followed by the destination server name or an IP address, for example, ping google.com.

Ping will test the speed of your connection to the server and will tell you how long a packet (32 bytes in size) takes to go from your computer to the host and back to your computer again.



Ping Localhost
When setting up a network you can use the ping command to make sure all of the computers are "alive" (at least in the TCP/IP sense). To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type ping 127.0.0.1

If everything is OK, you should get the following response (or something similar):


Pinging 127.0.0.1 with 32 bytes of data

Reply from 127.0.0.1: bytes=32 time<10ms ttl="32
Reply from 127.0.0.1: bytes=32 time<10ms ttl="32
Reply from 127.0.0.1: bytes=32 time<10ms ttl="32
Reply from 127.0.0.1: bytes=32 time<10ms ttl="32

This means that TCP/IP is working on the machine that you are typing on. 127.0.0.1 is a special address that "loops back" to the machine you are pinging from. You can also type ping localhost and receive a similar response, since localhost and 127.0.0.1 mean the same thing.


Traceroute=


Traceroute is a utility that traces a packet from your computer to an Internet host, but it will show you how many hops the packet requires to reach the host and how long each hop takes. If you're visiting a Web site and pages are appearing slowly, you can use traceroute to figure out where the longest delays are occurring. Traceroute utilities work by sending packets with low time-to-live (TTL) fields. The TTL value specifies how many hops the packet is allowed before it is returned. When a packet can't reach its destination because the TTL value is too low, the last host returns the packet and identifies itself. By sending a series of packets and incrementing the TTL value with each successive packet, traceroute finds out who all the intermediary hosts are.

The original traceroute is a UNIX utility, but nearly all platforms have something similar. Windows includes a traceroute utility called tracert. On a Windows PC you can run traceroute using a command prompt To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type tracert followed by the destination server name or an IP address, for example: tracert google.com




If any of the hops come back with * Request timed out, this denotes network congestion and a reason for slow loading Web pages and dropped connections.



You can basically use Ping and Traceroute to self-diagnose problems with your Internet connection. When you view the results this shows you where the problem lies &$151; with your own computer, on the network, or to see if it is the server you are trying to reach that is experiencing issues.

So, What's the Difference Again?
The main difference between the common Ping and Traceroute commands is that Ping is a quick and easy way to tell you if the destination server is online and estimates how long it takes to send ands receive data to the destination. Traceroute tells you the exact route you take to reach the server from your computer (ISP) and how long each hop takes.