Re: [gentoo-user] network questions

2005-10-29 Thread capsel
thank you very much :)

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] network questions

2005-10-29 Thread Richard Fish

capsel wrote:


thank you very much :)

 



Oh, one thing I forgot.  The rest of your lan, including the gateway, is 
not going to have any idea how to contact .4 unless you add the route 
entries to each host.  If you really want to keep this setup (vs just 
plugging .4 into the lan directly), you will probably need to enable 
masquerading on the gentoo host for all traffic coming from .4.  
Research iptables for this.


-Richard

--
gentoo-user@gentoo.org mailing list



[gentoo-user] network questions

2005-10-28 Thread capsel
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)? If so
than how to set routing tables? Can I change .4 ip to .3?
Where can I find more info about this?

2. Can I have two network cards connected to the same lan with same
network mask? Can I set same IP for them?

Thank you in advance for any answers.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] network questions

2005-10-28 Thread Richard Fish

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



Re: [gentoo-user] network questions

2005-10-28 Thread John Jolet


On Oct 28, 2005, at 5:01 PM, Richard Fish wrote:


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 he can, I think he'd be better off having the second nic and the  
other box on a different subnet.  makes things a lot simpler.  I'm  
reading this as the two computers are connected directly with a  
crossover cable.



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




--
gentoo-user@gentoo.org mailing list