Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a TP-Link WR1043ND with 1 wan and 1 lan cables attached. The lan cable currently have 2 ips of two different network, using an alias. The two networks share the same switch.

I'd like the router to forward between the two. Currently the routers sends ICMP redirect to the first network telling the clients to go to the second network directly, which is impossible.

Could I create a second virtual nic in the same vlan and assign it the IP on the second network?


share|improve this question

This is not specific to OpenWRT but works with any Linux 2.6 - based distro. Just disable the sending of ICMP redirects for your aliased interface (assumed eth0 for the code examples):

echo "0" > /proc/sys/net/ipv4/conf/eth0/send_redirects

which would be effective until re-setting or reboot. To make the setting permanent add this line to /etc/sysctl.conf:

net.ipv4.conf.eth0.send_redirects = 0

and run sysctl -p to reload the configuration.

share|improve this answer
yes, that could do it, but I'd like to have 2 nic with 1 ip each :) – Sirber Aug 1 '12 at 13:32
@Sirber in this case the simplest, most secure and best-documented way would be to use a VLAN-capable switch and tagged interfaces. – the-wabbit Aug 1 '12 at 19:16
I agree, but the main question is about a TP-Link WR1043ND and OpenWRT :)… – Sirber Aug 1 '12 at 20:59
@Sirber is there anything in this constellation that would prevent you from using VLANs? OpenWRT does support them, the employed RTL8366RB chip does support them and you should use them - unless you really are willing to go the troubled road of macvlan-interfaces or veth-interfaces. Don't do it. You have been warned. – the-wabbit Aug 1 '12 at 21:42
I tryed VLAN but I plugged it in the same switch. Linux does not support STP so the whole network went down. I installed dedicated wires and it works perfectly now. – Sirber Aug 14 '12 at 20:44
up vote 0 down vote accepted

VLAN works using the GUI. enter image description here

I created a nic using VLAN 3 with the IP I wanted for the second network.

Since linux supports STP only for bridging I needed dedicated wires for the second nic. Plugging the second nic in the same switch as the LAN made the network going down.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.