Ip route question

syriusblacksyriusblack Member Posts: 1 ■□□□□□□□□□
I have a question regarding Ip routes.

Does an ip route targeting a specific network to a specific address restrict all other ips from that address. For example.

198.218.1.0 255.255.255.0 198.218.1.4

Does this entry restrict all other addresses besides 198.218.1.0 from getting to 198.218.1.4 or does it only tell 198.218.1.0 where to go?

Comments

  • Danman32Danman32 Member Posts: 1,243
    All it is saying is to get to network 198.218.1.x (x because of subnet mask), forward the packet to 198.218.1.4 if the destination network isn't already directly attached to the router.

    Actually, your example actually specifies the interface to use to reach the directly attached network 198.218.1.x using interface with IP 198.218.1.4.
  • xwesleyxwillisxxwesleyxwillisx Member Posts: 158
    The first portion of the ip route command specifies the destination network. What follows can be either the outgoing interface of the local router or the ip address of the next hop router. In your example, 198.218.1.4 would be the next hop router.

    As a side note, if the destination address of an ip route statement looks like this: 0.0.0.0 0.0.0.0; that defines a "default-route". If the router does not know how to get to a destination, it will forward the data through this default-route.
  • chinamanchinaman Inactive Imported Users Posts: 167
    You can also use ip route 0.0.0.0 0.0.0.0 s0 whre s0 means the local interface of the router and it will be used because it has an Admin distance of 0 while static route has 1

    When configuring IGP and want to advertise a route to other netowrk that there is a default route use ip default network ip address.
  • hectorjhrdzhectorjhrdz Member Posts: 127
    198.218.1.0 255.255.255.0 198.218.1.4


    that sentence is incorrect

    destiny and next hop overlaps
  • chinamanchinaman Inactive Imported Users Posts: 167
    destination network and next hop address
Sign In or Register to comment.