# FreeRTOS TCP Multiple Interfaces and VLAN

**URL:** <https://forums.freertos.org/t/freertos-tcp-multiple-interfaces-and-vlan/6985>\
**Category:** Kernel\
**Created:** [February 1, 2018, 9:22pm UTC](https://forums.freertos.org/t/freertos-tcp-multiple-interfaces-and-vlan/6985 "2018-02-01T21:22:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 1, 2018, 9:22pm UTC](https://forums.freertos.org/t/freertos-tcp-multiple-interfaces-and-vlan/6985/1 "2018-02-01T21:22:32Z")

</div>

**[umd350](https://sourceforge.net/u/umd350/)** wrote on [Thursday, February 01, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/1c693a80/#b2aa):

Hello,

Based on previous forum posts I understand that a version of the FreeRTOS TCP with support for multiple interfaces is in the works, and that currently, FreeRTOS TCP does not support VLAN (IEEE 802.1Q).

My question is, once the FreeRTOS TCP with multiple interface support is released, would it be feasible to add VLAN support to that?

What I’m thinking is for packet reception, that the callback layer between the Ethernet and TCP stack could be used to parse the VLAN tags, and pass the packets to the different interfaces based on the tag. For transmitting, perhaps using separate callbacks for each interface to tag the frame based on the interface.

In short, there would be two interfaces (separate IP addresses due to separate VLANs) sharing the same physical MAC. Is that feasible with what is planned to be released?

Thanks

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [February 2, 2018, 6:36am UTC](https://forums.freertos.org/t/freertos-tcp-multiple-interfaces-and-vlan/6985/2 "2018-02-02T06:36:49Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Friday, February 02, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/1c693a80/#8dcf):

> a version of the FreeRTOS TCP with support for multiple interfaces  
> is in the works, and that currently, FreeRTOS TCP does not support VLAN

That is all correct. FreeRTOS+TCP /multi runs fine at this moment.

You can use multiple physical interfaces, and each interface can have multiple MAC addresses, where each MAC address is abound to a different IP address.

Interface-0:

```
xx:01:01 192.168.2.5 // LAN
xx:01:02 172.16.0.1 // LAN

```

Interface-1:

```
xx:02:01 192.168.2.6 // LAN
xx:02:02 172.16.0.1 // LAN

```

Correction, should be `172.16.0.2`

Interface-2:

```
xx:03:01 141.105.10.2 // internet

```

The above configuration is already possible.

A MAC address may only be bound once. The MAC-address is used as a key to store addresses.

So in a way, +TCP is able to function in an environment with multiple network addresses. It can host a public Internet server, and at the same time talk to a printer on a LAN.

We haven’t considered adding support for VLAN yet. Other features that are on the list is IPv6 (75% ready) and more routing facilities. Some people also want support for PPP.

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [February 2, 2018, 6:41am UTC](https://forums.freertos.org/t/freertos-tcp-multiple-interfaces-and-vlan/6985/3 "2018-02-02T06:41:46Z")

</div>

**[heinbali01](https://sourceforge.net/u/heinbali01/)** wrote on [Friday, February 02, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/1c693a80/#ec17):

Oops, I assigned the same IP-address twice:

Interface-0:

```auto
    xx:01:01 192.168.2.5 // LAN
    xx:01:02 172.16.0.1 // LAN

```

Interface-1:

```auto
    xx:02:01 192.168.2.6 // LAN
- xx:02:02 172.16.0.1 // LAN
+ xx:02:02 172.16.0.2 // LAN

```

Interface-2:

```auto
    xx:03:01 141.105.10.2 // Internet

```
