20091130

Network Routing

What is Network Routing

You will be able to find the basic network routing overview, router configuration, router working, simulations static routes and routing table. Routing is the process of defining routes for the packets to its destination through an internetwork and this is performed by the router.
Routing is consist of two separate tasks.
1. Defining paths for the packets through and internetwork.
2. Forwarding data packets based on their predefined paths.
Generally, there are two types of routing.

STATIC AND DYNAMIC ROUTING


Routing can be performed by manually defining the routes or paths for packets to reach its destination. This is called static routing.
Stating routing works well for the small networks and when using the static routing, the routing table of the each router should be updated each time there is any change in the network configuration or topology. A router, whose routing table is not regularly updated, cannot communicate with the other routers.
While on the other end in most of the networks, routing is accomplished through the use of the dynamic routing. In the dynamic routing, routing protocols, such as RIP, OSPF etc create and maintain the routing tables of each router. Practically, dynamic routing functions very well than the static routing


ROUTING TABLE


A routing table is a set or rules, viewed in a tabular format and this used to define the routes of the data packets. All the network devices, which have IP, enabled functionality such as routers and switches use the routing tables. Routing table stores the information and configurations of every router in the IP enabled network. A routing table contains the information necessary to transmit the packets toward its destination.
When a packet is received, the network devices matches the information contained in the packets and the information in the routing tables and then it defines the shortest possible route for the transmission of the packets towards its destination.
Each packet contains the information of its origin and destination and the routing table contains the following information.
• Destination: The IP address of the packet’s final destination (next hop). Next hop: The IP address to which the packet is forwarded
• Metric: It assigns the cost to each route so that most-effective paths can be picked up.
• Routes: It includes directly attached direct subnets, indirect subnets, that are not directly connected to the device but it can be accesses through one ore more hops
• Interface: The outgoing network interface the device should use when forwarding the packet to its final destination.
Routing tables can be maintained manually by the network administrator or by dynamically (automatically). The static network tables do not change unless the network administrator changes them. Routing tables can be maintained manually or dynamically. Tables for static network devices do not change unless a network administrator manually changes them. In the dynamic routing, the network devices such as routers and switches maintain the routing tables dynamically by using the routing protocols, such as RIP, OSPF etc. In the dynamic routing, the network devices listen and detect any network or devices failure and packet congestions.


Routing in the Internet


Routing is the method in which data finds its destination from one computer to the next. In the Internet there are 3 major aspects of routing.
1. Physical Address Finding
2. Determination of inter-network gateways
3. Numeric and symbolic Addresses
Physical address finding is the method of the Internet Routing and is used when datagram is transmitted from a computer. It is necessary to encapsulate the IP datagram. This encapsulation requires the local network or physical address.
If a computer wishes to transmit IP datagram it needs to encapsulate the physical address of the destination network device in the frame. This address can be achieved by using the table that will map the IP address with the physical address. Such table can be configured into a file that can be read into the memory at the boot up time. Computer normally uses the Address Resolution Protocol (ARP), which operates dynamically to maintain the translation table.
The second method is necessary because the Internet consists of a large number of local networks, which are interconnected with each other by gateways. Such gateways are known as routers, which has physical as well as logical connectivity with many networks.
The determination of the best suitable gateway and port for a particular IP address is called routing.
The third method generally involves the translation of the human friendly form (names) to the number address (IP Address). IP address can’t be remembered due to its numeric form but the simplest names (domain names) are easy to remember e.g www.yahoo.com, www.google.com, www.msn.com are easiest to remember as compared to the IP addresses 122.11.22.34, 223.45.66.76, 155.44.55.120. DNS translates the domain names into the IP address and IP address into the domain name. This domain to IP translation is a must for communicating on the Internet because communication on the Internet is performed by the IP addresses.


Communication between routers

The Internet is a network of networks. The Internet consists of large number of autonomous systems, each of which further consists of routing domains. Such autonomous systems are usually run by the larger companies or universities. Within the Autonomous system, a router communicates with the other router using the best intra domain routing protocols, which are known as interior gateway protocols. Autonomous system are connected via gateways, these exchange information using inter domain routing protocol, which are also called exterior gateway protocols.
The RIP or (Routing Information Protocol) is the commonest interior gateway protocol and the recent protocol such as open shortest path first (OSPF). The purpose of these protocols is to enable routers to exchange locally so that all the routers in the autonomous system must a have coherent and up to date information.
When a host receives the new routing information, it is likely to update not only to it but also sends this new updated information to all the connected hosts so that they can updated themselves. Hence these changes propagate across the entire network.

Troubleshooting TCP/IP Networks

1. The purpose of this section is to give general tips on troubleshooting your TCP/IP LAN or Internet Connection.
2. The basics for troubleshooting are:
3. Make sure you have the same IP scheme (e.g. 192.168.0.x).
4. Make sure you have the same Subnet Mask, Gateway, and DNS IP addresses.
5. Make sure you can ping the other computer’s by IP ADDRESS
6. . Make sure you can ping the other computers by NAME
7. Make sure you have the same workgroup name (watch for trailing spaces)
8. Make sure you have the same workgroup name (watch for trailing spaces)
9. For troubleshooting purposes, uninstall any 3rd party firewall software and turn off XP's built in one. You can always add more complexity after you get it working.
10. With Windows2000, XP and Vista, make sure you have the same username and password as the person logging onto the other computers. The default setting for all but the Home Versions is to require a password for networkaccess..
11. Basically keep things simple. Remove any unnecessary firewalls, protocols or other configurations the complicate the troubleshooting process. You can add them back in later after you get things working.

