Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


August 2005

Cisco's Simple Route to a Secure Lab Environment

All you need is your existing network infrastructure and the Cisco IOS command line.
RSS
Subscribe to Windows IT Pro | See More Products / Hardware Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Trunking

A lab environment comprises a group of computers that aren't subject to the same management and security standards as the rest of your infrastructure. Perhaps you need a lab environment for computers that aren't managed by corporate IT or for testing software before you deploy it on the corporate network. If you aren't afraid to get your hands dirty with the Cisco IOS command line, you might be able to set up a network for your lab environment without purchasing any additional network equipment. Using existing equipment also lets the lab access the Internet through your existing connection and lets users access the lab from their desktop on the corporate network.

In this article, I describe how to set up a lab network by using VLANs and ACLs—features common on both Cisco hardware and equipment from other vendors. Computers on the lab network will be able to access the Internet, and users will be able to use Remote Desktop Protocol (RDP) to access computers on the lab network. Furthermore, computers on the lab network will be unable to access computers on the corporate network, thereby protecting corporate assets from the unmanaged lab environment.

The Equipment
For the purpose of this article, I used a Cisco Catalyst 2950 switch and a Cisco 800 router. Most Cisco equipment supports VLANs and ACLs. Network equipment from other vendors might also support these features, but configuration commands vary from vendor to vendor. Chances are that your existing network equipment has everything you need to set up a solution similar to the one I describe here.

Cisco IOS Logon and Backup
If someone else configured your network equipment, you might be a bit rusty on how to access it. Most devices have a Web-based UI, but in this article, I use the Cisco IOS command line to access the device's full functionality. You'll need to know either the console or Telnet password, and the Enable password, the Cisco IOS equivalent of the Administrator or root password.

Start by connecting a rolled cable from the port labeled Console on the router or switch to a computer's serial port. Cisco equipment typically comes with a baby blue rolled cable that you can identify by the appropriate RJ-45 and 9-pin serial port connectors at either end. Next, use Microsoft HyperTerminal to connect to the device. You might also simply Telnet to the device's IP address if it's configured for Telnet access. Figure 1 shows the appropriate HyperTerminal settings.

The Cisco IOS command prompt is similar to the DOS command prompt or Microsoft's Netsh. For those who aren't command-line savvy, I'll describe the commands I use in this article in detail, but you can also look at the official documentation for all IOS commands on Cisco's Web site (http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cr/).

