Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: sergle on November 26, 2010, 03:16:52 PM
-
Hello,
I am trying to set up Microcore64 to run on an industrial PC with multiples Ethernet interfaces.
There are four Ethernet NIC's chips:
Here is the NIC's set up:
eth0: not used
eth1: 192.168.0.10 netmask 255.255.255.0
eth2: 192.168.1.100 netmask 255.255.255.0
eth3: 192.168.2.100 netmask 255.255.255.0
I have a script that does the following which is called from bootlocal.sh
ifconfig eth1 192.168.0.10 netmask 255.255.255.0
ifconfig eth2 192.168.1.100 netmask 255.255.255.0
ifconfig eth3 192.168.2.100 netmask 255.255.255.0
The problem that I have is that I can only use one of the NIC's at once.
I can ping any node on 192.168.0.10 but I cant ping on any other. Even when I disable with ifconfig eth0 down I can not ping any other subnet nodes.
It is recommended to tie to DEVICE but I am not so sure where actual network scripts reside that get executed during boot time.
I would appreciate your help
Thanks
Serge
-
It is not clear what you are doing, but you need to configure your routes and nameservers.
-
I have added entries to route table but its not seem to be working.
What I am trying to achieve is to be able to handle packets from all NIC's simultaneously using my own executable.
I receive from eth1 process commands and send on to eth2 and vice versa.
The problem is that I am not able to figure out which extensions I need for full network routing functionality and the other is that it doesn't seem that tce-load -wi xxx command adds them on boot.
I have specified tce=sda1 in menu.lst however the tce-load command complains about not being able to create tce/optional or cd to it...
-
The last post conflictswith the first post.
Are you using eth0 or not?
It is still not clear what what you have done, and what you are trying to accomplish.
-
I cant find where TC gets information about eth interfaces
I was hoping to find it here in:
/etc/sysconfig/network-scripts/ifcfg-ethX
my routeing table is set up using route add command:
route add -host 192.168.0.10 eth1
route add -host 192.168.1.100 eth2
route add -host 192.168.2.100 eht3
The route -n output is :
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 lo
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
-
Here is what I want to do:
Set up TC with multiple NIC's on different subnets.
Listen to data coming in on eth1, process it and depending on data received on eth1 communicate with nodes on eth2 or eth3 and respond back to eth1.
Situation example:
eth1, eth2 and eth3 are on different subnets 192.168.0.10, 192.168.1.100 and 192.168.2.100 respectively
Node A on eth1 sends status request packet to Node B (Microcore64 PC)
Node B pings Node C on eth2 and Node D on eth3 and sends response to Node A on eth1
Hope this helps.
Cheers
-
I would suggest you get a good Linux networking book.
Study up on iptables and forwarding.
-
I am not trying to use OS to do packet forwarding so iptables and forwarding isnt really relevant. My own executable does that
The bare minimum is all I need is to be able to ping each subnet and its not working. I can only ping one at a time at the moment while others are disabled.
Thanks
-
well you definitely need ip forwarding when you want to connect between different subnets since 192.168.0.0/24 - 192.168.2.0/24 are just not meant to know of each other or how to communicate. ping can be used with the parameter "-I" like
ping -Ieth2 192.168.1.101
to explicitly choose the interface on which the ping command should be executed. are all of your nics reachable that way? if not there's still some route problem regarding the different subnets.