LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-24-2011, 03:26 AM   #1
sysslack_linux
LQ Newbie
 
Registered: Oct 2007
Location: Sweden
Distribution: I favor Slackware, CentOS and Debian
Posts: 25

Rep: Reputation: Disabled
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.
 
Old 12-24-2011, 12:31 PM   #2
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
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.
 
Old 12-26-2011, 04:09 AM   #3
sysslack_linux
LQ Newbie
 
Registered: Oct 2007
Location: Sweden
Distribution: I favor Slackware, CentOS and Debian
Posts: 25

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
switch-based VLAN to router access list shaklouf Linux - Networking 2 05-20-2011 03:51 AM
One dedicated vlan port and one tagged port, share IP? jeriryan Linux - Networking 2 02-11-2011 06:24 PM
Iptables + Forwarding + Vlan + OpenVPN & L2 junk switch /L3 extreme networks switch feloniousj Linux - Networking 3 03-15-2010 09:27 PM
VLAN Configuration with Avaya Switch scottgutman Linux - Networking 1 08-25-2009 02:05 PM
Setting up vLAN Switch kool_kid Linux - Networking 8 02-28-2008 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration