1

(18 odpowiedzi, napisanych Oprogramowanie / Software)

Działa! smile. Dziękuję za pomoc. Mam jeszcze pytanie czy mac adresy wan i lan mogą być takie same ?. Dziękuję jeszcze raz wink

2

(18 odpowiedzi, napisanych Oprogramowanie / Software)

Czyli ma być zamiast tego :

root@OpenWrt:~# vi /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config switch
        option name 'eth0.1'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'eth0.1'
        option vlan '1'
        option ports '0 2 3 4'

config switch_vlan
        option device 'eth0.2'
        option vlan '2'
        option ports '1'

TAK:

root@OpenWrt:~# vi /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config switch
        option name 'eth0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'eth0'
        option vlan '1'
        option ports '0t 2 3 4'

config switch_vlan
        option device 'eth0'
        option vlan '2'
        option ports '0t 1'


?.

3

(18 odpowiedzi, napisanych Oprogramowanie / Software)

To jest wszystko co jest w tym configu. Dlatego nie umiem dojść co usunąć, co dopisać.
Bardzo proszę o pomoc co dalej z tym zrobić hmm. Zainstalowałem WinSCP i połączyłem się z routerem, ale w pliku jest dokładnie to samo.Mogę wysłać screenshota. Gdybyś mógł prosiłbym o trochę jaśniejsze wytłumacznie.
root@OpenWrt:~# vi /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config switch
        option name 'eth0.1'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'eth0.1'
        option vlan '1'
        option ports '0 2 3 4'

config switch_vlan
        option device 'eth0.2'
        option vlan '2'
        option ports '1'


Zrobiłem tak, i teraz nie mogę wejść na router.

Witam, posiadam router tp-link tl-wr841n, nie działają dwa porty : 4-ty LAN oraz WAN. Są one obok siebie.jak podpinam kabel co jakiś czas mignie dioda,lecz nie ma komunikacji.
Wgrałem na router openwrt, czytałem że można zmienić port LAN na WAN, gdy wchodzę na putty przez ssh wbijam komende vi /etc/config/network i nie wiem co dalej.Teraz skopiowałem całość, wcześniej ostatnia linijka jakimś cudem mi umknęła.

root@OpenWrt:~# vi /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'

config switch
        option name 'eth0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'eth0'
        option vlan '1'
        option ports '0 1 2 3 4'

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
- /etc/config/network 1/28 3%