Hy to all: I have just installed Ubuntu Server 12.04.3 on a Sunfire X4100
This server has 4 ethernet port, my target is to use:
- eth0 to connect to the modem and so to internet
- eth1, eth2, eth3 to connect some switch and access point in order to create an internal lan, share resources, storage, printers, etc.
To achive this target I installed a dhcp server [apt-get install isc-dhcp-server] and used below configuration:
/etc/default/isc-dhcp-server
INTERFACES="eth1 eth2 eth3"
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
auto eth1
iface eth1 inet static
address 192.168.1.5
netmaks 255.255.255.0
network 192.168.1.0
auto eth2
iface eth2 inet static
address 192.168.1.5
netmaks 255.255.255.0
network 192.168.1.0
auto eth3
iface eth3 inet static
address 192.168.1.5
netmaks 255.255.255.0
network 192.168.1.0
my DHCP-Server configuration
/etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option netbios-name-servers 192.168.1.1;
# Use Google public DNS
option domain-name-servers 8.8.8.8, 8.8.4.4;
option domain-name "mydomain.it";
# Define address range
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.15 192.168.2.25;
}
The result is:
- Server has the desired ip address and is capable to go on internet
- Client machines receive the ip address from the DHCP but are not able
to go over internet and/or either ping server or modem
Here-below ip ad result on the server:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:14:4f:20:20:9c brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 brd 192.168.1.255 scope global eth0
inet6 fe80::214:4fff:fe20:209c/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:14:4f:20:20:9d brd ff:ff:ff:ff:ff:ff
inet 192.168.2.5/32 scope global eth1
inet6 fe80::214:4fff:fe20:209d/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:14:4f:20:20:a2 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.5/32 scope global eth2
5: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:14:4f:20:20:a3 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.5/32 scope global eth3
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 06:0d:62:1a:3c:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
here below ip r on the server:
default via 192.168.1.1 dev eth0 metric 100
169.254.0.0/16 dev eth3 scope link metric 1000
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.2
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
Here below a picture of the map: