Reply web Interface in script (cli)

Hello everyone,

I am new in the forum and also new on OpenWRT.

I have a doubt regarding configuration in the image below, I got this from a forum and I am trying to make it works by not using the web interface, just scripts through the cli interface.

The main point here is the IPV4 adress, which is set as just 10.1, so I tried:

ifconfig vlan20 10.1 up -> error
ifconfig vlan20 up -> also error
ifconfig vlan20 up -> vlan20 gets the ip

the "correct" IP is something like 10.161.1XX.XXX and the gateway in

How to make it handle the 10.1 IP like set in the web interface in the image below?

I also have tried to use ifconfig vlan20 multicast up -> in that case I got only an Ipv6 adress, which leads me to the second question, how to disable Ipv6 only for Vlan20 also through the config file?

Many thanks.


It's not totally clear what your goal is.... but you are not setting that interface up correctly.

Are you creating a VLAN on your router (i.e. customer side), or are you trying to have a VLAN already defined by the upstream provider such that it passes through the device?

Is the gateway actually your own router, or is it an upstream device (i.e. from the ISP)?

How did you get the address and VLAN information that you say is 'correct' for IPTV?

Assuming you're creating a VLAN... The address field requires all 4 octets and must be an actual host address in the desired subnet. If you want the router to be the gateway, set that address to

The address field does not accept CIDR notation... this is defined in the subnet mask field. There is almost never a good reason to use a /8, and rarely a reason to use anything larger than /24. So use

Leave the gateway blank, and for now, also leave the DNS server fields blank. You might want to setup/enable the DHCP server, unless the STBs have static IPs assigned manually on the devices.

If you're trying to do a pass-through, this should be handled completely differently.

1 Like


Thank you very much for the reply. Sorry to not be so clear.

I am trying to get rid of my ISP modem/router.

Vlan20 is related to the IPTV of my ISP provider (vod_ip_interface).

I got the information about the IP address and all other information from the ISP equipment, as below:

Wan Information

tCon. Service Interface Proto. Pbit Vlan IGMP Src? MLD Src? Status IP uptime

ID Name Name address

2 Voip_ip_interface veip0.2 IPoE 5 30 Disable Disable Disable Disable Connected 139809

3 Vod_ip_interface veip0.3 IPoE 3 20 Enable Enable Disable Disable Connected 139811

1 Internet_ppp_interface ppp0.1 PPPoE 0 10 Disable Disable Disable Disable Connected 139806


Kernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Ifacedefault * U 0 0 0 ppp0. * U 0 0 0 br010.23.240.0 UG 0 0 0 veip0. * U 0 0 0 veip0.310.162.128.0 * U 0 0 0 veip0.2172.28.0.0 UG 0 0 0 veip0.3177.16.30.0 UG 0 0 0 veip0.3192.168.15.0 * U 0 0 0 br0200.100.88.211 * UH 0 0 0 ppp0.1200.161.71.40 UG 0 0 0 veip0.3200.161.71.46 UG 0 0 0 veip0.3200.161.71.48 UG 0 0 0 veip0.3201.0.52.0 UG 0 0 0 veip0.3

My guess is that the router gets the IP information via DHCP (client) from the ISP for the IPTV connection. It is plausible that it is provisioned some other way, though.

However, the next question is how the IPTV boxes connect to the service and what IPs they use and how they get it those addresses.

The absolute simplest possibility is that the VLAN is basically just passing through -- if this is the case, it would be plausible to simply put a switch between the actual incoming WAN your router, and then connect your STBs to that switch. You might be able to do this with an unmanaged switch, but that is not guaranteed by any means, so a managed switch might be necessary. You can also do this by making a VLAN pass-through on your router's internal switch (the router may not even need to get an address).

If the STBs get an address on your LAN, that can also be fine, but there needs to be some way to direct the STBs to use the VLAN -- this could be some policy based routing rule or some other method of getting the traffic to flow properly.

So I think you're going to need more information from the ISP or other users who have done similar things... or just time experimenting with the system (trial and error).

To start, though, see if you can figure out what the STBs are doing in terms of their network connection. And, see if you can get an address via DHCP on that VLAN (you need to make the VLAN under the same physical port as the WAN, and then make the protocol DHCP).