Why is this working?

Unanswered Question
Apr 12th, 2006
User Badges:

Router 1:


interface Loopback1

ip address 192.168.1.1 255.255.255.0

!

interface FastEthernet0/0

ip address 154.x.x.10 255.255.0.0

duplex auto

speed auto

no mop enabled

!

interface FastEthernet0/1

no ip address

shutdown

duplex auto

speed auto

!

interface Serial0/0/0:0

ip address 192.168.10.1 255.255.255.0

encapsulation ppp

!

ip classless

ip route 154.151.x.x.255.0.0 FastEthernet0/0

ip route 192.100.x.x.255.0.0 Serial0/0/0:0

ip route 192.168.2.0 255.255.255.0 Serial0/0/0:0

ip route 192.168.20.0 255.255.255.0 Serial0/0/0:0

ip http server


---------------------------------------


Router 2:


interface Loopback1

ip address 192.168.2.1 255.255.255.0

!

interface FastEthernet0/0

ip address 192.100.200.10 255.255.0.0

duplex auto

speed auto

!

interface FastEthernet0/1

no ip address

shutdown

duplex auto

speed auto

!

interface Serial0/0/0:0

ip address 192.168.20.1 255.255.255.0

encapsulation ppp

!

ip classless

ip route 154.151.x.x.x.0.0 Serial0/0/0:0

ip route 192.168.10.0 255.255.255.0 Serial0/0/0:0

ip route 192.168.1.0 255.255.255.0 Serial0/0/0:0

ip route 192.100.0.0 255.255.0.0 FastEthernet0/0

ip http server


--------------------------------------


These 2 routers are connected with WIC cards and its possible to ping from one LAN to the other. The problem i see is that the connected serial interfaces are in different network:


Router 1: 192.168.10.1 255.255.255.0

Router 2: 192.168.20.1 255.255.255.0


I have only one explanation. Its working because the IP routes are set up in a way where they are not concerned about what IP the other routers have, only on what interface to exit. lets say a guy on 154.x.x.0 is pinging a PC on 192.100.0.0 this route is used:


ip route 192.100.0.0 255.255.0.0 Serial0/0/0:0


which is not concerned about the other router serial 0 IP, but only on what interface to exit to reach 192.100.0.0


is this correct or does there have to be a router in between these routers, routing from one serial 0 to there other serial 0?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
ankurbhasin Wed, 04/12/2006 - 00:57
User Badges:
  • Red, 2250 points or more

Hi Friend,


According to me there should be a router in between which is doing routing between 192.168.10.x and 192.168.20.x subnet.


Regards,


Ankur

globalnettech Wed, 04/12/2006 - 01:28
User Badges:
  • Silver, 250 points or more

Hello,


if you do a ´show ip route´ on both routers, you will see that there is a /32 host route in each of the router´s routing tables for the IP address of the other side. That is why they can ping each other, and that is what PPP does by default (injecting those host routes). If you configure the command ´no peer neighbor-route on your interfaces, the host routes will not be injected, and in order for both routers to be able to see each other, a common subnet (or an intermediate router, as Ankur suggested) would be required.

Does that make sense ?


Regards,


GNT

boblutton Wed, 04/12/2006 - 05:11
User Badges:

Isn't it directly connected ?

Will ppp interface report all directly connected devices ?


Richard Burts Wed, 04/12/2006 - 05:30
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

The observation by thomas in the original post is correct. The routers are directly connected but configured with different networks on the serial interfaces. Normally this would be a problem. But in his case each router has static routes for the networks on the other router and the static routes point at the outbound interface and do not reference the next hop address. This works fine when the connecting interfaces are point to point serial. It would be slightly more problematic if the connecting interfaces were LAN interfaces.


HTH


Rick

limtohsoon Wed, 04/12/2006 - 23:22
User Badges:

Hi,