How to configure OSPF step by step?

OSPF short for Open Shortest Path First is a Routing Protocol used to select the best suitable route for packets with in the network. OSPF basically an open standard protocol and not relate to any particular vendor. OSPF propagate the changes to all networks more quickly as compare to RIP and IGRP protocols then only send the changed part of the routing table to the other routers with in their area. We can decrease the size of routing table by dividing a big network into logically small segment using its area feature. OSPF protocol check the availability of others routers in the network by sending Hello packets, if the other router does not respond then it is assumed to be dead router. When you used OSPF for single area configuration, its configuration method is slightly differs from the RIP and IGRP.

There are some common OSPF configuration and Executable commands:

OSPF configuration on Router A

In global configuration mode

Router-A(config) # router ospf 1 (Here 1 indicate the process identification number)

Router-A(config-Router) # network 20.0.0.0 0.255.255.255 area 0 (Here 20.0.0.0 indicate the network ID and 0.225.255.255 wildcard mask with area 0)

Router-A(config-Router) # network 40.0.0.0 0.255.255.255 area 1 (Here 40.0.0.0 indicate the network ID and 0.225.255.255 wildcard mask with area 1)

OSPF configuration on Router B

In global configuration mode

Router-B(config) # router ospf 1 (Here 1 indicate the process identification number)

Router-B(config-Router) # network 20.0.0.0 0.255.255.255 area 0 (Here 20.0.0.0 indicate the network ID and 0.225.255.255 wildcard mask with area 0)

Router-B(config-Router) # network 30.0.0.0 0.255.255.255 area 1 (Here 30.0.0.0 indicate the network ID and 0.225.255.255 wildcard mask with area 1)

Now on both routers each Network will be added automatically, you can ping to Router A and Router B to check communication. You can verify this on Router-A or Router-B by using command Router# ping 40.0.0.10 (ping for Router B) and Router # ping 30.0.0.20 (ping for router A).

The Definition of a Network Router for the Non-technical Person

Router is a term that a lot of us hear but few people outside of computer science have a true understanding of. Sure, it is that box that we plug into our modem that gives us wireless Internet. Of course, that definition is simplistic at best and kind of like saying that a car can be summed up as a box on four wheels. If you want a more basic understanding of what a network router is, then this piece can help you. We’ll take a look at a more detailed definition of a router and a look at some of the common types you might encounter, as well as some that few will ever see but that are still worth knowing about.

A More Detailed Definition of a Router
A router is a networking device that has specific software and hardware which has been designed for the routing and forwarding of information. What this means is that routers are specialized devices for transmitting data. As a general rule, routers operate on two different planes: the control plane and the forwarding plane, both of which deal with interfaces and outbound data. A router's primary job is to provide connectivity, a function which you may be most familiar with in your own home from your wireless network setup. Routers, of course, are also used by larger systems including your original Internet service provider.

The Types of Routers
For the most part, there are four basic types of routers that you may encounter on a computer network.
The Edge Router
The edge router is, as you may have guessed, one that sits on the edge of an ISP's network. It is the edge router's job to route data externally to either another service provider or a large enterprise's autonomous system. These are most common in the world of business.
Subscriber Edge Router
The subscriber edge router is similar in function to standard edge router except in its function on the edge of the subscriber’s network and that it is used to transmit data into the subscribers network.
Inter-Provider Border Router
Figure provider border routers are used to interconnect ISPs. These routers maintain what is known as the BPG which allows two routers, such as an edge router and the subscriber edge router, to talk to each other and transmit data.
Core Router
A core router is used inside an ISP and transmits internally. They may be used to connect as your border routers or simply to pass signals within the network. While traditionally the core has been in the backbone of the system, as the design of modern networks changes, finding the core can be more and more challenging. Generally where the drivers are now is consider the core.

Router Size
It is important to know that there are two main sizes of routers. The first are small office and home office (SOHO) connectivity routers. These are the routers that most people are familiar with. They allow you to connect to your cable or DSL on a small scale. Enterprise routers, on the other hand, are usually confined to large companies and universities as well as research facilities and ISPs. While these allow for basically the same function, they are infinitely more powerful.

Network Troubleshooting Commands

Troubleshooting computer network is among the most important job descriptions of the network administrators, system administrators, network technicians and the IT consultants. A computer network can have different kinds of problems such as it can be infected with virus and spyware, attacked by hackers, accessed by unauthorized users and may face connectivity failure issues due to the faulty network devices or configurations.
Following is a list of the basic network troubleshooting commands that are built-in the Windows based operating systems and UNIX etc. The right use of these troubleshooting commands can helps a lot in diagnosing and resolving the issues with your computer network.
PING

