Monday, 15 May 2017

Router



Switches addressed the two frustrating problem that were inherent in hubs. Switches forwarded frames only to the port on which the destination lived thereby reducing traffic instead of flooding the entire network. The second problem was more fundamental and crucial; the problem of having one large collision domain. Switches split up one large collision domain into multiple smaller ones thereby reducing collisions and improving the network performance. However, we have seen that switches have two major drawbacks; 1) they can neither connect different networks (such as WAN with a LAN) together nor route packets through them and 2) they cannot split up the broadcast domains meaning that all broadcast frames would be sent out on the entire network instead of particular segment only. Second point is an important consideration. For eg. If a DHCP (Dynamic Host Configuration Protocol) server is present on one segment it is imbecile to forward the DHCP broadcasts to the entire network. Instead it should be sent only to the segment that houses the DHCP server. A DHCP relay agent often included in a router can be used in such a scenario. Also the security of a network increases by splitting up the broadcast domains and placing firewalls (Modern routers carry a firewall too in their tommies!). Both of the aforementioned shortcomings of a switch can be easily solved by a router; a highly intelligent device.

Working principle of device:
Router is basically a layer 3 switch meaning that it works at the 3rd layer (Network layer) of OSI reference model. Since it is a layer 3 device it uses logical addressing (IPv4/IPv6) to route packets through internetworks. Unlike switches and hubs it is capable of connecting a variety of disparate networks (eg LAN and WAN) together and select the best path (depending upon the real-time network traffic, congestion, distance vector and number of other metrics) through which to route the packet. It uses what is known as a routing table that maps host names to their corresponding IP addresses and their location on the network (network segment on which they are located). The table associates a ‘cost’ to every route from the source to destination. The cost is calculated by routing algorithms based various considerations such as the distance to be travelled, the state of the link etc. The most cost-effective path is chosen and the packet gets transmitted over it. The routing table may be static or dynamic. Static tables need to updated manually by the system or network administrator while dynamic tables refresh themselves actively. A feather and a stone both if dropped from the same height will fall to the ground at the same time, ‘Provided the air resistance is neglected.’ But ideal conditions just don’t exist in the real world! How easy it would have been if packets went straight to their destination via a single router and without getting entangled on the way! Unfortunately, just the way we have to change multiple flights to get to our destination packets too pass through many intermediate devices and hosts before embracing their final destinations! These intermediate devices are termed hops and the router of the network on which the hop is present will pass on the packet to the next hop. It means that the routing table of a router will have sufficient information to pass on the packet to the next hop but beyond that is not its headache!

A router is placed at the Gateway of the network. Gateway is the boundary of a network where it connects to the other one. Each port on a router represents its own broadcast domain. Hence routers break up one large broadcast domains into multiple smaller ones favoring performance. Also when routers cannot reach the remote destination host they discard the packet immediately and issue a failure error message to the sender of the packet.

Apart from the basic routing capabilities routers almost invariably provide add-on services and features such as firewall, NAT (network address translation), PAT (port address translation), MAC and IP filtering, DHCP server etc. Router firewalls are more effective than client based software firewalls. Also they take off the processing overhead from the system (as routers are specialized to perform those tasks) and free up resources.

All IP addresses on the internet should be unique. This is because only if the IPs are unique can the data be forwarded to the right host. If multiple hosts had the same IP address the routers would have a tough time deciding to which host, the information needs to go to. However, the number of IP addresses are limited due to its structure (there are a total of 2^32 unique IP addresses but again they are grouped into Class A, B, C, D and E. Out of the 5 classes D and E are reserved. Furthermore, certain ranges of addresses from classes A, B and C are reserved for use on a local network and are therefore called private IP addresses while others are reserved for loopback testing and diagnostic purposes. Only the remaining addresses, called public IP addresses, are available for the use on the internet. This leaves us with only a small number of public IP addresses although the total number of IPs possible is 2^32).  The total devices that need to be connected to the internet far exceed the number of available IP addresses. Hence we need a way to pool the private IP addresses (addresses used on local network) and map them to a single public IP address (routable address used on the internet). PAT is a service that does that. NAT is equivalent to PAT with the only difference that it is one-to-one translation instead of many-to-one.

Hosts can be allowed on to a network or can be denied access to it based on their MAC or IP addresses. The service that enables the routers to do this is MAC/IP filtering. Routers function as DHCP servers. They hand out IP configuration information to their clients. The scope of a DHCP server (configuration information supplied by it) include IP address, subnet mask, default gateway, DNS (domain name system) address, lease duration values etc. Out of these IP, subnet mask and default gateway are mandatory whereas other options are optional!

Device installation: Connect the router to a power source, turn it on and then connect all of the network segments either via a patch cable to the RJ-45 port or via Wi-Fi.s

Manufacturer of device, its models and prices:
1.      Cisco – Cisco Integrated Services Router 1921/K9 (Rs. 31,500)

2.      D-Link – D-Link Dir-600M Broadband Wireless Router (Rs. 789)

3.      Digisol – TP-Link TL-WR845N 300Mbps Wireless-N Router (White) (Rs. 1,185)


Standard Configuration of device: Most routers these days come with a Wi-Fi (Wi-Fi only works at Half-duplex; only one device can send or receive at a time) antenna(s). Certain routers can lack that facility, however. Thus routers can be used to build wired, wireless or a certain combination of both of them. Routers support multiple speeds and can work at full duplex (devices at both ends can transmit and receive simultaneously). The speed and duplex mode can be set manually or automatically (the entire network will slow down to match the speed of the slowest component and its duplex mode). Wrong speeds and duplex modes can cause catastrophic failures. Majority of the routers these days come with RJ-45 ports but fiber optic routers with SC, ST or LC ports are also available at a bit higher than usual cost. Routers featuring coaxial cable ports can only be found in a textbook of an old techie enthusiast! 

Cost: Home broadband routers are cheap and can be bought for a modest thousand or two. However, enterprise-grad rack-mounted routers having premium processors, innumerable ports, divine super-powers and what not can cost up to a lakh or so!

Market share of different models (Standard companies only):

l  Cisco
l  D-link
l  TP-Link

 

No comments:

Post a Comment

Processor

The emperor of the emperors who from time immemorial has and forever will reign the computer is his imperial majesty, the Processor. I...