Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] network questions
Date: Fri, 28 Oct 2005 22:06:33
Message-Id: 43629FCA.8030807@asmallpond.org
In Reply to: [gentoo-user] network questions by capsel
1 capsel wrote:
2
3 >1. I have 2 computers, first is directly connected to lan with IP
4 >10.0.0.3 and gateway 10.0.0.1 and has second NIC with IP 10.0.0.4
5 >connected to second computer with IP 10.0.0.5
6 >
7 >{LAN}------[10.0.0.3|GENTOO|10.0.0.4]-------[10.0.0.5]
8 >
9 >Is it possible to set up routing from .5 to 10.0.0.0/24 (lan)?
10 >
11
12 Yes
13
14 >If so
15 >than how to set routing tables?
16 >
17
18 On gentoo:
19
20 route add -host 10.0.0.5/32 gw 10.0.0.4
21
22 On .5:
23
24 ifconfig eth0 10.0.0.5 netmask 255.255.255.255
25 route add -host 10.0.0.4/32 gw 10.0.0.5
26 route add -net default gw 10.0.0.4
27
28 If .5 isn't a Linux box, well, you'll have to translate the above to
29 whatever OS it is running.
30
31 Then you just need to enable IP forwarding on the Gentoo box.
32
33 >Can I change .4 ip to .3?
34 >
35 >
36
37 Possibly, but I never tried. You can try:
38
39 ifconfig eth0 10.0.0.3 netmask 255.255.255.0
40 ifconfig eth1 10.0.0.3 netmask 255.255.255.255
41 route add -host 10.0.0.5/32 dev eth1
42
43 >Where can I find more info about this?
44 >
45 >
46
47 man ifconfig
48 man route
49
50 And a good IP networking book! (sorry, I don't have any recommendations
51 here)
52
53 >2. Can I have two network cards connected to the same lan with same
54 >network mask?
55 >
56
57 Yes.
58
59 >Can I set same IP for them?
60 >
61 >
62
63 No. The network (specifically, the ARP protocol) is going to become
64 very confused if you have cards on the same ethernet segment with the
65 same IP address.
66
67 HTH
68 -Richard
69
70 --
71 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] network questions John Jolet <john@×××××.net>
Re: [gentoo-user] network questions capsel <capsel@×××××.com>