1 (edytowany przez sliwma 2019-08-23 00:05:37)

Temat: Problem z VLANami

Cześć,

mam skonfigurowane na WDR4300 trzy VLANy. Problem jaki mam polega na tym, że gdy usunę z VLANu 10 adres IP (interfejs niezarządzalny), nie jestem w stanie dostać się do routera z adresu 192.168.0.4. W momencie, gdy VLAN10_HOME ma IP (192.168.5.4), bez problemu mogę wbić się na router z adresu przypisanego VLANowi MGMT.
Co robię nie tak? W identyczny sposób skonfigurowałem w domu trzy MikroTiki, tam to działa, tutaj trzeba zastosować jakiś myk?
Pozdro

config interface 'VLAN10_HOME'
        option type 'bridge'
        option ifname 'eth0.10'

config interface 'VLAN20_GUEST'
        option type 'bridge'
        option ifname 'eth0.20'

config interface 'VLAN99_MGMT'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.0.4'

2

Odp: Problem z VLANami

Nie masz ani maski sieci ani interfejsu przypisanego do sieci VLAN99_MGMT

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: Problem z VLANami

Nie zauważyłem, że nie skopiowałem wszystkiego, tym razem cały /etc/config/network, bo może gdzieś indziej coś nie tak.
Maska i interfejs są.

config interface 'loopback'                   
        option ifname 'lo'                     
        option proto 'static'                 
        option ipaddr '127.0.0.1'             
        option netmask '255.0.0.0'             
                                               
config globals 'globals'                       
        option ula_prefix 'fd33:5708:212e::/48'
                                     
config interface 'VLAN10_HOME'       
        option type 'bridge'         
        option ifname 'eth0.10'       
                                     
config interface 'VLAN20_GUEST'       
        option type 'bridge'         
        option ifname 'eth0.20'       
                                     
config interface 'VLAN99_MGMT'       
        option type 'bridge'         
        option proto 'static'         
        option ipaddr '192.168.0.4'   
        option netmask '255.255.255.0'
        option ifname 'eth0.99'       

config switch                                 
        option name 'switch0'                 
        option reset '1'                       
        option enable_vlan '1'                 
                                               
config switch_vlan                             
        option device 'switch0'       
        option vlan '10'             
        option ports '0t 1t 2 3 4 5' 
        option vid '10'               
                                     
config switch_vlan                   
        option device 'switch0'       
        option vlan '20'             
        option ports '0t 1t'         
        option vid '20'               
                                     
config switch_vlan                   
        option device 'switch0'       
        option vlan '99'             
        option ports '0t 1t'         
        option vid '99'

4

Odp: Problem z VLANami

Przy zachowaniu całości konfiguracji, z tą różnicą, że do VLANu 99 dodałem porty 2-5 (nietagowane), które wcześniej były pod VLANem 10, można się wbić na router z adresu 192.168.0.4 - tak, jakby to porty nietagowane decydowały o konieczności posiadania adresu IP...

5

Odp: Problem z VLANami

Problem się rozwiązał po wyłączeniu usług firewall, dnsmasq i odhcpd.

6

Odp: Problem z VLANami

Nie trzeba wyłączyć tego. OpenWrt 19.07, domyślna konfiguracja, sieć taka jak w w/w poście:

root@OpenWrt:~# cat /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 globals 'globals'
    option ula_prefix 'fd06:7eca:4e9d::/48'

config interface 'VLAN10_HOME'       
        option type 'bridge'         
        option ifname 'eth0.10'       
                                     
config interface 'VLAN20_GUEST'       
        option type 'bridge'         
        option ifname 'eth0.20'       
                                     
config interface 'VLAN99_MGMT'       
        option type 'bridge'         
        option proto 'static'         
        option ipaddr '192.168.0.4'   
        option netmask '255.255.255.0'
        option ifname 'eth0.99'       

config switch                                 
        option name 'switch0'                 
        option reset '1'                       
        option enable_vlan '1'                 
                                               
config switch_vlan                             
        option device 'switch0'       
        option vlan '10'             
        option ports '0t 1t 2 3 4 5' 
        option vid '10'               
                                     
config switch_vlan                   
        option device 'switch0'       
        option vlan '20'             
        option ports '0t 1t'         
        option vid '20'               
                                     
