Ip route question
syriusblack
Member Posts: 1 ■□□□□□□□□□
in CCNA & CCENT
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?
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
-
Danman32 Member Posts: 1,243All 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. -
xwesleyxwillisx Member Posts: 158The 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. -
chinaman Inactive Imported Users Posts: 167You 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. -
hectorjhrdz Member Posts: 127198.218.1.0 255.255.255.0 198.218.1.4
that sentence is incorrect
destiny and next hop overlaps