Options

IP routing question

Tricon7Tricon7 Inactive Imported Users Posts: 238
I had a question on a test where you had something like this:

ip route 192.168.14.2 255.255.255.0 174.164.0.0

I'm still trying to sort out which IP address goes to what device/interface. Isn't the first IP the destination IP and the second IP the next-hop address? In the test question, with a multi-router setup, I often picked the right router, but the wrong interface. Some help would be appreciated.

Comments

  • Options
    Daniel333Daniel333 Member Posts: 2,077 ■■■■■■□□□□
    The mistake I always made was picking the router I was on, as the next hop. Rather than the connected int of the next router. Maybe that is what you mean?


    Like..............

    myHostA---(E0)RouterA(S0)---(S1)RouterB(E0)---myHostB

    And you want to set a default route from RouterA to RouterB, the command would have RouterB's S1 as the next hop.
    -Daniel
  • Options
    NightShade1NightShade1 Member Posts: 433 ■■■□□□□□□□
    look this is really simple

    Ra(cofign)#ip route 174.164.0.0 255.255.0.0 192.168.14.2


    RA(interfaceS1)
    (interfaceS0)RB(interfaceS1)
    RC

    Network between RA and RB 192.168.14.0/24
    Network between RB and RC 174.164.0.0/16

    You are doing that on RA

    the second ip means the next hop which is the interface S0 of RB


    The first address is a NETWORK address NOT a device address
    and that network address belong to the destination which is the network between RB and RC which is 174.164.0.0/16

    the mask you see is the mask of that network

    got it?
  • Options
    rossonieri#1rossonieri#1 Member Posts: 799 ■■■□□□□□□□
    look this is really simple

    Ra(cofign)#ip route 192.168.14.2 255.255.255.0 174.164.0.0


    RA(interfaceS1)
    (interfaceS0)RB(interfaceS1)
    RC

    Network between RA and RB 192.168.14.0/24
    Network between RB and RC 174.164.0.0/16

    You are doing that on RA

    the first ip means the next hop which is the interface S0 of RB
    the mask you see is the mask of that first ip address

    The second address is a NETWORK address NOT a device address like the first one...
    and that network address belong to the destination which is the network between RB and RC which is 174.164.0.0/16

    got it?

    Sorry -- this is a wrong questions and answer.

    there isno ip route 192.168.14.2 255.255.255.0 174.164.0.0

    cheers.
    the More I know, that is more and More I dont know.
  • Options
    ignign0ktignign0kt Member Posts: 42 ■■□□□□□□□□
    Let's change that up...

    ip route 10.0.0.0 255.0.0.0 192.168.1.100

    10.0.0.0 is the network you're making the route to.
    192.168.1.100 is the ip address of the next hop router in the direction of the 10.0.0.0 network

    If you use an interface name instead of an ip address like this:

    ip route 10.0.0.0 255.0.0.0 s0

    s0 is the interface of the router you're creating the static route on, not the next hop router.
  • Options
    NightShade1NightShade1 Member Posts: 433 ■■■□□□□□□□
    yeah its
    ip route 174.164.0.0 255.255.0.0 192.168.14.2

    first address is the network of the destination and second is the ip of the next hop
    i corrected my example up so its all cool

    sorry

    Another thing to add is that when you configure with the method of the one that you put the serial interface you willl see in the sh ip route that network directly connected even if its not... because it will give it an administrative distance of 0
  • Options
    stndrd_123stndrd_123 Member Posts: 113
    a simple way to remember is: first network # listed is the destination network with mask and then the second network # listed is the way to get there



    -cheers,
    brian
Sign In or Register to comment.