Advertising the route information about networks into the routing table of a router is known as Routing or IP Routing. Router has a property
that, by default it maintains the information of its directly connected Networks.
Routing is a process in which, if router will receive traffic in any interface, after receiving traffic first router will check routing table, just to find out exit interface,it will switch to that exit interface and it will change l2 information in the traffic using ARP table to forward trafficout of that interface.
There are two (2) types of routing i.e IGP (Interior gateway Protocol) and EGP (Exterior gateway protocol) . IGP is furthur divided into Static Routing, Default Routing and Dynamic Routing and BGP comes under EGP.
Static routing is when you statically configure a router to send traffic for particular destinations in preconfigured directions. Feature of Static routing are:
- No control plain Traffic in Network.
- No CUP utilization because no exchange of control plain traffic.
- Can defice Statically.
- If the network runnig in particular interface defining next hop is up, static route is kept in routing table & Vice versa.
Syntax is: ip route (network id) (Subnetmask) (next hope address)
While performing Static routing you have to go on Configuration Terminal mode and write command "ip routing" followed by destination network id, Subnet mask and Next hop address in case of ethernet channel , if you are using Serial cabel you also can write Exit interface.
Lets go with Example.
Default routing is performed on Edge or end router basically router that is directly connected with ISP. default route is a setting on a device that
defines the packet forwarding rule to use when no specific route can be determined for a given Internet Protocol (IP) destination address.
All packets for destinations not established in the routing table are sent via the default route.
Default route is given least Priority whereas First Prority is given to Static route.
In above Topology if you want to redirect all traffic towards ISP which is received on Router 1 then you can use default route.