Ping is the most important troubleshooting command and it checks the connectivity with the other computers. For example your system’s IP address is 10.10.10.10 and your network servers’ IP address is 10.10.10.1 and you can check the connectivity with the server by using the Ping command in following format.
At DOS prompt type Ping 10.10.10.1 and press enter

If you get the reply from the server then the connectivity is ok and if you get the error message like this “Request time out” this means the there is some problem in the connectivity with the server.

IPCONFIG

IPconfig is another important command in Windows. It shows the IP address of the computer and also it shows the DNS, DHCP, Gateway addresses of the network and subnet mask.

At DOS prompt type ipconfig and press enter to see the IP address of your computer.

At DOS prompt type inconfig/all and press enter to see the detailed information.

NSLOOKUP

NSLOOKUP is a TCP/IP based command and it checks domain name aliases, DNS records, operating system information by sending query to the Internet Domain Name Servers. You can resolve the errors with the DNS of your network server


HOSTNAME

Hostname command shows you the computer name.

At DOS prompt type Hostname and press enter


NETSTAT

NETSTAT utility shows the protocols statistics and the current established TCP/IP connections in the computer.

NBTSTAT

NBTSTAT helps to troubleshoot the NETBIOS name resolutions problems.

ARP

ARP displays and modifies IP to Physical address translation table that is used by the ARP protocols.

FINGER

Finger command is used to retrieve the information about a user on a network.

TRACERT

Tracert command is used to determine the path of the remote system. This tool also provides the number of hops and the IP address of each hop. For example if you want to see that how many hops (routers) are involved to reach www.yahoo.com and what’s the IP address of each hop then use the following command.

At command prompt type tracert www.yahoo.com you will see a list of all the hops and their IP addresses.

TRACEROUTE

Traceroute is a very useful network debugging command and it is used in locating the server that is slowing down the transmission on the internet and it also shows the route between the two systems.

ROUTE

Route command allows you to make manual entries in the routing table.

Hopefully the above mentioned commands will help you to diagnose the troubleshooting your computer networking problems.

Difference between network LAN, WAN, and MAN

What is the difference between LAN, WAN, and MAN. I know they sound a bit stupid, but these are the three different types of networks that you can have. When these connections become wireless they are renamed WLAN, WWAN, and WMAN.

LAN: (local area network) A group of computers that share a common connection and are usually in a small area or even in the same building. For example an office or home network. They are usually connected by Ethernet cables and have high speed connections. If it was a wireless setup it would be called a WLAN, which would have a lower connection speed.

MAN: (metropolitan area network) This is a larger network that connects computer users in a particular geographic area or region. For example a large university may have a network so large that it may be classified as a MAN. The MAN network usually exist to provide connectivity to local ISPs, cable tv, or large corporations. It is far larger than a LAN and smaller than a WAN. Also large cities like London and Sydney, Australia have metropolitan area networks.

WAN: (wide area network) This is the largest network and can interconnect networks throughout the worldand is not restricted to a geographical location. The Internet is an example of a worldwide public WAN. Most WANs exist to connect LANs that are not in the same geographical area. This technology is high speed and very expensive to setup.

I hope these definitions helped as I have tried to explain LAN, WAN, and MAN in non technical terms.

Notes:
Wireless LAN is WLAN. At the moment a wired connection is still always high speed. Even though having a Wireless LAN is less mess with no cables, it compromises on speed.
With new networks popping up all the time like 3G, GSM, and GPRS, the actual end user gets to connect directly to a WMAN which was unheard of. Most of these networks are mobile data standards that previously or still are used on cell phones.

Useful Router commands and configuration

Router (Router commands) working with two main ports, configuration and communication port. We manage all router setting using configuration port. Here are some useful router commands to manage router configuration.

Set Line Console Password

router>enable

router#configure terminal

router(config)#line console 0

router(config-line)#login

router(config-line)#password submask

router(config-line)#exit

router(config)#exit

Remove Console password

router>enable

router#configure terminal

router(config)#line console 0

router(config-line)#no login

router(config-line)#no password

router(config-line)#exit

router(config)#exit

Remove Secret Password

router>enable

router#configure terminal

router(config)#no enable secret

router(config)#exit

How to check Configuration Register Value

router>enable

router#show version

How to Administratively shutdown Router's Interface

router>enable

router#configure terminal

router(config)#int s0/0

router(config-if)#shutdown

To Enable Router's Serial Interface

router#configure terminal

router(config)#int s0/0

router(config-if)#no shutdown

To check Serial Interface

router>enable

router(config)#show interfaces s0/0

To set Clock rate on Router's Serial Interface

router>enable

router#configure terminal

router(config)#interface s0/0

router(config-if)#clock rate 64000

DTE/DCE Status

router>enable

router#show controllers s0/0

To Save Running Configuratoin

router#copy running-config startup-config

IOS uploading from Router to TFTP Server

router#copy flash: tftp

Backup Startup Configuration to TFTP

router#copy startup-config tftp

To Save Running Configuration

router#write memory

Deletion of NVRAM Configuration

router#write erase

To check NVRAM Configuration