config switch_vlan                   
        option device 'switch0'       
        option vlan '99'             
        option ports '0t 1t'         
        option vid '99'

i działa, jestem podłączony przez port wan na interfejsie tagowanym vlan 99:

root@OpenWrt:~# swconfig dev switch0 show
Global attributes:
    enable_vlan: 1
    ar8xxx_mib_poll_interval: 0
    ar8xxx_mib_type: 0
    enable_mirror_rx: 0
    enable_mirror_tx: 0
    mirror_monitor_port: 0
    mirror_source_port: 0
    arl_age_time: 300
    arl_table: address resolution table
Port 0: MAC c0:4a:00:e4:65:a6
Port 1: MAC e8:11:32:99:3d:a0
Port 5: MAC e8:11:32:99:3d:a0

    igmp_snooping: 0
    igmp_v3: 0
Port 0:
    mib: ???
    enable_eee: ???
    igmp_snooping: 0
    vlan_prio: 0
    pvid: 0
    link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
Port 1:
    mib: ???
    enable_eee: 0
    igmp_snooping: 0
    vlan_prio: 0
    pvid: 0
    link: port:1 link:up speed:1000baseT full-duplex txflow rxflow eee100 eee1000 auto
Port 2:
    mib: ???
    enable_eee: 0
    igmp_snooping: 0
    vlan_prio: 0
    pvid: 10
    link: port:2 link:down
Port 3:
    mib: ???
    enable_eee: 0
    igmp_snooping: 0
    vlan_prio: 0
    pvid: 10
    link: port:3 link:down
Port 4:
    mib: ???
    enable_eee: 0
    igmp_snooping: 0
    vlan_prio: 0
    pvid: 10
    link: port:4 link:down
Port 5:
    mib: ???
    enable_eee: 0
    igmp_snooping: 0
    vlan_prio: 0
    pvid: 10
    link: port:5 link:down
Port 6:
    mib: ???
    enable_eee: ???
    igmp_snooping: 0
    vlan_prio: 0
    pvid: 0
    link: port:6 link:up speed:10baseT half-duplex 
VLAN 10:
    vid: 10
    ports: 0t 1t 2 3 4 5 
VLAN 20:
    vid: 20
    ports: 0t 1t 
VLAN 99:
    vid: 99
    ports: 0t 1t 
root@OpenWrt:~# ifconfig 
br-VLAN10_HOME Link encap:Ethernet  HWaddr C0:4A:00:E4:65:A6  
          inet6 addr: fe80::c24a:ff:fee4:65a6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1188 (1.1 KiB)  TX bytes:816 (816.0 B)

br-VLAN20_GUEST Link encap:Ethernet  HWaddr C0:4A:00:E4:65:A6  
          inet6 addr: fe80::c24a:ff:fee4:65a6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:816 (816.0 B)

br-VLAN99_MGMT Link encap:Ethernet  HWaddr C0:4A:00:E4:65:A6  
          inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c24a:ff:fee4:65a6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:259 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22916 (22.3 KiB)  TX bytes:28902 (28.2 KiB)

eth0      Link encap:Ethernet  HWaddr C0:4A:00:E4:65:A6  
          inet6 addr: fe80::c24a:ff:fee4:65a6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:273 errors:0 dropped:0 overruns:0 frame:0
          TX packets:217 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:29290 (28.6 KiB)  TX bytes:33294 (32.5 KiB)
          Interrupt:4 

eth0.10   Link encap:Ethernet  HWaddr C0:4A:00:E4:65:A6  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1188 (1.1 KiB)  TX bytes:816 (816.0 B)

eth0.20   Link encap:Ethernet  HWaddr C0:4A:00:E4:65:A6  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:816 (816.0 B)

eth0.99   Link encap:Ethernet  HWaddr C0:4A:00:E4:65:A6  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:259 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22916 (22.3 KiB)  TX bytes:28902 (28.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8704 (8.5 KiB)  TX bytes:8704 (8.5 KiB)

Z małą drobną różnicą  - nie mam wdr4300 a wdr3600, ale z dokładnością co do radia to jest to samo.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

7

Odp: Problem z VLANami

Po updacie do wczorajszej aktualizacji tamte usługi włączyły się z automatu, i działa - więc faktycznej przyczyny chyba nie ustalę. Dzięki za sprawdzenie!