Day - 13
Day - 13
- Routing is the process of selecting the best path for data to travel from one
network to another. It allows devices on different networks to communicate with
each other.
- Think of routing like GPS navigation—the router chooses the best “road” (path)
to reach the destination network.
(i) Routed Protocol :- Routed protocols are used to carry user data (like
emails, web traffic, files) from one network to another.
- A Routed Protocol is a network protocol that allows data (user traffic)
to be sent from one network to another, using IP addressing.
- It carries actual data from source to destination, across multiple
routers/networks.
- In simple words:
- A routed protocol is the “package” that is being delivered, and it
contains all the necessary addresses to reach its destination.
- These protocols have IP addressing that helps routers forward data.
- Routing Table
- Contains routes to reach other networks.
- Built using routing protocols, static routes, and directly connected
routes.
- Shows next hop IP address or interface to use.
- Example:
Destination Next Hop Interface
192.168.2.0 192.168.1.2 Serial0/0
0.0.0.0 192.168.1.1 FastEthernet0/0
- So:
- Routing table = Shows paths to networks.
- Routed protocol = The actual data being sent (like IP).
- Routing protocol = The language routers speak to share routes.
- Simple Analogy:
- Routing Protocol = Google Maps (Finds best route)
- Routed Protocol = The actual car (Carries people/data)
- Routing Table = List of best routes (used by Google Maps app)
-----------------------------------------------------------------------------------
-------------------------------------------------------
- How Many Routing ways in Router :- There are 3 types of routing methods:
(i) Static Routing
(ii) Default Routing
(iii) Dynamic Routing
1. Static Routing
- Manually configured by the network admin
- Does not change automatically if the network changes
- Best for small or stable networks
- Pros:
- Simple, predictable
- No CPU usage for routing calculation
- More secure (no automatic updates)
- Cons:
- Time-consuming in large networks
- No automatic failover or path recalculation
- Example Command:
#Router(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2
2. Dynamic Routing
- Routers automatically exchange routing information
- Uses routing protocols like RIP, OSPF, EIGRP, BGP
- Ideal for medium to large, changing networks
- Pros:
- Auto updates and adapts to network changes
- Scalable for large networks
- Cons:
- More complex to configure
- Uses more CPU and bandwidth
- Example Configuration:
Router(config)# router ospf 1
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
3. Default Routing
- Used when a router doesn't know how to reach a destination
- All unknown routes go to a single gateway
- Common in edge routers or small networks with only one path to the Internet.
- Example:
Router(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.1
- This sends all unknown traffic to 10.0.0.1 (default gateway).
- Summary Table
Routing Type Configured By Adapts Automatically Best For
Static Routing Manually No
Small, secure networks
Dynamic Routing Automatically Yes
Medium/large networks
Default Routing Manually No
Edge/default gateway use
-----------------------------------------------------------------------------------
---------------------------
- Now let's find how much directly and indirectly network for the router.
- Destination network should be known
- AD(Administrative Distance) value of the Static Routing
- Secure and fast
- How Static Routing Works:
- When you configure a static route, you’re telling the router:
- “Hey! To reach network X, send the traffic via interface Y or next-hop IP
Z.”
- Example 1:
- You have two routers:
- Router1 IP: 192.168.1.1
- Router2 IP: 192.168.2.1
- Both connected via interface 10.0.0.1 and 10.0.0.2
- Add a static route on Router1 to reach 192.168.2.0/24:
#Router1(config)# ip route 192.168.2.0(Indirect Network)
255.255.255.0(Subent mask of indirect network) 10.0.0.2
- This tells Router1: “To get to 192.168.2.0, send packets to 10.0.0.2.”
- Important:
If the next-hop or exit interface becomes unavailable, the static route won’t
work. This is why it doesn’t adapt like dynamic routing.
-----------------------------------------------------------------------------------
------------------------------------------------------------
2. Default Routing :- Default routing is a method where you configure the router to
send all traffic for unknown destinations to a specific next-hop router or gateway.
- Default routes will be used for unknown destination or for all the
destination. when the destination is unknown, then default route is the solution.
- Think of it like this:
“If you don’t know where the destination is, send it to this exit.”
- Real-World Example:
- Let’s say you have a home router:
- You have devices in 192.168.0.x range
- Your router is connected to the Internet via ISP
- Your router doesn’t know IPs like 8.8.8.8 or 172.217.3.110 (Google). So it
uses a default route:
#ip route 0.0.0.0 0.0.0.0 [ISP’s IP]
- All traffic not destined for local LAN is sent to the Internet.