I agree with GNT. PPP will install a /32 host route of the other peer in the local router's routing table. Unless you configure the interface command "no peer neighbor-route".


I also notice in Thomas' config that the static route pointing to FastEthernet 0/0 on both routers are not required because they are directly connected to each router. In any case, do not point static route out any multi-access broadcast media (e.g. FastE) because it has adverse effect on the router's CPU.



I have another scenario. If both routers serial interfaces are now on the same subnet, such as:


Router 1: 192.168.1.1/24

Router 2: 192.168.1.2/24


Instead of configuring static routes pointing to egress interface, let's say I have the following static route on Router 1 to reach the LAN of Router 2:


ip route 192.168.0.0 255.255.0.0 192.168.1.3


Pointing to the wrong next hop, what's the effect?


Thank you.


B.Rgds,

Lim TS


Richard Burts Thu, 04/13/2006 - 06:27
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Lim


I agree that the static route to the local Fast Ethernet interface is not needed. It does no harm but also does no good - and to the extent that it complicates the config I would suggest removing that static route.


In your scenario where the router serial interfaces are configured on a common subnet and a static route is configured with an incorrect next hop, the results depend on the encapsulation of the link. If the encapsulation is point to point HDLC or PPP (which do not require layer 3 to layer 2 mapping) I believe that the router will correctly forward packets over the serial interface. However if the encapsulation is something that requires layer 3 to layer 2 mapping, like Frame Relay does, then I think that the router would not forward since it would not have a mapping for the next hop address.


HTH


Rick

limtohsoon Thu, 04/13/2006 - 06:48
User Badges:

Hi Rick,


Thanks for your feedback.


If the static route remains in the config, what do you think you will see if you do "show ip route"? Since the static is pointing to an interface, do we have two identical connected networks now? If yes and the router starts to load-balance, I'd see harm.


With reference to whether the router will forward correctly over an HDLC/PPP link if the next hop of a static route is incorrect, I'd do a lab test to confirm. But I do agree with you. It should forward correctly, unlike Ethernet or FR which require ARP or Inverse ARP mappings.


Thank you.


B.Rgds,

Lim TS


Richard Burts Thu, 04/13/2006 - 07:16
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Lim


Since the static route for the FastEthernet network pointed to the FastEthernet interface I am convinced that there is no adverse effect. And even if the static route pointed at a different interface (perhaps the serial) there would be no adverse impact. This is because the static route does not show up in the routing table. If there is a connected interface for a network (or subnet) and a static route is configured for the same prefix (same address with same mask) then only the connected route is seen in the routing table. Even though the static route is in the config there is only a single entry in the routing table - and it is the connected interface route. I just did this on a router to confirm the behavior.


HTH


Rick

limtohsoon Mon, 04/17/2006 - 02:02
User Badges:

Hi Rick,


I also have done it on a test router. Reason the static route (same prefix as the connected FastE) doesn't show up in the routing table is because the static route has an AD of 1 (I've read some books which say that static route pointing to interface has AD of 0. I guess the author is wrong).


This is proven with the following config:


!

ip route 10.0.0.0 255.0.0.0 FastEthernet0/0

!


Router#sh ip route 10.0.0.0

Routing entry for 10.0.0.0/8

Known via "static", distance 1, metric 0 (connected)

Routing Descriptor Blocks:

* directly connected, via FastEthernet0/0

Route metric is 0, traffic share count is 1



Thank you.


B.Rgds,

Lim TS


Richard Burts Tue, 04/18/2006 - 07:19
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Lim


Your config is a good confirmation of the point and supplies some detail filling out my comments. You are very correct that static routes (even those specifying a connected interface) have AD of 1 where connected interfaces are AD of 0.


The belief that static routes to connected interfaces are AD of 0 is fairly widespread and can be found in a number of books. But as you point out, they are mistaken. This is another demonstration that sometimes the best thing is to try things on actual routers and see what the behavior is.


HTH


Rick

Actions

This Discussion