capsel wrote:
1. I have 2 computers, first is directly connected to lan with IP
10.0.0.3 and gateway 10.0.0.1 and has second NIC with IP 10.0.0.4
connected to second computer with IP 10.0.0.5
{LAN}------[10.0.0.3|GENTOO|10.0.0.4]-------[10.0.0.5]
Is it possible to set up routing from .5 to 10.0.0.0/24 (lan)?
Yes
If so
than how to set routing tables?
On gentoo:
route add -host 10.0.0.5/32 gw 10.0.0.4
On .5:
ifconfig eth0 10.0.0.5 netmask 255.255.255.255
route add -host 10.0.0.4/32 gw 10.0.0.5
route add -net default gw 10.0.0.4
If .5 isn't a Linux box, well, you'll have to translate the above to
whatever OS it is running.
Then you just need to enable IP forwarding on the Gentoo box.
Can I change .4 ip to .3?
Possibly, but I never tried. You can try:
ifconfig eth0 10.0.0.3 netmask 255.255.255.0
ifconfig eth1 10.0.0.3 netmask 255.255.255.255
route add -host 10.0.0.5/32 dev eth1
Where can I find more info about this?
man ifconfig
man route
And a good IP networking book! (sorry, I don't have any recommendations
here)
2. Can I have two network cards connected to the same lan with same
network mask?
Yes.
Can I set same IP for them?
No. The network (specifically, the ARP protocol) is going to become
very confused if you have cards on the same ethernet segment with the
same IP address.
HTH
-Richard
--
gentoo-user@gentoo.org mailing list