It makes no sense to me. I cant’ even find net.ipv4.ip_forward in /etc/sysctl.conf.
I’ve also tried following this thing: ICS - openSUSE. But I don’t seem to have a “Routing” option in YaST -> Network Services. I’ve tried figuring out which package I might need, but can’t find it. Although I did figure out some interesting stuff about apache2 on openSUSE in the process!
I’ve also tried this:
ifconfig eth1 192.168.0.1 up
echo "1" > /proc/sys/net/ipv4/ip_forward
On the Fedora box:
ifconfig eth1 192.168.0.2 up
After that they were able to ping each other. But that was it. I only remember this from some google searches, so it might not make much sense to do this.
I don’t understand why something that seems so simple is so difficult. I usually only understand half of what I’m reading about the topic.
I could connect the Fedora box and GameCube to the router but that would mean one or two extra cables through the ceiling/walls… It seemed easier this way.
They re-architected things just a bit different in 11.0. To do the ‘forwarding’ part,
there is a check-box labeled ‘Enable IP Forwarding’ in the ‘Routing’-tab
(under Yast2->Network Devices->Network Settings), when you configure
the network-interface. [Someone needs to update the Howto…looks like
either a typo or a layout-change between 10.3 an 11.0?!?!]
Yeah, it is a bit complex…it’s definitely an ‘advanced’ topic in network engineering.
[Which is why I suggested hooking the boxes to the existing router, as that is
definitely the preferred approach…that way, each machine has an independent
path to the Internet and doesn’t require any other machine to be up and running.]
Hope this helps…
Dave [who hasn’t actually done this since about 1990, on an old Red-Hat system]
Did you understand hat when you have a network like that, you have in fact two networks, one between the router and PC1 and one between the two PCs? So you need two seperate network address ranges else nobody would know where to send the traffic. When you have 192.168.0.0/16 for one network, either subnet it or take e.g. (a subnet of) 10.0.0.0/8 for the other.
I magically got it to work somehow. I think the problem might have been that eth0 on the Fedora box was controlled by NetworkManager. Could that be the case?
I did indeed understand that I needed two networks, I just have no Idea what exactly is happening. As far as I can tell the openSUSE box forwards everything it gets from the Fedora box to the router. And it also forwards everything it gets from the router to the Fedora box.
Although that doesn’t make much sense, since the Fedora PC would also get all packets that are meant for the openSUSE PC. So I’m guessing the SUSE PC tells the router which packets come from the Fedora one (and thus would get packets back with the Fedora IP)?
Like I said before, I only half know what I’m doing. Or possibly even less. I’m not even sure what a packet is.
I will try to explain a bit to help you to understand what is going on.
Packet. All network trafic is done in packets (like the postal service in you co
untry carries packages grom a source to a destination). Each packet (a bunch of
bytes as I think you understood already) has a payload part (that what should be
transported) and a wrapper (much as a normal postal package mentioned earlier).
The wrapper contains among other things the (IP) address where it should go.
Again analog to the postal service. You write the address on it and the only thi
ng you do is bring it out of the house to the nearest postal box (the gateway) o
f the postal system. Further transport is done withinn the postal system (Intern
Inside a system you need an address (IP address, including a netmask). When pack
ages are send and the address belongs to the same network (all the addresses hav
ing the same common first part as your own address with length of the mask) stay
inside the LAN. So when you have address 192.168.10.12 with netmask 255.255.0.0
(also written as /16) all addresses 192.168.. are reached directly. Your SUSE
box and Fedora box can talk to each other (e.g. your ping, but also telnet, ftp
When you want to send packets outside your LAN you have to tell where the postal box (gateway) is. In most situations you will use only one gateway and that is your default gateway. In your Fedora box you configure your SUSE box as your default gateway. I do not know which managing tools are used for this in Fedora, but
sudo netstat -rn
will show you if the deafultgateway is the IP address of your SUSE box.
The SUSE box itself has also a default gateway. This is the router that connects you to the Internet. Now when the SUSE box gets packages from the Fedora box they are either for the SUSE box (and will be managed by the appropriate programs (or not)) or they must be send through to the router. In other words the SUSE box must bcome a router itself. This normaly doen as a kernel parameter somewhere (which I suppose you found in the docs you mentioned earlier).
Incoming packets from the Internet is the next problem (when you want to know more please ask), but I hope the mechanisms behind packets are a biit clearer now.
I used YaST to configure things as in the link I gave a few posts above. So I wouldn’t know if I set any kernel parameters.
I’ve also managed to copy some files via SFTP. I’m figuring out how this happens at the moment. I can access my openSUSE PC from the Fedora box, but not the other way around. So I probably need to start some service on the Fedora box. It’s not simply sftp, but that’s still a useful command. Glad I accidentally found out about it.
I also can’t access Fedora via http, even though I was running an apache server. I can do that the other way around… That’s two services, maybe it’s the firewall or SELInux.
This is the output of “netstat -rn”:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0
0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0
192.168.0.254 Is indeed my SUSE PC’s static IP.
I’m interested in knowing how incoming packets are managed. I’d think multiple wrappers? Since the router doesn’t seem to know the Fedora box even exists, everything is sent to the openSUSE box which then “unwraps” it and finds another wrapper which points to the Fedora box?
Gobetno - I don’t really want to spend €50 on one. Plus, I’m learning a lot this way.