01-03-2011 06:23 AM - edited 03-06-2019 02:47 PM
Hi every body.
Let say we have a windowXp host configured with ip address 10.10.10.10/8, default gateway is 10.10.10.1/8. windowXp and defaukt gateway both are connected layer 2 switch. The routing logic the host uses is as follows;
1) find the network number in received ip address using mask configured on its ethernet port.
2) if the ip address is on the different network i.e not on 10.0.0.0/8, sends the packet to default gateway.
The above is true when host is connected Via ethernet port or some other LAn port.
Now consider the following Scenario.
Let say we two window xp host, one in arizona and the other is Newyork.
we want to connect this computer using modems .
window-host(az)----modem--------PSTN-------------modem-----window-host(NY)
My first question is since modem are acting as layer 1 device, therefore two hosts must share the same network , correct?
When sending packet via modem, how does Host decide or determine to use Modem, for example in When connected Via Lan port, a host used the above mentioned logic- finding the network number from ip packet that need to be transmitted and decides whether to use default gateway or not. But how does determine or what routing logic a window xp host uses to decides whether this packet should be sent via modem port or not ?
Thanks and have a great week
01-03-2011 02:59 PM
Getting down to basics, if one host wants to talk to another host on the same network they will send it directly regardless if it is via LAN, WAN or wahtever they have to ARP for it. Taking that into account when using modems the MODEM will listen to that ARP on their ethernet port, and send it to the other side via MODEM, like bridge.
Now, when a host is outside your brodcast domain (out of your network) let-s say using your example a host A on 10.1.1.1 and host B on 11.1.1.1, They will need to contact their default gateway (please take into account that a windows PC also has a routing table ) and you can modify it
Let's take a look at the following
C:>route PRINT
.... output ommitted..
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.58 25
...
===========================================================================
I am sending all the packets to my gateway 192.168.1.1 because i have a route 0.0.0.0/0 (this is the default gateway)
However I can modify it by doing
"route add 11.1.1.1 mask 255.255.255.255 192.168.1.2"
This means that if I send a packet to 11.1.1.1 will be sent to 192.168.1.2 instead of 192.168.1.1
Hope this helps you out
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