Problem: I want 2 IPs so that I can run two servers on my LAN. Apparently my ISP doesn't allow static IPs and I need to use DHCP to obtain my second IP.
What I have learned so far:
But here is the hard part: In order to separate my LAN from WAN there is by default two different VLANs configured in OpenWRT. LAN VLAN is eth0.1 and WAN VLAN is eth 0.2.
The final question is: How do I configure my system? Do I put eth0 in promisc or eth0.2 or both? Or is my premise completely wrong? How do I create the said virtual interface? Below is my ip addr extract.
root@TopLevelRouter:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
link/ether [REDACTED] brd ff:ff:ff:ff:ff:ff
inet6 [REDACTED]/64 scope link
valid_lft forever preferred_lft forever
9: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether [REDACTED] brd ff:ff:ff:ff:ff:ff
inet6 [REDACTED]/64 scope link
valid_lft forever preferred_lft forever
10: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether [REDACTED] brd ff:ff:ff:ff:ff:ff
inet6 [REDACTED]/64 scope link
valid_lft forever preferred_lft forever
16: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether [REDACTED] brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global eth0.1
valid_lft forever preferred_lft forever
inet6 [REDACTED]/60 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 [REDACTED]/64 scope link
valid_lft forever preferred_lft forever
17: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether [REDACTED] brd ff:ff:ff:ff:ff:ff
inet [external IP 1]/24 brd [redacted].255 scope global eth0.2
valid_lft forever preferred_lft forever
inet6 [REDACTED]/64 scope link
valid_lft forever preferred_lft forever
I solved it, finally.
And a web archive link in case my blog doesn't exist when you read this