- Unless programmed, a router is as good as a piece of brick, a very expensive brick.Routers understand (deals with) destination networks only.how IP routing command cisco switch Database useful are explain below
- When an IP address is assigned and enabled, each interface of a router supports a unique network. A single interface can also be programmed to support multiple networks. This setup is known as a router-on-a-stick, something we’ll talk about when discussing inter-vlan routing.
- Two or more interfaces of the same router cannot be assigned IP addresses belonging to a single network; they all have to be part of individual unique networks.
Programming a Router: A router becomes aware of other networks the following ways:
How | Who | Process | |
1. | Directly Connected Interfaces | By Administrator | Via attached interfaces |
2. | Static or Default Routing | By Administrator | When a command(s) is entered |
3. | Dynamic Routing | By Routing Languages, RIP, EIGRP, etc. | When the Language is loaded |
Directly Connected: The following must happen to an interface before a router becomes self-aware of the networks it is attached to:
- The interface must have an IP address assigned belonging to a unique network.
- The interface must be enabled (no shut).
- The interface must be connected to a switch or other devices and have a carrier detect (CD).
IP routing command cisco -1
Static Route: The command syntax for a static route is given below:
ip route destination-network subnet-mask of destination-network exit-interface
OR
ip route destination-network subnet-mask of destination-network next-hop
Note: It is the “subnet-mask of the destination-network” and not the subnet-mask of the next-hop. Also, the ip address of the exit-interface cannot be used, the name of the exit-interface, in this case s0/0/0, must be used.
Examples of Static Routing Commands:
Destination network | Subnet mask of destination | Exit Interface/Next hop | |
ip route | 172.16.50.0 | 255.255.255.0 | s0/0/0 |
ip route | 172.16.50.0 | 255.255.255.0 | 172.16.40.2 |
Default Route: A default route is a special kind of static route. The command syntax for a default route is given below:
IP routing command cisco -2
ip route 0.0.0.0 0.0.0.0 exit-interface
OR
ip route 0.0.0.0 0.0.0.0 next-hop
OR
ip default-network destination-network
Note: In the last command, this destination-network must be attached to one of the exit interfaces. Also, note that in this case the subnet mask is not needed because the destination network is attached to the interface, and therefore, the router is already aware of the subnet mask.
IP routing command cisco -3
Examples of Default Routing Commands:
Destination network | Subnet mask | Exit Interface/Next hop | |
ip route | 0.0.0.0 | 0.0.0.0 | s0/0/0 |
ip route | 0.0.0.0 | 0.0.0.0 | 172.16.40.2 |
ip default-network | 172.16.40.0 | N/A | N/A |
Dynamic Routing: Routers can speak with each other using a special language of their own and populate the routing table dynamically. The table is maintained dynamically and no intervention is required. The following stipulation applies to dynamic routing:
- Some languages (routing protocols) routers speak in are RIP, EIGRP, etc.
- In general, routers speaking in RIP cannot communicate with routers speaking in EIGRP. However, they may be able to understand each other in a limited fashion via redistribution (translation).
- Each language is given a rating based on its trustworthiness (sophistication). This trustworthiness is also known as Administrative Distance. Warning: Administrative Distance has nothing to do with physical distance. The lower the AD the higher the trustworthiness. For example, RIP has an AD of 120 and EIGRP has an AD of 90, therefore, EIGRP is more trustworthy than RIP.
Routing language (routing protocol) characteristics:
- Distance-Vector – RIPv1, RIPv2
- Link-State
- Hybrid (Mixture of Distance-Vector & Link-State) – EIGRP
RIPv1 vs RIPv2
Features |
RIPv1 |
RIPv2 |
Understands Subnetting | No | Yes |
Allows authentication | No | Yes |
IP routing command cisco -4
RIP Commands
router rip
network
version 2
IP routing command cisco -5
RIP Commands with explanation:
router rip – start the engine (language) for RIPv1 ONLY
network – broadcast attached network(s) only
version 2 – enable RIPv2
IP routing command cisco -6
Other RIP Commands
sh ip route – display routing table
sh ip protocols – display routing protocols (languages) running
debug ip rip – troubleshoot RIP
undebug all – stop all debugging