Testuje wan i lan na jednym kablu. Niestety konfiguracja puki co nie działa i zastanawiam się czy jest to spowodowane ograniczeniem sprzętowym ( Raspberry Pi 3 model B) czy wynika to z błędnej konfiguracji/niewiedzy.
Więc tak:
LAN: Zbridgowany z Wi-Fi (eth0&wlan0) wszystko działa.
WAN: Klient DHCP (eth0.6)
Logi po wypięciu, wpięciu kabla:
Sun Apr 22 16:45:17 2018 kern.info kernel: [ 189.903842] smsc95xx 1-1.1:1.0 eth0: link down
Sun Apr 22 16:45:17 2018 kern.info kernel: [ 189.911117] br-lan: port 1(eth0) entered disabled state
Sun Apr 22 16:45:17 2018 daemon.notice netifd: Network device 'eth0' link is down
Sun Apr 22 16:45:17 2018 daemon.notice netifd: VLAN 'eth0.6' link is down
Sun Apr 22 16:45:17 2018 daemon.notice netifd: Interface 'wan' has link connectivity loss
Sun Apr 22 16:45:17 2018 daemon.notice netifd: wan (2141): udhcpc: received SIGTERM
Sun Apr 22 16:45:19 2018 kern.info kernel: [ 191.456137] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
Sun Apr 22 16:45:19 2018 kern.info kernel: [ 191.469914] br-lan: port 1(eth0) entered blocking state
Sun Apr 22 16:45:19 2018 kern.info kernel: [ 191.477488] br-lan: port 1(eth0) entered forwarding state
Sun Apr 22 16:45:19 2018 daemon.notice netifd: Network device 'eth0' link is up
Sun Apr 22 16:45:19 2018 daemon.notice netifd: VLAN 'eth0.6' link is up
Sun Apr 22 16:45:19 2018 daemon.notice netifd: Interface 'wan' has link connectivity
Sun Apr 22 16:45:19 2018 daemon.notice netifd: Interface 'wan' is setting up now
Sun Apr 22 16:45:19 2018 daemon.notice netifd: wan (2964): udhcpc: started, v1.28.3
Sun Apr 22 16:45:19 2018 daemon.notice netifd: wan (2964): udhcpc: sending discover
Sun Apr 22 16:45:19 2018 daemon.info dnsmasq[2290]: read /etc/hosts - 4 addresses
Sun Apr 22 16:45:19 2018 daemon.info dnsmasq[2290]: read /tmp/hosts/odhcpd - 1 addresses
Sun Apr 22 16:45:19 2018 daemon.info dnsmasq[2290]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sun Apr 22 16:45:19 2018 daemon.info dnsmasq-dhcp[2290]: read /etc/ethers - 0 addresses
Sun Apr 22 16:45:22 2018 daemon.notice netifd: wan (2964): udhcpc: sending discover
Sun Apr 22 16:45:25 2018 daemon.notice netifd: wan (2964): udhcpc: sending discover
Raspberry uzyskuje połączenie lecz nie otrzymuje adresu IP. Po zmianie na adres statyczny wciąż nie mam internetu. Host do którego podłączony jest Raspberry Pi jest nie osiągalny.
Tak wygląda ruch na WAN:
RX: 0 B (0 Pktw.)
TX: 82.04 KB (682 Pktw.)
Obawiam się że chyba nie do końca rozumie jak ma to poprawnie funkcjonować .
Ogólny zamysł jest taki żeby port sieciowy w Raspberry Pi mógł pełnić role LAN lub WAN w zależności od urządzenia do którego jest podłączone np. Port --> komputer = LAN/Port --> Router = WAN. I wszystko to bez zmiany konfiguracji.
Czyżby zostanie napisanie jakiegoś skryptu który wykrywał by że RPi dostaje adres i port ma funkcjonować jako WAN, w przeciwnym wypadku ma być LAN?
PS. Pracuje na dzisiejszej wersji rozwojowej