Great info Keller, thanks for sharing all that. I did try "manual" on my interfaces early on, as I read the man page to suggest that would work to bring the intf up without an IP, but when I tried that I couldn't get any traffic to pass so I gave up and just put the /32 on each. I must have been doing something else wrong.
Thanks for clarifying the "new" way to do the VLANs. I've seen some examples of that method on the web but didn't know if that was a new way, and old way, or just another way. I went with my method because it all ended up in the /etc/network/interfaces file and I didn't have to run another script on startup or lab initialization. My lab setup is actually hybrid. I have real switches (3x3560 and 1x3550) and 3 1841s. In IP Expert's topology, I make these routers R1, R7, and R8 since those 3 devices only use Ethernet to connect to other devices. R7 and R8 have a serial between them, but only Eth to other routers. This made it easy to integrate a few real devices without trying to tunnel serial or anything goofy like that. With a couple real routers I can test things like BFD or other features that don't do well on Dynamips. Generally speaking I've found Dynamips to behave pretty well. I used to have trouble with multicast traffic locking serial interfaces on 3745 virtual routers and also problems with corrupt OSPF LSAs on 2691 BB routers, but once I switched my IPX topo to use virtual 7204s (3640s for BBs), everything worked reliably. Turns out the Dynamips driver for the serial adapter on 2600/3700s is buggy. All real gear is nice, but there's a trade-off in my opinion between the capex to buy it and opex to run it. I like that I can leave some virtual routers running 24x7 for quick testing, and even at full bore my hybrid lab only needs about 300-325 watts to run. It also generates relatively little heat, so I can run my rack in an enclosed utility closet in my basement to keep it nice and quiet. My lab cost about US$2000 to build, but that includes all the bits: 12U rack, power control, cabling, UPS, small lab server, SFPs where needed, etc., as well as the switches, routers, console server, serial cards for the 1841s... In the end, whatever works for you is what you should use. It's also important (and difficult!) to avoid the trap of spending all your time building your lab, and not using it. I spent several days writing scripts and menus for my lab back in the spring and while the result is nice, that was time I wasn't actually studying. Once you have something working, it's important to leave well enough alone and get to labbing the technologies and preparing for the lab. Good Studying, Bob On Sunday, September 30, 2012, Keller Giacomarro wrote: > 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] <javascript:_e({}, 'cvml', '[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 > > _______________________________________________ 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
