ndalmolin_13
asked on
I can't ping a loopback IP on one router from another router in GNS3
Hello Experts,
I have what I'm sure is a simple question. I have two routers in GNS3. The routers are connected using fa0/1. I have configured R1 as follows:
!
Interface Loopback0
Ip address 10.10.10.10 255.255.255.0
!
Interface FastEthernet0/1
Ip address 10.1.1.1 255.255.255.252
duplex auto
speed auto
I have configured R2 as follows:
!
Interface FastEthernet0/1
Ip address 10.1.1.2 255.255.255.252
duplex auto
speed auto
At this point I can successfully ping 10.1.1.2 from R1 and 10.1.1.1 from R2. However I cannot ping 10.10.10.10 from R2. What am I missing?
Thanks
I have what I'm sure is a simple question. I have two routers in GNS3. The routers are connected using fa0/1. I have configured R1 as follows:
!
Interface Loopback0
Ip address 10.10.10.10 255.255.255.0
!
Interface FastEthernet0/1
Ip address 10.1.1.1 255.255.255.252
duplex auto
speed auto
I have configured R2 as follows:
!
Interface FastEthernet0/1
Ip address 10.1.1.2 255.255.255.252
duplex auto
speed auto
At this point I can successfully ping 10.1.1.2 from R1 and 10.1.1.1 from R2. However I cannot ping 10.10.10.10 from R2. What am I missing?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
unless there's a route.(as suggested by Fred - so ASSIGN POINTS TO FRED)
Static route on R2 is enough
R2
ip route 10.10.10.0 255.255.255.0 10.1.1.1
You need route on R2, since network 10.10.10.0/24 is not directly connected to R2.
On R2 you should have route in routing table that is pointing to network 10.10.10.0/24 or at least default network
#sh ip route
If you want to use OSPF to advertise route to R2
R1
router ospf 1
network 10.1.1.1 0.0.0.0 a 0
network 10.10.10.0 0.0.0.255 a 0
R2
router ospf 1
network network 10.1.1.2 0.0.0.0 a 0
:)
Fred's comment...
...isn't really relevant to this. The /30 is used as a transit link. It's a means to transport IP traffic while conserving IP addresses.
However, Fred's other comment...
...is exactly right.
Predrag's comment lets you use dynamic routes without adding a static, which is more to the point here, considering you're using OSPF, but you didn't reveal that until after Fred commented. As another option, you could also use the redistribute connected command in the OSPF process rather than including the network statement for the loopback...
That will advertise all routes from R1 to R2.
Adding networks to the OSPF process actually enables OSPF on the interfaces where the IP sits. You'll never advertise anything 'through' the loopback interface, so redistributing the connected interfaces will also work. The thing to remember with this though (which can be good and bad) is that it will automatically send any connected interface's route to any OSPF neighbours, so if you added loopback2 with 10.20.20.20/24 you'd see that in R2's routing table without touching the routing protocol.
The subnets are too small to allow that. 255.255.255.252 has but 2 usable addresses.
...isn't really relevant to this. The /30 is used as a transit link. It's a means to transport IP traffic while conserving IP addresses.
However, Fred's other comment...
Packets destined for that address will likely be dropped somewhere pretty quickly unless there's a route.
...is exactly right.
Predrag's comment lets you use dynamic routes without adding a static, which is more to the point here, considering you're using OSPF, but you didn't reveal that until after Fred commented. As another option, you could also use the redistribute connected command in the OSPF process rather than including the network statement for the loopback...
router ospf 1
redistribute connected
network 10.1.1.1 0.0.0.0 area 0
That will advertise all routes from R1 to R2.
Adding networks to the OSPF process actually enables OSPF on the interfaces where the IP sits. You'll never advertise anything 'through' the loopback interface, so redistributing the connected interfaces will also work. The thing to remember with this though (which can be good and bad) is that it will automatically send any connected interface's route to any OSPF neighbours, so if you added loopback2 with 10.20.20.20/24 you'd see that in R2's routing table without touching the routing protocol.
Per Craig Beck: It appears that I misunderstood the notation. Indeed a linking subnet that's as small as /252 can be used for linking 2 subnets.
I guess since we're discussing routing, I'd feel better knowing what *is* the "other subnet". So far, I see this:
10.10.10.0/24 <Router 1> 10.1.1.1.<link> 10.1.1.2<Router 2> xxx.xxx.xxx.xxx???
So, I can write the complete route from RT2 subnet to RT1subnet:
10.10.10.xxx next hop 10.1.1.1
there would be a corresponding route to RT2 subnet:
xxx.xxx.xxx.xxx next hop 10.1.1.2
I think that's correct.
I guess since we're discussing routing, I'd feel better knowing what *is* the "other subnet". So far, I see this:
10.10.10.0/24 <Router 1> 10.1.1.1.<link> 10.1.1.2<Router 2> xxx.xxx.xxx.xxx???
So, I can write the complete route from RT2 subnet to RT1subnet:
10.10.10.xxx next hop 10.1.1.1
there would be a corresponding route to RT2 subnet:
xxx.xxx.xxx.xxx next hop 10.1.1.2
I think that's correct.
ASKER
!
router ospf 1
log-adjacency-changes
network 10.10.10.10 0.0.0.255 area 0