[Solved] Luci network interface name cache is driving me mad

So this is the issue:
When creating a new network interface using luci, I attached it to a new interface named eth1.12 and saved the configuration. problem is that the correct interface name was eth0.12. I changed it and now the eth1.12 interface still appears on the list of interfaces on luci. It's driving me mad.

on /etc/config there is no file that has eth1.12 on it and flasing the device again ( keeping configurations ) doesn't solve the issue.

Can anyone tell me where is this stored so that I can delete it?

I guess you defined some VLANs using the internal switch, and it is not resetting properly; try to use the swconfig utility to see how is the switch configured and reset it.

HI,

thanks for the reply.

I don't think this is related to swconfig. I Do have two vlans configured on the swtich, vlan 1 and 2 with vid 1 and vid 12 and they appear on the config/network file. but nothing related to the eth1.12 interface appears inside /etc...

there must be some file that holds this information but I am unable to find it.

Are you sure you have defined those VLANs on eth0 and not eth1?

yep.
See screenshots.!
This is easy to reproduce. Just create a new interface and name it something and then try to delete it and it will remain on the list.

switch

interface

network

Well, you do have defined eth1.12: in the first screenshot, there is a "tagged" under eth1 for VLAN 12.

that cpu(eth1) label is wrong. The five ports are one switch that is then internally divided into eth0 for 4 lan ports and eth1 for the wan port but from a software point of view both the four lan ports and the wan port are mapped into eth0. the lan ports are eth0 and the wan port is eth0 ( vlanid 12 )

Anyway, the switch was configured before I made the mistake on the luci add new interface page and the etx.xx interfaces were not listed on the physical settings page. This is supposed to be like that. They only appear on the list after you add them. and the problem is that then there is no way of removing them, and they don't appear anywhere on /etc/
This is what I made: I clicked on create new interface, then on the physical settings I selected "custom interface" and wrote eth1:12 ( this because obviously eth1:12 was not on the list ( eth0:12 was also not there ). Then I noticed the error and created a new custom eth0:12 interface.

root@gateway:~# ifconfig 
br-lan    Link encap:Ethernet  HWaddr C4:6E:1F:EB:16:A6  
          inet addr:192.168.88.254  Bcast:192.168.88.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:feeb:16a6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:143556949 errors:0 dropped:0 overruns:0 frame:0
          TX packets:197056334 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:43254150040 (40.2 GiB)  TX bytes:256243423214 (238.6 GiB)

eth0      Link encap:Ethernet  HWaddr C4:6E:1F:EB:16:A7  
          inet6 addr: fe80::c66e:1fff:feeb:16a7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:222075116 errors:0 dropped:0 overruns:377 frame:0
          TX packets:147719092 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2670627640 (2.4 GiB)  TX bytes:625771067 (596.7 MiB)
          Interrupt:4 

eth0.12   Link encap:Ethernet  HWaddr C4:6E:1F:EB:16:A7  
          inet addr:188.83.242.247  Bcast:188.83.242.255  Mask:255.255.255.0
          inet6 addr: fe80::c66e:1fff:feeb:16a7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:201265148 errors:0 dropped:0 overruns:0 frame:0
          TX packets:147719088 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:289832089176 (269.9 GiB)  TX bytes:47279536795 (44.0 GiB)

eth1      Link encap:Ethernet  HWaddr C4:6E:1F:EB:16:A6  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:169044208 errors:0 dropped:134 overruns:133 frame:0
          TX packets:193549061 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:395039580 (376.7 MiB)  TX bytes:2835983619 (2.6 GiB)
          Interrupt:5 

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:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:3152 (3.0 KiB)  TX bytes:3152 (3.0 KiB)

pptp-CasaChaves Link encap:Point-to-Point Protocol  
          inet addr:192.168.3.240  P-t-P:192.168.3.251  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:73 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:5904 (5.7 KiB)  TX bytes:5656 (5.5 KiB)

pptp-SS   Link encap:Point-to-Point Protocol  
          inet addr:192.168.1.83  P-t-P:192.168.1.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:23384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22835 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:7716898 (7.3 MiB)  TX bytes:1051806 (1.0 MiB)

pptp-iP   Link encap:Point-to-Point Protocol  
          inet addr:192.168.2.202  P-t-P:192.168.2.253  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:91028309 errors:0 dropped:0 overruns:0 frame:0
          TX packets:46213069 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:127100220394 (118.3 GiB)  TX bytes:2474483063 (2.3 GiB)

wlan0     Link encap:Ethernet  HWaddr C4:6E:1F:EB:16:A4  
          inet6 addr: fe80::c66e:1fff:feeb:16a4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:266929 errors:0 dropped:0 overruns:0 frame:0
          TX packets:433792 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22275488 (21.2 MiB)  TX bytes:592591443 (565.1 MiB)

wlan1     Link encap:Ethernet  HWaddr C4:6E:1F:EB:16:A5  
          inet6 addr: fe80::c66e:1fff:feeb:16a5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2859435 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3187368 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1681368189 (1.5 GiB)  TX bytes:3827203024 (3.5 GiB)

Sorry, I am not following you... your switch configuration says one thing, and you say something different...

That file you posted says that both eth0 and eth1 are on the same switch, and you have eth1 on VLAN12. Wasn't the switch configured properly for your device? What device are you using? Why don't you just take eth1 out of VLAN 12 and see what happens?

Hi,

I changed the config from tagged to untagged and indeed the interface disappeared!!!!

I was not reading the switch table properly. Now I can sleep in peace.

Thanks alot for your help!