1) Na parterze:
Ruter Asus DSL-N10 B1 - łączy się przez wi-fi z repeaterem.
Adres IP - 192.168.1.1
Maska podsieci - 255.255.255.0
DHCP - wyłączone
2) Na piętrze:
Repeater Asus RT-N10 - kablem podłączony do switcha
Adres IP - 192.168.1.20
Maska podsieci - 255.255.255.0
Brama domyślna - 192.168.1.1
3) Switch
4) Komputer1
Przez ssh łączę się z Komputer2
System: Ubuntu 14.04.1 LTS
5) Komputer2
System: Ubuntu 14.04.1 LTS
Na nim wstawiłem bramę.
Kod: Zaznacz cały
cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
bridge_ports eth0
bridge_fd 0
bridge_maxwait 0
address 192.168.1.24
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
broadcast 192.168.1.255
Jeden z nich to serwer dhcp (isc-dhcp-server 4.2.4)
Kod: Zaznacz cały
cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.4
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
Kod: Zaznacz cały
cat /etc/dhcp/dhcpd.conf
ddns-update-style none;
option domain-name "example.org";
option domain-name-servers 194.204.159.1;
default-lease-time 6000;
max-lease-time 72000;
authoritative;
log-facility local7;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.140 192.168.1.150;
}
Kod: Zaznacz cały
NAME STATE IPV4 IPV6 AUTOSTART
-------------------------------------------------------
a-dhcp RUNNING 192.168.1.4 - YES
b STOPPED - - NO
m RUNNING 192.168.1.143 - NO
Kod: Zaznacz cały
ubuntu@m:~$ cat /var/lib/dhcp/dhclient.eth0.leases
lease {
interface "eth0";
fixed-address 192.168.1.143;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option dhcp-lease-time 6000;
option dhcp-message-type 5;
option domain-name-servers 194.204.159.1;
option dhcp-server-identifier 192.168.1.4;
option broadcast-address 192.168.1.255;
option domain-name "example.org";
renew 2 2015/01/20 23:50:47;
rebind 3 2015/01/21 00:38:00;
expire 3 2015/01/21 00:50:30;
}
ubuntu@m:~$ ping wp.pl
PING wp.pl (212.77.98.9) 56(84) bytes of data.
64 bytes from [url=http://www.wp.pl]www.wp.pl[/URL] (212.77.98.9): icmp_seq=1 ttl=250 time=26.4 ms
64 bytes from [url=http://www.wp.pl]www.wp.pl[/URL] (212.77.98.9): icmp_seq=2 ttl=250 time=26.3 ms
Kod: Zaznacz cały
root@a-dhcp:/home/ubuntu# tail -n 20 /var/log/syslog
Jan 21 00:10:29 a-dhcp dhcpd: DHCPDISCOVER from 00:16:3e:2f:f6:77 via eth0
Jan 21 00:10:29 a-dhcp dhcpd: DHCPDISCOVER from 00:16:3e:2f:f6:77 via eth0
Jan 21 00:10:30 a-dhcp dhcpd: DHCPOFFER on 192.168.1.143 to 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:10:30 a-dhcp dhcpd: DHCPOFFER on 192.168.1.143 to 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:10:30 a-dhcp dhcpd: DHCPREQUEST for 192.168.1.143 (192.168.1.4) from 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:10:30 a-dhcp dhcpd: DHCPACK on 192.168.1.143 to 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:10:30 a-dhcp dhcpd: DHCPREQUEST for 192.168.1.143 (192.168.1.4) from 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:10:30 a-dhcp dhcpd: DHCPACK on 192.168.1.143 to 00:16:3e:2f:f6:77 (m) via eth0
Kod: Zaznacz cały
NAME STATE IPV4 IPV6 AUTOSTART
-------------------------------------------------------
a-dhcp STOPPED - - YES
b STOPPED - - NO
m RUNNING 192.168.1.159 - NO
Kod: Zaznacz cały
ubuntu@m:~$ cat /var/lib/dhcp/dhclient.eth0.leases
lease {
interface "eth0";
fixed-address 192.168.1.143;
option subnet-mask 255.255.255.0;
option dhcp-lease-time 6000;
option routers 192.168.1.1;
option dhcp-message-type 5;
option dhcp-server-identifier 192.168.1.4;
option domain-name-servers 194.204.159.1;
option broadcast-address 192.168.1.255;
option domain-name "example.org";
renew 2 2015/01/20 23:50:47;
rebind 3 2015/01/21 00:38:00;
expire 3 2015/01/21 00:50:30;
}
lease {
interface "eth0";
fixed-address 192.168.1.159;
option subnet-mask 255.255.255.0;
option routers 192.168.1.20;
option dhcp-lease-time 86400;
option dhcp-message-type 5;
option domain-name-servers 192.168.1.20,8.8.8.8;
option dhcp-server-identifier 192.168.1.20;
renew 3 2015/01/21 10:26:55;
rebind 3 2015/01/21 20:23:57;
expire 3 2015/01/21 23:23:57;
}
ubuntu@m:~$ ping wp.pl
PING wp.pl (212.77.98.9) 56(84) bytes of data.
^C
--- wp.pl ping statistics ---
39 packets transmitted, 0 received, 100% packet loss, time 38302ms
Kod: Zaznacz cały
NAME STATE IPV4 IPV6 AUTOSTART
-------------------------------------------------------
a-dhcp RUNNING 192.168.1.4 - YES
b STOPPED - - NO
m RUNNING 192.168.1.159 - NO
Sprawdzam log serwera dhcp.
Kod: Zaznacz cały
root@a-dhcp:/home/ubuntu# tail /var/log/syslog
Jan 21 00:33:12 a-dhcp cron[361]: (CRON) STARTUP (fork ok)
Jan 21 00:33:12 a-dhcp cron[361]: (CRON) INFO (Running @reboot jobs)
Jan 21 00:33:12 a-dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.4
Jan 21 00:33:12 a-dhcp dhcpd: Copyright 2004-2012 Internet Systems Consortium.
Jan 21 00:33:12 a-dhcp dhcpd: All rights reserved.
Jan 21 00:33:12 a-dhcp dhcpd: For info, please visit [URL]https://www.isc.org/software/dhcp/[/URL]
Jan 21 00:33:12 a-dhcp dhcpd: Wrote 11 leases to leases file.
Jan 21 00:33:15 a-dhcp ntpdate[422]: Can't find host ntp.ubuntu.com: Name or service not known (-2)
Jan 21 00:33:15 a-dhcp ntpdate[422]: no servers can be used, exiting
Jan 21 00:33:26 a-dhcp dhcpd: DHCPREQUEST for 192.168.1.159 from 00:16:3e:2f:f6:77 via eth0: unknown lease 192.168.1.159.
Kod: Zaznacz cały
root@a-dhcp:/home/ubuntu# tail -n 20 /var/log/syslog
Jan 21 00:33:11 a-dhcp cron[335]: (CRON) INFO (pidfile fd = 3)
Jan 21 00:33:12 a-dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.4
Jan 21 00:33:12 a-dhcp dhcpd: Copyright 2004-2012 Internet Systems Consortium.
Jan 21 00:33:12 a-dhcp dhcpd: All rights reserved.
Jan 21 00:33:12 a-dhcp dhcpd: For info, please visit [URL]https://www.isc.org/software/dhcp/[/URL]
Jan 21 00:33:12 a-dhcp cron[361]: (CRON) STARTUP (fork ok)
Jan 21 00:33:12 a-dhcp cron[361]: (CRON) INFO (Running @reboot jobs)
Jan 21 00:33:12 a-dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.4
Jan 21 00:33:12 a-dhcp dhcpd: Copyright 2004-2012 Internet Systems Consortium.
Jan 21 00:33:12 a-dhcp dhcpd: All rights reserved.
Jan 21 00:33:12 a-dhcp dhcpd: For info, please visit [URL]https://www.isc.org/software/dhcp/[/URL]
Jan 21 00:33:12 a-dhcp dhcpd: Wrote 11 leases to leases file.
Jan 21 00:33:15 a-dhcp ntpdate[422]: Can't find host ntp.ubuntu.com: Name or service not known (-2)
Jan 21 00:33:15 a-dhcp ntpdate[422]: no servers can be used, exiting
Jan 21 00:33:26 a-dhcp dhcpd: DHCPREQUEST for 192.168.1.159 from 00:16:3e:2f:f6:77 via eth0: unknown lease 192.168.1.159.
Jan 21 00:40:57 a-dhcp dhcpd: message repeated 3 times: [ DHCPREQUEST for 192.168.1.159 from 00:16:3e:2f:f6:77 via eth0: unknown lease 192.168.1.159.]
Jan 21 00:41:10 a-dhcp dhcpd: DHCPDISCOVER from 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:41:11 a-dhcp dhcpd: DHCPOFFER on 192.168.1.143 to 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:41:12 a-dhcp dhcpd: DHCPREQUEST for 192.168.1.143 (192.168.1.4) from 00:16:3e:2f:f6:77 (m) via eth0
Jan 21 00:41:12 a-dhcp dhcpd: DHCPACK on 192.168.1.143 to 00:16:3e:2f:f6:77 (m) via eth0
Kod: Zaznacz cały
NAME STATE IPV4 IPV6 AUTOSTART
-------------------------------------------------------
a-dhcp RUNNING 192.168.1.4 - YES
b STOPPED - - NO
m RUNNING 192.168.1.143 - NO
a) Ogólny Log repeatera
Kod: Zaznacz cały
Jan 1 00:00:16 RT-N10 syslog.info syslogd started: BusyBox v1.7.2
Jan 1 00:00:18 RT-N10 user.emerg NTPCLIENT: host:[time.nist.gov ]
Jan 20 13:12:35 RT-N10 daemon.info dnsmasq[1842]: started, version 2.59 cachesize 150
Jan 20 13:12:35 RT-N10 daemon.info dnsmasq[1842]: compile time options: no-IPv6 GNU-getopt no-DBus no-i18n no-DHCP no-TFTP no-conntrack no-IDN
Jan 20 13:12:35 RT-N10 daemon.info dnsmasq[1842]: reading /tmp/resolv.conf
Jan 20 13:12:35 RT-N10 daemon.info dnsmasq[1842]: using nameserver 192.168.1.1#53
Jan 20 13:12:35 RT-N10 daemon.info dnsmasq[1842]: cleared cache
Jan 20 13:12:37 RT-N10 user.emerg LED: Turn on LED_WPS
Jan 20 13:12:37 RT-N10 user.emerg RC SYSTEM: IDLE
Jan 20 13:12:37 RT-N10 user.emerg RC SYSTEM: START other services
Jan 20 13:12:37 RT-N10 user.emerg RC NETWORK: load delayed_services
Kod: Zaznacz cały
Mode : Repeater
Channel : Auto
Status : Connect to VXL