SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I was recently discussing this in a separate thread (ndiswrapper issues), though this is now completely irrelevant from that topics, as I'm using tulip now, not a Windows driver.
Basically, I have 2 linux PC's connected with a crossover cable. "xanderbox" (192.168.1.5) is my PC with 2 NIC's that's connected to the router (eth0, gw 192.168.1.1) & to the other PC, "xravtop" (eth1, xravtop's IP is 192.168.1.8).
To route traffic to the correct NIC, I had to manually add an entry into the routing table that routes all packets from 192.168.1.8 to device eth1, and there is no gateway set.
I cannot access the internet from xravtop, as the packets are only being routed to xanderbox (192.168.1.5).
When I attempt to set the gateway for the route I added to 192.168.1.1, this just blows out the connection between the 2 crossover cable connected PC's, so this is obviously not the solution.
If anyone knows how I am able to route packets as to access the internet from the PC connected via crossover cable, it would be greatly appreciated!
In general, it seems to be possible. But you have to organize your routing correctly.
On the xravtop:
ip route add default via 192.168.1.6 dev eth0
On the xanderbox:
ip route add 192.168.1.8/32 via 192.168.1.6 dev eth0
ip route add default via 192.168.1.1 dev eth1
And check if forwarding on xanderbox is on:
If it shows '0', then you've got to enable it:
echo "1" > /proc/sys/net/ipv4/ip_forward
Or, to make it enabled at the boot time, add the line
net.ipv4.ip_forward = 1
in /etc/sysctl.conf on xanderbox.
With such addresses, your router must have mask 24 on the inner interface.
If you change the subnet xanderbox-xravtop to, for example, 192.168.2.0/24, you will need to add a new route to your router (192.168.1.1), something like this: for net 192.168.2.0/24 via 192.168.1.5
Syntax depends on the router's vendor and model.
I put both PC's (eth1 on my main PC, xanderbox) & eth0 on my laptop onto the 192.168.2.x network. I was using a route like this before: "route add 192.168.1.8 netmask 255.255.255.0 dev eth1", but I'm completely baffled as what to change this to now. Sorry, I don't know much about IP--does the netmask change? I simply changed the route to "route add 192.168.2.8 netmask 255.255.255.0 dev eth1" & I once again could ping xravtop from xanderbox (& vice versa) but I still don't have the internet. There is no default gateway set for this route.
I just saw your post Vit77, thanks for the instruction, I'll try this out !
Last edited by corteplaneta; 10-15-2008 at 07:05 PM.
Ok, sorry to bring back an old post I thought solved, but for some reason everything DOES work, but stops working after some time? If I restart my main desktop PC, everything begins to work correctly again? Does anyone have any idea why this would happen?