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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Routing Question 1

Status
Not open for further replies.

mmcgurty

MIS
Jun 5, 2001
84
US
If I have an NT machine and a linux machine on a D-Link switch, the NT machine is DHCP and is setup with a default gateway somewhere 'out there', when I connect to my linux machine, do I travel all the way to my defaualt gateway to get back to my linux box, or will the switch run me right to the linux box without all the chatter on the network?

If it runs all the way to the default gateway, I'll want to set up my linux as the default gateway to keep the network chatter at a minimum, eh? Must of the static I produce from the NT IS to the linux, so I figured why not try to cut the static down a bit.

Oh well, just wondering.
 
Okay, this is how I understand your situation. You have a D-Link switch on your network. You didn't mention if the Linux and the NT system were on the same network segment so I am assuming they are since you only mentioned the D-Link switch. Since the Linux box is not the same network as the Windows NT the packets would not route to the default gateway unless the NT box didn't receive a response to the ARP request.

Of course "somewhere outthere" is a big world, without knowing how your connected to the default gateway it would be hard to know where you packets are going. Basic TCP/IP is that if the two boxes are on the same network, the packet should not be routed to the Default Gateway.

david e
*end users are just like computers, some you can work with...others just need a simple reBOOTing to fix their problems.*
 
They are both connected to the same D-Link Switch. It was a question another employee of ours posed to me. I really was stumped since I didn't really know. I assumed that the switch was smart enough to realize that the MAC of the NT box was on the same switch as the MAC of the Linux box...and I assumed TCP/IP was smart enough to find the fastest route, but was the fastest route through the default gateway? I didn't know. Thanks for the clarification!
 
Im pretty sure you dont need a default gateway if the traffic is kept local.

Its true it will keep the mac addresses of anything its switching and send it out to that port.

The gateway is only used if its either box cannot find a machine its looking for to exchange the data.
 
The only time traffic will reach the default gateway is if the destination address does not reside on the local network. Therefore, if the Linux box is on the same network, traffic won't attempt to use the default gateway.

A switch operates at the datalink layer and not the network layer (as a router does). Therefore, if the linux box is not on the same logical network as your NT box (even though it is plugged into the same switch) you'd have to go through a default gateway to get to it.
 
Sure
Say NT box
192.168.1.34 255.255.255.0

Linux
192.168.5.45 255.255.255.0

They are not on the same net.
But:
Linux machine:
ifconfig eth0:1 192.168.1.12 255.255.255.0
route add 192.168.1.0 255.255.255.0 gw eth0:1

Same idea as any subinterface.
You need the reverse static route set up for
the NT box of course.

In this situation I always run RIP..it's just so much easier. With linux you can run more sophisticated routing
daemons then with NT so it is worthwhile to look into
zebra and gated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top