Studying for Cisco Certifications or Just Making Stuff Work!

  • HomeRecent Posts
  • AboutFind out more about me.
  • Contact MeUse this form to contact me.
  • SubscribeWays to follow me.

October 1, 2009
Posted by bcarroll

GNS3 setup and outside connections with VoIP example

I don’t want to write another guide to setup GNS3, there is a great tutorial which (in my opinion) covers all necessary steps. I just want to summarize a few things which may shorten the time to get a router in GNS3 to run, make it talk via the ethernet of your PC and connect to a physical router. Further I added an example for some simple VoIP configs to make a CME (with an 79xx phone registered) in the virtual router talk to a FXS interface (analog phone) on another router.

First of all you need to install GNS3, which in turn takes the necessary steps to install the underlying dynamips. Special thanks for this excellent work goes to the folks around the dynamips and GNS3 team. Have a look at the GNS3 site ( www.gns3.net ) and download the “all-in-1″ package. For the installation and initial etup, there is an excellent tutorial here:   http://sourceforge.net/projects/gns-3/files/GNS3/0.5/GNS3-0.5-tutorial.pdf/download

I am running GNS3 in an XP64 environment on an AM2 platform with 8GB ram. I tried a few different router models and for my part the 2691 router runs rock solid. The 2621XM had its odds and crashed every now and then, but I cannot say what caused this. The downside of the 26xx series is the limited availability of up to date IOS if you want to test new features. Currently 12.4-15(T10) is the newest IOS which does not include some new SIP-related features. For testing and practicing standard VoIP features this will do the job in any case. I’m using an “Advanced IP-services” feature set. If you need to use the newest IOS-T-Versions, you need to simulate a 7200 series router for whichyou can download a 12.4-24(T1) version.

After the installation and initial setup, I just built a simple network with 2 routers (1 virtual and 1 physical) connected to each other via the PC’s ethernet interface. After starting GNS3, placing a 2691 router and a “cloud” symbol on the workspace, my simple network looks like this:

gns3-1

I switched on the display for the interface names. This is why you see the “nio_gen_eth:\….” entry unter the cloud. This is the physical PC interface. Regardless what IP-address the PC-interface has, the router address is independent (f0/0). If the router address is in the same subnet as your PC, you will be able to access the router from your PC.  Lets assume a physical router with its f0/0 interface is reachable from the PC as well and has a FXS-VIC interface 0/1/0. The configuration of R0 (virtual router) and R1 (physical router) could look like this (assuming a very basic H323 connection to make the FXS interface reachable from CME):

R0:
interface FastEthernet0/0
 ip address 192.168.16.3 255.255.255.0
 speed 100
 half-duplex                         <– we are sharing the PC-port like a HUB
!
dial-peer voice 100 voip
 destination-pattern 1…                           <– H323 connection to the physical router
 session target ipv4:192.168.16.100  <– IP-address of the physical router
!
telephony-service           <– Switch on CME
 max-ephones 2
 max-dn 5
 ip source-address 192.168.16.3  <- accept registration from IP-Phones at this address
!
!
ephone-dn  1   <– the DN for the CIPC or 79xx phone
 number 2000
!
ephone  1
 description CME-Phone-1
 mac-address 0000.0000.0001  <– put the real mac-addres of the phone here
 type CIPC          <– phone type CIPC, 7940, 7960 etc.
 button  1:1        <– first line gets DN #1 (2000)
!

If you use a 79xx phone you will also need to get the tftp server address (option 150)handed out to the phone via DHCP. A sample configuration would look like this:

ip dhcp excluded-address 192.168.16.1 192.168.16.150
!
ip dhcp pool IP-Phones
   network 192.168.16.0 255.255.255.0
   default-router 192.168.16.3
   option 150 ip 192.168.16.3

This should let the IP-phone register with the CME. The dial-peer with the destination pattern 1… will send all dialed numbers with 4 digits starting with 1 to the .100 IP-address. The configuration of R1 with the FXS-port in 0/1/0 will look like this:

R1:

interface FastEthernet0/0
 ip address 192.168.16.100 255.255.255.0
 speed 100
 half-duplex       <– we are sharing the PC-port like a HUB
!
dial-peer voice 200 voip
 destination-pattern 2…                     <– H323 connection to the virtual router
 session target ipv4:192.168.16.3  <– IP-address of the virtual router
!
dial-peer voice 100 pots
 destination-pattern 1000                <– DN of the analog phone
 port 0/1/0                                              <– physical FXS-port

 The destination-pattern 1000 assigns DN 1000 to the analog port and is used as CLID on outgoing calls.

This should serve just as a starter configuration. Dive into the VoIP configurations and test any szenario with multiple routers – the sky is the limit. For demo purposes I connected the physical router with a FXO-port to my landline and so I got a PSTN integration. Further possibilities could be setting up a VPN to one of your routers and register the CIPC on your Laptop via the VPN at the CME….. 

An integration with UCM will be possible in a similar way. The router needs a Dial-peer pointing to the Callmanager and in turn the Callmanager needs to know a gateway entry with the routers IP-address…..

by Patrick Geschwindner, Ascolta

3 Comments

Posted Under General Information TipTorials iphone

3 Comments

Brandon
October 2, 2009

That you for sharing this. I have been thinking about trying something similar myself. Several weeks ago I spent many hours trying to get GNS3 to work with my physical LAN without success. I got frustrated and quit, but this may inspire me to try this again.

Can you provide an example of a full IOS name that I can look for? I am not very good at figuring out what IOS has what features. I just want something with basic CME I can play with.

Peguy Caddeus
October 12, 2009

You don’t have to upload cme software to your router to configre your IP phone. You can upload the Cisco IOS “ipvoice” which has the same features and can run the “telephone service setup” for easy configurations.

shivlu jain
October 13, 2009

thanks for such a nice post.

Leave a comment

* = Required

    • Posts
    • Twitter
    • Flickr
     

    Field Trip Time-...

    General

     

    Configuring...

    Cisco ASA

     

    Woes with VoIP

    Rants

    @jamieadams76 Will Do.

    follow me on
    twitter

    CCIE Security Students
  • Categories

    • BCMSN
    • BSCI
    • CCIE General
      • Recognition
    • CCIE General
    • CCIE Routing and Switching
    • CCIE Security
      • IE Labs
      • IPExpert Information
    • CCIE Service Provider
    • CCIE Voice
    • CCIE Wireless
    • CCNA Corner
    • CCNP Study
    • CCSP Study
    • CCVP Study
    • CIPT1
    • Cisco ASA
    • CiscoLive
    • CiscoPress
    • Contests
    • General
    • General Information
    • General Training
    • IE ATC-CoD
    • IE Information
    • IPExpert Labs
    • iphone
    • IPv6
    • ISCW
    • Links
    • MacTips
    • MARS
    • News
    • ONT
    • Polls
    • QOS
    • Question for Readers
    • Rants
    • Reading List
    • Scripting
    • Security
      • IPS
    • SNAF
    • SND
    • SNPA
    • SNRS
    • Studies In VPN
    • TipTorials
    • Travel
    • Wireless Zone
  • Archives

    • 2010
      • January
      • February
      • August
      • September
    • 2009
      • January
      • February
      • March
      • April
      • May
      • June
      • July
      • August
      • September
      • October
      • December
    • 2008
      • February
      • March
      • April
      • May
      • June
      • July
      • August
      • September
      • October
      • November
      • December

This site is using the Handgloves WordPress Theme
Designed & Developed by George Wiscombe

Subscribe via RSS