You should always back up the current configuration before making changes to a router or switch. One backup method is to simply copy the configuration to your computer. You'll need Trivial FTP (TFTP) server software. If you don't already have a TFTP server, Solarwinds (http://solarwinds.net/FreeTools.htm) provides one for free.

At the IOS command line, type

enable

to enter privileged mode. Privileged mode removes the IOS security restrictions from your session, letting you change the configuration. Enter the Enable password when the system prompts you to do so. You'll enter all this article's commands in privileged mode. You'll know you're in privileged mode when your IOS prompt ends with a number sign (#).

Next, use IOS's Copy command to back up the current configuration. Like its DOS counterpart, Copy in IOS takes two arguments: source and destination. Instead of filenames, the arguments IOS accepts are startup-config, running-config, and tftp. Startup-config is the configuration the device boots with, running-config is the device's current configuration, and tftp copies to or from a TFTP server.

To back up the current configuration, type

copy running-config tftp

The system will prompt you for the IP address of the machine running the TFTP server and a filename. After the upload is finished, ensure that the config file is now on your local computer by checking the folder you configured for your TFTP server. To restore this configuration to the router or switch, you can use the command

copy tftp running-config

Now that you have a backup and know how to restore it, you're ready to start modifying your configuration.

Logical Network Segregation with VLANs
Examine the network layout that Figure 2 shows. A corporate desktop (CorpBox) and a machine not supported by corporate IT (LabBox) share subnet 192.168.0.0/24 and can communicate freely. The subnet also contains a router that provides access to the Internet and other corporate subnets.

Our goal is to use VLANs to segregate LabBox from CorpBox so that devices running on the lab network can't interact with those running on the corporate network. A VLAN is a logical grouping of Ethernet ports on your switch. All devices connected to ports on the same VLAN can communicate, but the devices can't communicate with devices on other VLANs. Here are the steps we need to take to accomplish our goal.

  1. Issue the Configure Terminal command (or Config T for short). This command puts you in configuration mode, which lets you access commands that modify the switch's configuration. To show you that you're in configuration mode, IOS appends (config) to your prompt. You'll find the Configure Terminal command under Configuration Fundamentals in the IOS command reference.
  2. By default, all ports on your switch will reside on the first VLAN—VLAN1. You should give the name "Lab" to the second VLAN—VLAN2—to remind you what it's for. The Vlan command takes as an argument the number of the VLAN that you want to configure. The command Vlan 2 puts you in config-vlan mode for VLAN2. Note that the prompt changes again to reflect this mode. You'll find the Vlan command in the IOS command reference's LAN Switching section. Type
    name Lab
    from config-vlan mode to name the VLAN, then type
    exit
    to exit config-vlan mode.
  3. Configure the port on the switch to which LabBox is connected—FastEthernet 0/4—to access VLAN2. You'll use the Interface and Switchport access commands to accomplish this step. First, use the command
    interface FastEthernet 0/4
    to enter the interface configuration (config-if) mode for FastEthernet port 0/4. You'll find the Interface and Switchport commands in the IOS documentation's Interface and Hardware Component section.

Log on to the switch and enter the aforementioned commands by following the example that Figure 3 shows. After you exit config-if and config modes, you can use the command

show vlan brief

to check the results. At this point, you should also try to ping CorpBox from LabBox. This attempt will fail because the two machines now operate as if they're on separate switches.

Just as the VLAN configuration separates LabBox from CorpBox, it also separates LabBox from the router. Because the router provides Internet access, LabBox can no longer access the Internet. CorpBox and the router still share VLAN1, so CorpBox has Internet access.

Inter-VLAN Routing
Users will need to access the lab from the production network, so we'll have to assign the lab network a unique subnet and route traffic between the two subnets. First, connect an Ethernet cable to a free port on the router and the switch. I used Ethernet 1 on the router and FastEthernet 0/2 on the switch. On the switch, assign the port you just connected to the router to VLAN2, just as we did for LabBox. (For an alternative method, see the "Trunking" sidebar, page 47.)

Next, log on to the router and assign the IP address 192.168.1.1 to interface Ethernet 1. Using IOS on a router is similar to using IOS on a switch. The Enable, Config T, and Interface commands work the same way. Because a router is a Layer 3 device, you can assign its interfaces IP addresses from config-if mode by using the IP Address command, which you'll find in the IOS documentation's IP Addressing Services section. Interfaces on Cisco routers "administratively down" by default, which essentially means that IOS turns them off until you tell it otherwise. To enable the interface, issue the No Shutdown command. Figure 4 shows the exact commands.

Assign LabBox the IP address 192.168.1.2 and the default gateway 192.168.1.1. Your network should now look something like Figure 5. If the router isn't the only router on your network, you'll need to inform the other routers about the new subnet so that users can access the subnet from anywhere on your network. One common way to do so is to use a routing protocol. Routing protocols let routers automatically share information about the subnet each router can access. Figure 6 shows the commands you should issue to enable the Router Information Protocol (RIP) on your router for the new subnet. If your network uses another routing protocol, such as Interior Gateway Routing Protocol (IGRP), Enhanced IGRP (EIGRP), or Open Shortest Path First (OSPF), use that protocol instead. If your network doesn't use a routing protocol, you'll have to configure static routes to the 192.168.1.0 subnet on each router.

As you can see in Figure 6, I used the Router Rip command to enter the config-router mode for the RIP routing protocol. Next, I used the Network command to enable RIP routing for the new 192.168.1.0 subnet. Doing so tells the router to advertise the 192.168.1.0 subnet to other routers it communicates with by using RIP. You can find the Router Rip, Network, and similar commands for other routing protocols in the IOS documentation's IP Routing Protocols section.

Note that I didn't have to specify a subnet mask while configuring RIP. RIP uses classful routing, which means that it automatically determines that 192.168.1.0 is a class C subnet and is therefore valid for all IP addresses from 192.168.1.1 to 192.168.1.254. Some networks might use classless routing to make better use of their IP address space. If your network uses a more complicated, classless subnetting scheme, you might want to read up on Classless Interdomain Routing (CIDR) in Cisco's online document "IP Addressing and Subnetting for New Users" (http://www.cisco.com/warp/public/701/3.html).

Both CorpBox and LabBox should now be able to ping each other. LabBox should also be able to ping Internet hosts such as Google.com.

   Previous  [1]  2  Next 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

8 Million People Lose Private Information Overnight

If you stayed at a Best Western hotel anytime since 2007 then your private information is now for sale to fraudsters all over the globe. Ouch. ...

Microsoft Makes Anti-Piracy Changes to Windows XP

Microsoft late Tuesday made changes to its Windows Genuine Advantage (WGA) Notifications anti-piracy service in Windows XP, a change that should begin appearing on users' desktops over the next few months. The company says it made the changes in order ...


Security Whitepapers Anti-Virus Is Dead: The Advent of the Graylist Approach to Computer Protection

Getting the Job Done: Comparing Approaches for Desktop Software Lockdown

Instant Messaging, VoIP, P2P, and games in the workplace: How to take back control

Related Events Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Maximize your SharePoint Investment – 8 Cities
Discover best practices and tips for both architecting and administering SharePoint. Early Bird Price of $99 through Sept 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



Entrust Unified Communications Certs
Secure Exchange 2007 and save 20%. Now through Sept. 2008.

Increase Application Performance
Free White Paper by Editor's Best winner, Texas Memory Systems.

Need to convert between XML, DBs, EDI, and Excel? Try MapForce free!
Drag & drop to transform between popular data formats – get results instantly or generate code.

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing