What is routing? What is difference between routing and switching?
Here comes OSI Model (or TCP/IP, what is a "little" OSI Model) into the game.
Switches only work at Layer 2 (Datalink layer). They dont need an IP-Address to do their job. Switches are only interested in MAC Addresses. They learn the mac-address of connected pcs and write them in their mac-table.
Switches can only be used to connect devices, which are in the same subnet.
If we want to bring traffic from one subnet to another subnet, we need a router between the subnets.
The router holds a routing table. In the routing table are entries, which say, over which of the router ports a paket with a specific destination IP-Address has to be send.
Routing protocols are used to route a routed protocol. Routed Protocols are IP, IPX or AppleTalk.
Routing protocols are used by routers to select best path to destination.
Routing protocols are used to send routing information to other routers.
There are three different "Types" of Routing Protocols
1. Distance Vector Routing
RIP1 RIP2 and IGRP
-advantage RIP: RIP is simple to configure, and works on all routers (compatibility)
-disadvantage RIPv1:no VLSM support, higher bandwidth waste, metric is very simple and unintelligent
-RIP1 and IGRP do not support VLSM (Variable Length Subnet Mask) and so do not send Subnetmask Information via Route-Updates
-sends entire Routing-Table to directly connected Neighbours
-RIP uses as Metric (for best Path Selection) "Hopcounts".
A Hop is a router in the Path.
If there are 5 routers on the path to a destination, and 3 routers on another path,
the second route will be choosen, because it has less Hops to destination.
Maximum Hop Counts are 15 in RIP.
-IGRP uses "cost" as Metric. Dependent on Bandwidth and Delay is the best path selected.
-variance and traffic-share commands can be used for loadbalancing on IGRP
-IGRP maximum Hopcount is 255.
-IGRP is proprietary, can only be used between Cisco Routers.
2. Hybrid Routing
-reduces bandwidth useage on routing updates
-supports multiple network layer protocols (apple talk, ipx, ip)
-EIGRP uses same metrics as IGRP; Delay, Bandwidth, Reliability and Load. By default, only Delay and Bandwidth
-Only EIGRP Routers of the same Autonoumous System exchange Routingupdates.
-Maximum Hopcount is 255.
-EIGRP is proprietery, only between Cisco Routers useable.
1. Neighbour table
-lists adjacent routers, comparable to adjacencies database used by ospf
-only lists informations about directly connected neighbours
2. Topology table
-here are all route entries for all destinations that router has learned
-contains "Feasible Successors". These are backup routes, if "Successor Route" (which is primary route) fails.
3. Routing table
-the best route from topology table, becomes "Successor Route" or "Primary Route" and is choosen to forward traffic to destinations.
The "successor" is placed in topology table, and also in routing table!!!
Feasible successors (backup routes) are only saved in topology table. (Cisco ICND Book page 3-101)
The selection which feasible successor will become new successor, if successor fails, is done with DUAL (Diffusing Update Algorithm).
3. Links State Routing
OSPF and ISIS
-OSPF:Hirarchical System. One or more "Areas" are connected to a "Backbone Area" which is Area 0.
-Routers send Linkstate-Informations to all other Routers of their area.
-The Link States are Informations of bandwidth and status of the routerinterfaces.
-Based on the LSAs all Routers build a Topology Database, which is a "Model" of the entire area.
-Djikstra Algorythm calculates from the Information in Topology Database the shortest path and creates the Routing Table.
-OSPF: Hopcounts unlimited
-Used in huge Networks
-ospf: useable area numbers go from <0-4294967295>
IGRP and RIP v1 do NOT support variable length subnet mask.
That means, no subnetmask information is sent to other routers via route-updates.
Also called "classfull" routing.
RIP v2, EIGRP, OSPF and ISIS support VLSM.
On a router can run more than one routing protocols in the same time.
The router has to decide, which of the configured protocols he will believe more.
That decisions are made with the aministrative distance.
The lower the AD is, the more will this route be prefered for selection of best path to destination.
0 Directly connected Interface
1 Static Route
How to configure...
The network command defines the networks hosted by THIS Router, depending on the IP of the Router Interfaces.
Networks of the other RIP routers will be learned by RIP updates.
router igrp 33
The 33 is the Number of the Autonomous System.
Only IGRP Routers from the same AS exchange Routing Updates.
router eigrp 33
router ospf 1
network 18.104.22.168 0.0.0.255 area 0
network 22.214.171.124 0.0.63.255 area 0
The 1 is the Process Number, which is only locally significant.
If there are more than one area, which represent a "part" of the hirarchy,
all areas must be connected to the backbone area.
5. Static Route
ip route 126.96.36.199 255.255.255.0 188.8.131.52
This is ip of the NEXT Hop Routerinterface over which the network 143.45... is reachable.
ip route 184.108.40.206 255.255.255.0 s0 This is the LOCAL routerinterface over which the network 143...is reacheable
6. Default Route or Gateway of last resort
ip route 0.0.0.0 0.0.0.0 220.127.116.11 This is the remote IP of the next hop Router interface
ip route 0.0.0.0 0.0.0.0 s0
This is the local interface s0 on that router
Means: Route all Pakets, for which are NO Routes in the Routing Table, over THIS Interface.
To see in realtime, what a routing protocol is doing, give in command
debug ip ospf
To see the entries in routing table use command
show ip route
Check all active routing protocols with command
show ip protocols