www.8devices.com
View unanswered posts | View active topics It is currently 28 Apr 2024, 04:55



Reply to topic  [ 2 posts ] 
 SWITCH? VLAN? VIRTUAL INTERFACES? help! 
Author Message

Joined: 20 Jun 2012, 10:38
Posts: 11
Hello dear OpenWrtler,

carambola has only one physical ethernet interface eth0.

carambola has two ethernet ports on it's dev board, which are per default managed as eth0.1 and eth0.2.

I understand that those devices are Virtual Interfaces, that belong to the same physical interface eth0 and enable this physical interface to have two IP addresses. (one network card -> in different subnets at the same time) but i am confused by all this switch / vlan config stuff.

my setup is like this:

i have pc:lan <-> lan:fritzbox(dhcp-router):lan <-> wan:carambola:lan <-> deviceX

carambola wan acts as dhcp-client and seems to get an ip.

problem:

whatever i do,
i either can not ping carambola or carambola can not ping deviceX.

pc does not need to be able to directly connect with deviceX.

all help appreciated.

what needs to be in /etc/config/network to make this work?

i would like carambola to have static IPs:

e.g.
eth0.1 = 192.168.0.250 <-> fritzbox 192.168.0.1
eth0.2 = 192.168.250.250 <-> (this is connected to deviceX with also staticIP 192.168.250.251)

(by the way you can nicely reset your network config with those commands:
# firstboot
# reboot :roll:
but be careful, this resets a lot of other stuff (fstab, rclocal) as well )

http://wiki.openwrt.org/_detail/oldwiki … k%3Aswitch


21 Mar 2013, 16:04
Profile

Joined: 07 May 2013, 10:50
Posts: 2
this is called port based vlan. carambola has integrated ethernet switch. one switch port is connected to CPU, other two are fed to outside. switch has configured port based vlan's, so you need to create two vlan interfaces on CPU ethernet interface (eth0) to route packets to/from specific switch port. kernel tags packets going to switch, switch untags them and passes to selected port (selection is done by vlan id). the same in opposite direction - packets incomming in specific switch port are taged by switch and passed upstream (CPU port). kernel untags them and receives on selected vlan interface. this enables possibility to have two (or more) switch ports working in different subnets.


07 May 2013, 14:38
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.