Gentoo Archives: gentoo-user

From: John Jolet <john@×××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] network questions
Date: Sat, 29 Oct 2005 00:06:23
Message-Id: 08F10F4B-A902-43D4-8C66-AA1681982439@jolet.net
In Reply to: Re: [gentoo-user] network questions by Richard Fish
1 On Oct 28, 2005, at 5:01 PM, Richard Fish wrote:
2
3 > capsel wrote:
4 >
5 >
6 >> 1. I have 2 computers, first is directly connected to lan with IP
7 >> 10.0.0.3 and gateway 10.0.0.1 and has second NIC with IP 10.0.0.4
8 >> connected to second computer with IP 10.0.0.5
9 >>
10 >> {LAN}------[10.0.0.3|GENTOO|10.0.0.4]-------[10.0.0.5]
11 >>
12 >> Is it possible to set up routing from .5 to 10.0.0.0/24 (lan)?
13 >>
14 >
15 > Yes
16 >
17 If he can, I think he'd be better off having the second nic and the
18 other box on a different subnet. makes things a lot simpler. I'm
19 reading this as the two computers are connected directly with a
20 crossover cable.
21 >
22 >> If so
23 >> than how to set routing tables?
24 >>
25 >
26 > On gentoo:
27 >
28 > route add -host 10.0.0.5/32 gw 10.0.0.4
29 >
30 > On .5:
31 >
32 > ifconfig eth0 10.0.0.5 netmask 255.255.255.255
33 > route add -host 10.0.0.4/32 gw 10.0.0.5
34 > route add -net default gw 10.0.0.4
35 >
36 > If .5 isn't a Linux box, well, you'll have to translate the above
37 > to whatever OS it is running.
38 >
39 > Then you just need to enable IP forwarding on the Gentoo box.
40 >
41 >
42 >> Can I change .4 ip to .3?
43 >>
44 >>
45 >
46 > Possibly, but I never tried. You can try:
47 >
48 > ifconfig eth0 10.0.0.3 netmask 255.255.255.0
49 > ifconfig eth1 10.0.0.3 netmask 255.255.255.255
50 > route add -host 10.0.0.5/32 dev eth1
51 >
52 >
53 >> Where can I find more info about this?
54 >>
55 >>
56 >
57 > man ifconfig
58 > man route
59 >
60 > And a good IP networking book! (sorry, I don't have any
61 > recommendations here)
62 >
63 >
64 >> 2. Can I have two network cards connected to the same lan with same
65 >> network mask?
66 >>
67 >
68 > Yes.
69 >
70 >
71 >> Can I set same IP for them?
72 >>
73 >>
74 >
75 > No. The network (specifically, the ARP protocol) is going to
76 > become very confused if you have cards on the same ethernet segment
77 > with the same IP address.
78 >
79 > HTH
80 > -Richard
81 >
82 > --
83 > gentoo-user@g.o mailing list
84 >
85 >
86
87 --
88 gentoo-user@g.o mailing list