LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   What is required for port based VLAN on both ends with no switch? (https://www.linuxquestions.org/questions/linux-networking-3/what-is-required-for-port-based-vlan-on-both-ends-with-no-switch-920321/)

sysslack_linux 12-24-2011 03:26 AM

What is required for port based VLAN on both ends with no switch?
 
have read a lot of guides of VLAN, but don't quite understand if I am allowed to have 2 completely different subnets connecting to same ISP
What is needed to do on the computers side for port based VLAN to work?
I have no switch in my environment just 2 computers and a router in my setup:
This is description of my setup:
Draytek vigor 2820 router 192.168.1.1 physically attached WAN to ISP
lan-port 1 physically connected to slackware VLAN 1
lan-port 3 physically connected to mac VLAN 0

Slackware ip 10.0.0.10 netmask 255.255.0.0 (physically attaced lan-port 1 on router ip 192.168.1.1)
default gw 10.0.0.1

mac computer ip 192.168.1.15 netmask 255.255.255.0 (physically attached lan-port 3 default gw 192.168.1.1)

router 192.168.1.1 port based VLAN is configured on router side.

bmarx 12-24-2011 12:31 PM

I am not familiar with that particular router, but based on the setup you described, the slackware host on 10.0.0.x will not be able to get out to the internet because its default gateway 10.0.0.1 does not exist. While you could add some routes to both the client and the router so they know which interface to look for eachother on, it would probably be easier to just use the 192.168.1.x network for the slackware client as well, then defining 192.168.1.1 as the gateway for that device.

If the devices HAVE to be on separate vlans, you should add the ip address 10.0.0.1 to the vlan1 interface which will be your gateway off of that vlan.

sysslack_linux 12-26-2011 04:09 AM

Thank you bmarx for your fast answer.
If the devices HAVE to be on separate vlans, you should add the ip address 10.0.0.1 to the vlan1 interface which will be your gateway off of that vlan.

How do you add 10.0.0.1 to vlan1 whith my setup?
Does it have to be done from router or are you doing it with linux command from slackware?


I thought of this interface that is vlanconfig instead of ifconfig on slackware, that there maybe where som settings there you could change to make it work.
On the router there is an option to have IP ROUTING usage, and that address is not for nat. It is for external ip only.
It works to ping computer on each subnet from both 10.0.0.0 net and 192.168.1.0 net when that setting is enabled.
The only access to internet is through mac on 192.168.1.0


All times are GMT -5. The time now is 02:25 AM.