Today, I will present two small eNSP experiments: How can different subnet direct connection interfaces communicate with each other?
To achieve full network intercommunication, we need routers to exchange routing information between different protocols or run the same routing protocol across the entire network. However, in actual networks, it is often necessary to run multiple routing protocols. This involves route redistribution, which introduces routes discovered by other routing protocols. For example, you can redistribute routes from the OSPF routing domain and announce them to the RIP routing domain, or you can redistribute routes from the RIP routing domain and announce them to the OSPF routing domain. Route redistribution can occur between all IP routing protocols.
Case Study
For instance, a company has two departments, each department is an independent local area network. To enable these two departments to communicate effectively and share resources, each department uses a router for connection. The two routers are connected through an ISP router. Currently, R1 and R2 run the RIP routing protocol, while R2 and R3 run the OSPF routing protocol. Appropriate configurations are now needed to resolve communication issues.
As shown in the diagram below:
Topology Diagram
Training Steps
(1) Configure the IP address and default gateway for the hosts.
PC1: 192.168.1.2/24 192.168.1.1
PC2: 192.168.4.2/24 192.168.4.1
(2) Log into routers R1, R2, and R3 to configure the Ethernet interface IP addresses.
R1:
Router#configure terminal
Router(config)#int f0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config)#int f0/1
Router(config-if)#ip address 192.168.2.1 255.255.255.0
R2:
Router#configure terminal
Router(config)#int f0/1
Router(config-if)#ip address 192.168.3.2 255.255.255.0
Router(config)#int f0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
R3:
Router#configure terminal
Router(config)#int f0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config)#int f0/1
Router(config-if)#ip address 192.168.4.1 255.255.255.0
(3) Configure RIP and OSPF protocols on routers R1 and R3 respectively.
R1:
Router(config-router)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
R3:
Router(config-router)#router ospf 1
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-router)#network 192.168.4.0 0.0.0.255 area 0
R2:
Router(config)#router rip
Router(config-router)#network 192.168.2.0
Router(config-router)#exit
Router(config)#router ospf 1
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Use show ip route to view routing information; you will not get full routing information.
Router(config)#router rip
Router(config-router)#redistribute ospf 1 metric 10
Router(config-router)#exit
Router(config)#router ospf 1
Router(config-router)#redistribute rip subnets
Router(config-router)#end
(3) show ip route
Perform ping tests from the PCs;
————————————————————————
Huawei Configuration:
Port IP address configuration omitted.
Configure RIP and OSPF protocols on routers R1 and R3 respectively.
R1:
[Router]rip
[Router-rip-1]network 192.168.1.0
[Router-rip-1]network 192.168.2.0
R3
[Router]ospf
[Router-ospf-1]area 0
[Router-ospf-1-area-0]network 192.168.3.0 0.0.0.255
[Router-ospf-1-area-0]network 192.168.4.0 0.0.0.255
R2
[Router]rip
[Router-rip-1]network 192.168.2.0
[Router]ospf
[Router-ospf-1]area 0
[Router-ospf-1-area-0]network 192.168.3.0 0.0.0.255
Use dis ip routing to check routing information; you will not get full routing information.
[Router]rip
[Router-rip-1]import ospf 1
[Router]ospf
[Router-ospf-1]import rip (injecting RIP into OSPF)
(4) dis ip routing
Perform ping tests from the PCs:
Route redistribution allows multiple routing protocols to exchange routing information in a multi-vendor environment, enabling efficient support for various routing protocols within the same interconnected network. The routers executing route redistribution are known as boundary routers, as they are located at the boundaries of two or more autonomous systems.
When performing route redistribution, the metric units and administrative distance must be considered. Each routing protocol has its own metric standards, so during redistribution, it is necessary to convert the metrics to ensure compatibility.
The seed metric is defined in route redistribution, representing the initial metric value of a route coming from external redistribution.
For example:
router ospf 100 redistribute rip metric 10 means to inject the routes learned from RIP into OSPF, allowing OSPF to learn these routes as well. However, the meaning of metrics in OSPF and RIP is different. OSPF defines metrics based on COST, while RIP defines metrics based on hop count. Therefore, to make OSPF understand the metric from RIP, the routes published from RIP are assigned a cost of 10 (this 10 is defined arbitrarily; the actual cost may not be 10, but this value is used for redistribution to indicate the metric; sometimes it is specially considered for optimal paths or load balancing). router rip version 2 redistribute ospf 100 metric 1 has a similar meaning. To allow RIP to understand OSPF’s metric, the metric assigned to routes redistributed from OSPF is defined as 1, meaning RIP considers the routes learned from OSPF as a single hop (whether it is actually one hop is not guaranteed; this is just to make both sides understand each other’s metrics). When other routing protocols are published to RIP, the metric value must be considered, as RIP will not include routes with more than 15 hops in the routing table; therefore, the metric value during redistribution should be between 1-14, and generally, unless there are special requirements, the value is habitually chosen as 1. The same applies to route redistribution from other routing protocols; it should be within the metric value range of the respective protocol.
The route redistribution we discussed mainly occurs between RIP, OSPF, EIGRP, and IS-IS.
Dynamic routing protocols can introduce other dynamic routes or static routes, including default routes. Here, we will discuss dynamic default routes.
Difference between Static Default Route and Dynamic Default Route:
A static default route is a path specified on a router. When the router has no path to a remote network, it will use this path, formatted as ip route 0.0.0.0 0.0.0.0 XXX.XXX.XXX.XXX (or interface).
But what is a dynamic default route, and how does it differ from a static default route? For example, in a star topology where R1 is the core router and the rest (R2, R3, etc.) are branches, we want the core router to inform the branch routers that when they cannot find a path to reach a remote network (regardless of what remote network it is), they should send all traffic through the core router to reach the remote network. Furthermore, when a new router joins this topology, it should also receive this default route. How should this be done? (Note that any router that can dynamically obtain the network from the core router will receive this default route, such as EIGRP denoted by D*).
The solution is to redistribute the default route on the core router (note that this is not done on the branch routers, which is different from static default routes). Various dynamic routing protocols have different methods:
1. In RIP, the default route is injected into other routers using the default-information originate method.
2. In OSPF, there are several situations:
(1) To inject a default route into a regular area, use the default-information originate method. If a default route already exists, there is no need to include the always parameter; otherwise, the always parameter must be included. Once this command is executed, the router will become an ASBR. The default route will exist in all routers as a type 5 LSA (represented as O*E2 in the routing table).
(2) For stub areas or totally stubby areas, the ABR of the stub or totally stubby area automatically generates a summary route with all zeros (represented as O*IA in the routing table), so no additional consideration is needed.
(3) For NSSA areas, the ABR connected to it will not automatically generate a default route by default; if needed, the area X nssa default-information originate command must be used to force generation, which will create a type 7 LSA (represented as O*N2 in the routing table).
3. In IGRP, the default route cannot be injected into other routers using the default-information originate method. IGRP does not recognize the default route of eight zeros; instead, it requires the use of ip default-network *.*.*.* to mark a network as the default route, and the router will automatically distribute the default route to other routers via IGRP. Here, note a difference:
ip default-network and ip route 0.0.0.0 0.0.0.0 are both used on routers where IP routing is effective, but the main difference lies in whether the routing protocol propagates this route information. For example, IGRP cannot recognize 0.0.0.0, so it must use ip default-network when propagating the default route. When multiple default routes are set using the ip default-network command, the one with the shortest administrative distance becomes the final default route; if there are multiple routes with equal distance values, the one higher up in the routing table (show ip route) becomes the default route.
When using both ip default-network and ip route 0.0.0.0 0.0.0.0 to set default routes, if the network set by ip default-network is directly connected (static and known), it becomes the default route; if the network set by ip default-network is derived from exchanged routing information, the entry specified by ip route 0.0.0.0 0.0.0.0 becomes the default route.
Finally, if multiple ip route 0.0.0.0 0.0.0.0 commands are used, the traffic will automatically load balance across multiple links.
In EIGRP, there are two ways to handle a default route of eight zeros:
1. ip route 0.0.0.0 0.0.0.0 next-hop IP address. This method of default route will not inject the default route into other routers even if the network 0.0.0.0 is declared.
2. ip route 0.0.0.0 0.0.0.0 directly connected interface. For this method of default route, declaring network 0.0.0.0 will announce the default route to other routers.
3. Use redistribute static to redistribute the default route.
However, note that declaring network 0.0.0.0 will cause all networks on the router to be declared into the EIGRP process, so it is not recommended to use method 2 to publish the default route.
Using ip default-network 0.0.0.0 cannot inject the default route of eight zeros into other routers. Instead, it can use ip default-network to inject non-eight-zero routes into other routers.
In summary: ip default-network is used in RIP, IGRP, and EIGRP.
default-information originate is used in RIP, OSPF, IS-IS, and BGP.
redistribute static is used in RIP, EIGRP, and BGP.

Scan to Follow Us
