Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gateway is being ignored!!!

Status
Not open for further replies.

informatyk

Programmer
Jan 13, 2010
1
0
0
DE
--------------------------------------------------------------------------------

Hi there

I have a network with 3 PCs linked through a switch. The 3rd PC has a network emulator which I am able to simulate delay and packet loss, the other 2 PCs have as gateway the IP address of that 3rd PC.

Problem: If I ping the 3rd PC from the first or second PC I can see the delay and packet loss, however if I ping the second PC from my first PC It shows the regular rates without delay or packet loss. Why?
--> Are my first and second PC ignoring the defined gateway?
--> How can I fix that, so all networking packages must go through the 3rd PC?

I am sure it's a really easy question for you guys, but I already tried a lot of things and never had a solution...


Thanks in advance!
Info
 
when they are on the same subnet, the gateway will never be involved.
ip decides by ipaddress/subnet, if the target is on a different network/subnet the gateway gets involved, if on the local network/subnet arp takes over (cache or broadcast).

you need to make the 3rd pc sit in the middle (like a router)and the 1st + 2nd on different subnets

M. Knorr

MCSE, MCTS, MCSA, CCNA
 
I would like to ask a follow up question on this thread. Lets assume for a second that there are two routers/gateways on the subnet with different local LAN IP addresses of course. Lets also assume that the gateways tie to different public nets with significantly different addresses. If a host wants to send a packet to another non LAN address it will direct the packet towards one of the gateways and which gateway is chosen will depend on which matches better or closer according to the IP address and masks.

My question is, how is the determination (mathematically) made as to which gateway is the better or closer match?
 
one of the gateways and which gateway is chosen will depend on which matches better or closer according to the IP address and masks. "
you can only define one gateway, so if this gateway isnt able to find the target it wont work

M. Knorr

MCSE, MCTS, MCSA, CCNA
 
You define a "default gateway" - any communication directed off-subnet will be sent to that default gateway instead.

To use both gateways, you would have to manually setup routes on your host, eg (on the command-line):
route -p add 10.10.10.0 mask 255.255.255.0 192.168.1.1 metric 1

In this case, any traffic with destination 10.10.10.42 will be sent to 192.168.1.1.
Any traffic to 10.10.20.42 would go to your default gateway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top