07-01-2013 12:18 AM - edited 03-07-2019 02:09 PM
Here is my network information. I have a Cisco 3550 Running the latest iOS. I have a linux server with 1 ethernet card in it.
I am running GNS3 inside of a vmware version of Ubuntu.
The 3550 port my linux server is connected to is fa0/2
eth0 on my linux box.
I have two vlans created on my 3550,
vlan 10 subnet: 192.168.2.0/24
vlan 20 subnet: 192.168.3.0/24
I made dhcp pools for both vlans on the 3550
Even though for this server vlan 10 it uses a static ip which has been excluded from the dhcp pool
On linux I ran modprobe 8021q, setup the interfaces, so now eth0 has no ip address.
but
eth0.10 has a static ip of 192.168.2.20
eth0.20 has a dhcp ip of 192.168.3.2
the 3550 gateways
vlan10 : 192.168.2.10
vlan20: 192.168.3.10
I can ping both gateways, computers on the network, and the internet.
I can also ping back from any device on my network to both ip address on my linux server.
Everything works.
Now the problem arises because I am broke and cannot afford more ethernet cards.
VMWARE:
I am trying to bridge vmware's traffic through the same eth0 device, but it is not connected to anything.
That is the first problem:
Routing traffic from vmware as bridged through my linux server which is connected to a trunk on the switch through one network card.
(I am willing to change the setup if someone has a better suggestion, but I was pretty proud of myself so far)
The other problem is I want to route GNS3 routers through the same interface to the switch, this is another reason I wanted it to be a trunk, so I could route multiple vlans out of the GNS3 routers, through my linux server, into the trunk port on my switch and into the rest of my network, and back in again.
Has anybody delt with this problem before? I have searched for answers to this vmware / linux 8021Q and I could not find any answers or advice.
Thank you in advance.
07-01-2013 07:56 PM
I found a solution!
In my cisco switch I had not set the trunk port with a native vlan. That was #1.
On my linux server eth0 had no IP address. That was #2.
I setup the trunk port on the cisco 3550 switch with a native vlan of 10.
Then I configured /etc/network/interfaces with eth0 to get a dhcp address and it doesn't use raw_vlan_device.
Then I configured eth0.10 and eth0.20 as i normally did.
Now when I run GNS3 it routes the traffic through eth0 (router linked to a cloud) and GNS3's router tags the packet with it's VLAN ID so the trunk port recognizes it.
Thanks for everybody reading, I wrote the answer in case somebody is facing the same problem and stumbled through the same silly mistakes I made, so I hope it can help someone.
Cheers!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide