You don't need to assign IP address to the interfaces.  The mode you're
looking for is "manual".

The config Bob gaves uses old-style VLAN interfaces.  Based on my research,
there is considerable question regarding whether they'll continue to work
in Ubuntu.  However, also based on my research, there is very little good
and comprehensible documentation on doing it the new way (with the 'ip'
command).  Hopefully the below helps you!

Here's my process...

*** /etc/network/interfaces ***
# Sets up your physical interface.  Only have to do this once.
auto eth1
iface eth1 inet manual
 post-up ifconfig eth1 mtu 7000

*** StartVLANs.sh ***
# Bring up the physical interface
ifconfig eth1 up

# Add VLANs subinterfaces
ip link add link eth1 name eth1.901 type vlan id 901
< repeat for all needed VLANs >

# Bring up VLAN subints
ifconfig eth1.901 up
< repeat for all needed VLANs >

# Set MTU on all VLAN subints
ifconfig eth1.901 mtu 6500
< repeat for all needed VLANs >

*** Verification ***
All interfaces currently up: # ifconfig -s
All interfaces : # ifconfig -s -a
Verify VLAN config : # sudo cat /proc/net/vlan/config

*** Dynamips File ***
I have had issues with NIO_linux_eth.  Specifically, my NIC would strip off
the VLAN tags on ingress back from my devices.  One thing that can cause
this is VLAN offloading (covered by Bob above).  In my case, I had to use
NIO_gen_eth in order for it to work properly.

*** My 2c ***
I started out studying with GNS3 and real switches, but quickly realized
that you just can't beat real hardware.  There are quite a few labs that
won't work like you expect them to, especially in QoS studies.  You can put
together a full lab for about $3000 or so.  Do it.  You'll be glad you're
not always second-guessing whether its you, the workbook, or dynamips
that's causing the issue you're seeing.

Besides, you can sell the same gear for pretty much what you bought it once
you get your numbers.  Then again, you'll be a gazillionaire CCIE at that
point, and the devices do make fine doorstops.  Or boat anchors.


On a related note, I noticed that I'm starting to write emails in the same
style I take my CCIE notes.  Doctor, is there hope for me?

Keller Giacomarro
[email protected]


On Sat, Sep 29, 2012 at 9:28 PM, Bob McCouch <[email protected]> wrote:

> Hi Mitch,
>
> This is my /etc/network/interfaces file from my lab server running Ubuntu
> 12.04 Server. I use two NICs, the built-in Intel gig NIC (eth0) for the
> breakout (since it will do MTU larger than 1500) and a USB NIC (eth1) for
> my access to the box from my internal LAN. I found the same as you, that
> you can't leave an interface without an IP and actually have it come up. I
> don't remember if I tried IP's in 127/8, but I'm OK burning a few IPs out
> of 1.1.1.0/24 for my lab box. Note the 'ethtool' bits as annotated below.
> Apparently newer Linux kernels will try to use VLAN tag offloading (similar
> to TCP offload, etc) that will strip all incoming VLAN tags (both layers if
> it's double-tagged) and it was causing major connectivity problems. Frames
> were getting out from the virtual routers but not back in. Someone in my
> Twitter network was able to point me to this solution and it's worked
> perfectly. Was not necessary on the same box in Ubuntu 11.04.
>
> This setup works great for me. In my Dynagen .net files (I run text-mode
> dynagen, no X and thus no GNS) I just tie the virtual router interfaces to
> a "vlan1XX" interface using the NIO_linux_eth option, as such:
>
> [[ROUTER R5]]
>         model = 3745
>         console = 2005
>         f0/0 = NIO_linux_eth:vlan109
>         f0/1 = NIO_linux_eth:vlan110
>
>
> =============== /etc/network/interfaces ==================
>
> # The primary network interface
> auto eth1
> iface eth1 inet static
> address 10.4.111.250
> netmask 255.255.255.0
> gateway 10.4.111.1
> dns-nameservers 10.4.11.11
> dns-search mccouch.private
>
> iface eth1 inet6 static
> address 2001:0470:XXXX:XXXX:0000:0000:0000:0250
> netmask 64
>
>
> # This is the base interface for the VLAN trunk
> auto eth0
> iface eth0 inet static
> address 1.1.1.255
> netmask 255.255.255.255
> # Need to bump up MTU to ensure 1500-byte QinQ frames make it OK.
> mtu 1998
> # This is necessary on recent Linux kernels as VLAN tag offloading clobbers
> the QinQ behavior we need from Dynamips.
> # I spent 3 days getting this solved after rebuilding my lab box to get it
> from Ubuntu 11.04 to 12.04.
> post-up /sbin/ethtool --offload eth0 rxvlan off && /sbin/ethtool --offload
> eth0 txvlan off
>
> auto vlan101
> auto vlan102
> auto vlan103
> auto vlan104
> auto vlan105
> auto vlan106
> auto vlan107
> auto vlan108
> auto vlan109
> auto vlan110
> auto vlan111
> auto vlan112
> auto vlan113
> auto vlan114
> auto vlan115
> auto vlan116
> auto vlan117
> auto vlan118
> auto vlan119
> auto vlan120
> auto vlan121
> auto vlan122
> auto vlan123
> auto vlan124
>
>
>
> # VLAN 101
> iface vlan101 inet static
> address 1.1.1.1
> netmask 255.255.255.255
> mtu 1500
> vlan-raw-device eth0
>
> # VLAN 102
> iface vlan102 inet static
> address 1.1.1.2
> netmask 255.255.255.255
> mtu 1500
> vlan-raw-device eth0
>
> # VLAN 103
> iface vlan103 inet static
> address 1.1.1.3
> netmask 255.255.255.255
> mtu 1500
> vlan-raw-device eth0
>
> # VLAN 104
> iface vlan104 inet static
> address 1.1.1.4
> netmask 255.255.255.255
> mtu 1500
> vlan-raw-device eth0
>
> ...And on and on up through VLAN 124.
>
>
>
> On Sat, Sep 29, 2012 at 9:07 PM, G. Mitchell Peterson <
> [email protected]> wrote:
>
> > I'm working on getting my lab up and running using the breakout switch
> > method on an Ubuntu Server 12.04 x64 server.  I can't seem to get the
> trunk
> > on the server working though.  Can someone post a snip-it of their
> > interfaces file? I was hoping that it behaved like a dot1q trunk in Cisco
> > world, but that doesn't seem to be the case.  There's no trunk allowed
> type
> > command from what I can gather.  Do I just make a sub for each VLAN
>  going
> > over the trunk like below?  I really, really dislike that I have to
> assign
> > an IP when using the static command so I'm hoping one of you network
> > wizards knows a trick to this.  I tried only using auto ethX and setting
> > the MTU but it error'd out.  So, apparently either you assign an IP or
> you
> > assign DHCP but you have to do one or the other.  Anyone see an issue
> with
> > assigning a /32 in the 127.0.0.0/8 network to these since I have to give
> > it
> > something?
> >
> > #Trunk to breakout
> > auto ethX
> > iface ethX inet static
> > adddress 127.0.0.100
> > netmask 255.255.255.255
> > mtu 1536
> >
> > #VLAN 101 on ethX
> > auto ethX.101
> > iface ethX.101 inet static
> > adddress 127.0.0.101
> > netmask 255.255.255.255
> >
> > #VLAN 102 on ethX
> > auto ethX.102
> > iface ethX.102 inet static
> > adddress 127.0.0.102
> > netmask 255.255.255.255
> >
> > Thanks,
> > Mitch
> > _______________________________________________
> > For more information regarding industry leading CCIE Lab training, please
> > visit www.ipexpert.com
> >
> > Are you a CCNP or CCIE and looking for a job? Check out
> > www.PlatinumPlacement.com
> >
> > http://onlinestudylist.com/mailman/listinfo/ccie_rs
> >
> _______________________________________________
> For more information regarding industry leading CCIE Lab training, please
> visit www.ipexpert.com
>
> Are you a CCNP or CCIE and looking for a job? Check out
> www.PlatinumPlacement.com
>
> http://onlinestudylist.com/mailman/listinfo/ccie_rs
>
_______________________________________________
For more information regarding industry leading CCIE Lab training, please visit 
www.ipexpert.com

Are you a CCNP or CCIE and looking for a job? Check out 
www.PlatinumPlacement.com

http://onlinestudylist.com/mailman/listinfo/ccie_rs

Reply via email to