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 02-02-2012, 07:32 PM   #1
mrtoph12
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
Creating simple VLAN between two linux machines


Hello,

I have been wrestling with creating a vlan to run experiments with and was hoping someone here would be able to give me some direction. I am using a system called GENI which allows users to reserve networked pc's from different colleges, businesses, etc. Users are able to design a topology and the geni system creates it then gives access to the resources for an allotted time.

Right now, myself and other users are only able to reserve linux machines and not actual switches or routers. What I am doing is reserving 5 machines in a star topology. By default each machine can ping every other machine but I want to separate them into vlans as per the requirements of the project. Currently using ssh to interact with each machine.

My question: Is it possible to set up a simple vlan between two or several machines using just linux boxes to create the vlan?

I have started using vconfig to tag the interfaces on the pc serving as the center connecting point for the other machines in my little network.

Any help or direction would be greatly appreciated.
 
Old 02-04-2012, 01:13 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Linux supports bridging and 802.1q VLAN tagging, so yes, you can create VLANs using only Linux. If the macines can ping one another, are they perhaps in different subnets? If so, you're using the hub node as a router, not a switch.

If none of the interfaces on the hub node are bridged, it really acts like a switch with 4 VLANs. You can bridge individual interfaces to make them members of the same VLAN (man brctl), and/or you can create 802.1q tag interfaces with vconfig and bridge them to another interface.

Last edited by Ser Olmy; 02-04-2012 at 02:42 AM.
 
Old 02-04-2012, 04:47 PM   #3
mrtoph12
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Okay that is good news. Sorry for being so vague. Here are the ifconfigs of the central hub node and one of the clients.

Router or hub node (linux machine)

eth0 Link encap:Ethernet HWaddr 00:02:b3:86:1d:f8
inet addr:155.98.36.142 Bcast:155.98.39.255 Mask:255.255.252.0
inet6 addr: fe80::202:b3ff:fe86:1df8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17481 errors:0 dropped:0 overruns:0 frame:0
TX packets:8221 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24901063 (24.9 MB) TX bytes:629824 (629.8 KB)

eth1 Link encap:Ethernet HWaddr 00:02:b3:86:1d:f9
inet addr:10.10.1.1 Bcast:10.10.1.255 Mask:255.255.255.0
inet6 addr: fe80::202:b3ff:fe86:1df9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:796 (796.0 B)

eth2 Link encap:Ethernet HWaddr 00:03:47:94:c2:91
inet addr:10.10.2.1 Bcast:10.10.2.255 Mask:255.255.255.0
inet6 addr: fe80::203:47ff:fe94:c291/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:978 (978.0 B)

eth3 Link encap:Ethernet HWaddr 00:03:47:73:a2:2d
inet addr:10.10.3.1 Bcast:10.10.3.255 Mask:255.255.255.0
inet6 addr: fe80::203:47ff:fe73:a22d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:978 (978.0 B)

eth4 Link encap:Ethernet HWaddr 00:03:47:73:a2:2e
inet addr:10.10.4.1 Bcast:10.10.4.255 Mask:255.255.255.0
inet6 addr: fe80::203:47ff:fe73:a22e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:726 (726.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:83 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7627 (7.6 KB) TX bytes:7627 (7.6 KB)

Client machine

eth0 Link encap:Ethernet HWaddr 00:02:b3:65:cf:5e
inet addr:155.98.36.150 Bcast:155.98.39.255 Mask:255.255.252.0
inet6 addr: fe80::202:b3ff:fe65:cf5e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17749 errors:0 dropped:0 overruns:0 frame:0
TX packets:7947 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25012028 (25.0 MB) TX bytes:620781 (620.7 KB)

eth1 Link encap:Ethernet HWaddr 00:02:b3:65:cf:5f
inet addr:10.10.1.2 Bcast:10.10.1.255 Mask:255.255.255.0
inet6 addr: fe80::202:b3ff:fe65:cf5f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1138 (1.1 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:83 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7635 (7.6 KB) TX bytes:7635 (7.6 KB)

It looks like each machine in my topology has a global ip according to eth0 but is also a part of the small 5 pc star topology I requested when reserving my resources. I think the machine is doing some sort of routing like you said because there are several different subnets configured. I have each of the 5 pc's on ubuntu 10.04.


here's the topology.
http://imageshack.us/photo/my-images/845/topology.png/


For the purposes of the project I am doing, I definitely want to create my own vlans. In the end, I hope to have just 2 vlans that can't access each other. Whenever I was using vconfig before I would tag an interface on the router machine like eth1 and add eth1.1. Then I would try creating a new network by giving it an address of 192.168.50.1 for the default gateway and netmask of 255.255.255.0.

Then I would go to a client machine that I would like to put on that vlan and give it an address of something like 192.168.50.2 and change the gateway to 192.168.50.1. I could never ping the gateway. Just having a hard time conceptualizing how this needs to be put together. Do i need to tag the vlan interface on the client machine as well?
 
  


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
Creating a simple program to list directory in C under linux shlinux123 Linux - Newbie 3 09-19-2011 12:47 PM
How to create a simple VLAN? your_shadow03 Linux - Newbie 1 08-05-2009 11:17 AM
VLan help on Cisco 870 to Linux vlan spide21 Linux - Networking 4 07-30-2009 08:20 AM
Trouble with creating floppy image for Linux install on legacy machines. archeryguru2000 Linux - Newbie 3 09-30-2007 04:21 PM
problems creating a simple bootable cd to perform a simple task czarherr Linux - Software 1 11-11-2004 05:22 AM

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

All times are GMT -5. The time now is 04:58 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