[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 2 NIC's



On Ma, 06 iul 21, 07:03:38, David wrote:
> 
> The first question from Jeremy, the value of
> /proc/sys/net/ipv4/ip_forward is 0, connecting to the thin client via
> putty and using nano as an editor, it tells me I can't alter this
> value, I am logged in as root.

Because it's a special file and anyway, changing the value wouldn't 
persist across reboots.
 
> The configuration of the network interfaces are all static, but from
> the screen shot attached, it looks to me as though eth1 is trying to
> use DHCP. Is this the issue?

Why do think it's trying to use DHCP?

> Below is a sample of the /etc/network/interfaces file, I have been
> trying routing in this file, this is currently #ed out.

Only a sample? What is in the rest of it?

> # The loopback network interface
> auto lo
> iface lo inet loopback
> 
> # The primary network interface
> allow-hotplug eth0
> iface eth0 inet static
> 	hwaddress ether 00:15:e9:4a:c8:81
> 	address 192.168.121.120/24
> 	gateway 192.168.121.1
> 	# dns-* options are implemented by the resolvconf package, if
> installed
> 	dns-nameservers 208.67.222.222 208.67.220.220
> 	up ip route add 192.168.0.0/16 dev eth0 table eth0
> 	up ip route add default via 192.168.121.1 dev eth0 table eth0
> 	up ip rule add from 192.168.121.120/32 table eth0
> 	up ip rule add to 192.168.121.120/32 table eth0

What are you trying to achieve with the 'hwaddress' option?

My guess from reading interfaces(5), section "The static Method" under 
"INET ADDRESS FAMILY" is that it does something completely different 
than what you seem to expect.

That, or the wording in the manpage is bad (won't be testing it myself).

In any case, the format above is incorrect.

> # The secondary network interface
> allow-hotplug eth1
> iface eth1 inet static
> 	hwaddress ether 00:90:dc:07:28:91
> 	address 80.194.XX.XX/29
> #	gateway 80.194.XX.XX
> 	dns-nameservers 208.67.222.222 208.67.220.220
> 	up ip route add 80.194.XX.XX/29 dev eth1 table eth1
> 	up ip route add default via 80.194.XX.XX dev eth1 table eth1
> 	up ip rule add from 80.194.XX.XX/32 table eth1
> 	up ip rule add to 80.194.XX.XX/32 table eth1

How do you ensure the 'eth0' and 'eth1' names stay the same across 
reboots?

If you are trying to connect one or more computers on your private LAN 
to the internet via this box you want to have the 'gateway' set for the 
'public' interface instead of the 'local' interface and activate IP 
forwarding in the kernel.

Then you use the internal IP address as the 'gateway' for all other 
computers on the LAN.


Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

Attachment: signature.asc
Description: PGP signature


Reply to: