12-04-2012 08:25 AM - edited 03-04-2019 06:18 PM
Hi
when a server in the subnet 10.10.10.10/24 needs to talk to server 200.10.10.10 , first the server needs to contact his D/G 10.10.10.100 , in order to reach 200.10.10.10 (N:B the D.G has a static route to reach 200.10.10.10) QUESTION does this server needs to contact his D/G each time needs to talk this server or some cache taken place , pls explain how?
thanks
jamil
12-04-2012 08:36 AM
Yes, it will go to the gateway everytime. That being said, there are things called "ip redirects" that if you have 2 routers on the same segment (read switch), and the default gateway is .1, but your other router is .2, if the route to 200.10.10.10 is pointing to router .2, then the default gateway can send a redirect to the host stating that "to get to 200.10.10.10, your better path is .2". Then the host can send directly to .2 everytime...
HTH,
John
*** Please rate all useful posts ***
12-05-2012 03:56 AM
Hi Jon
thanks for ur reply
Would you please explain more about the routing logic
thanks
ibrahim
12-05-2012 04:02 AM
Hi,
from a host perspective: i need to send an IP packet to a destination IP so
1° I do a logical bitwise AND between my IP address and my subnet mask
2° I do the same operation between the destination IP and my subnet mask
3° I compare both results: if equal then they are on same subnet and so I must arp for the destination MAC
If non equal then they are on different networks and so I must arp for my default gateway MAC
4° before sending an arp request I look into my arp cache if it doesn't already exist and if not I send the request and cache the reply
5° I can then construct my frame and send it on the wire
6° if external IP the gateway will take care of the routing.
Regards.
Alain
Don't forget to rate helpful posts.
12-05-2012 04:25 AM
thanks Alain
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide