Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is this working?

Status
Not open for further replies.

tsadi

Technical User
Apr 11, 2006
13
DK
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

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

Router 1:

interface Loopback1
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 154.151.200.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.0.0 255.255.0.0 FastEthernet0/0
ip route 192.100.0.0 255.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.0.0 255.255.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

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

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.151.0.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?
 
no your assumption is correct this is a ppp link point-to-point, and will probably be a leased line, so as the config is it will work without a router in between the link.
 
The routers are configured incorrectly, but it is still working because you're using static routing. Things might not work so well if you tried to turn on dynamic routing. Both ends on a point-to-point link should be in the same subnet.
 
point to point you could even go ip unnumbered on the serial interfaces.
 
Very true. In this particular setup, there's not even a reason to have IP addresses on the serial interfaces.
 
Yea, the routing is working because of the static routes on both sides. And like jneiberger said, you would want to reconfig it to run a routing protocol.
 
Yea, the routing is working because of the static routes on both sides. And like jneiberger said, you would want to reconfig it to run a routing protocol.

WHY?!!!
 
Why? Because the routing protocol will not work properly if both ends of the link aren't in the same subnet. It is a misconfiguration. You can't expect dynamic routing to work when your layer three config is broken.
 
Is this a trick question? ;-) Dynamic route exchange. Static routing works great, depending on your topology and addressing scheme, but it doesn't scale in certain environments. If you need dynamic route exchange then you run a routing protocol.
 
just wondering why you advise to turn on a routing protocol in a ppp link, when this type of topolgy is flat, I know when & why to deploy a routing protocol, but couldn't fathom why I would deploy one in a simple 2 node ppp link :)
 
You wouldn't if it was just two nodes. But why assume that these are the only two nodes now and also that they'll be the only two nodes in the future? Besides, I was speaking in a more general sense, not necessarily about this particular design.

The greater point was that this is a misconfiguration that needs to be fixed, either by using ip unnumbered or by fixing the addressing.
 
Also, the routing protocol tells router 1 how to get to not router2's serial interface (being ppp, it already knows!), but how to get to router 2's other networks on the other interfaces. Notice tsadi mentions that router 1 is able to ping the inside router 2 networks. She can ping from one LAN to the other. The WAN part is obvious. If 2 routers interconnect, of course you would need connectivity between them, and outside them if more routers are in play. If router 1 and 2 serial interfaces are in different subnets, then they could not communicate with eachother without knowing how to get to eachother. tsadi's example shows that they do know how to communiucate because of the configured static routes. Bye bye.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top