What is required for port based VLAN on both ends with no switch?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: I favor Slackware, CentOS and Debian
Posts: 25
Rep:
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.
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.
Distribution: I favor Slackware, CentOS and Debian
Posts: 25
Original Poster
Rep:
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
Last edited by sysslack_linux; 12-26-2011 at 04:12 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.