Connect My GNS Router To The Internet Via DSL
Connect My GNS Router To The Internet Via DSL
Connect My GNS Router To The Internet Via DSL
This is short Guide on how to connect GNS Router running on PC to the Internet via DSL/Cable modem without destroying your PC Internet connection. Make sure you can browse Internet with your Host PC before running GNS3. I assume that you have some basic routing and GNS3 experiences. Step 1. Drag a Cloud and a Router (I used 3725) (Cloud 2 is for later). Step 2. Assign a PC NIC (the one connected to the Internet) to a Cloud C1 by double clicking on Cloud and choosing correct NIC. On the picture you see that I have 5 NICs: LAN1, LAN2, MS Loopback, VMware 1 and 2. LAN1 is connected to Internet via cable modem with Dynamic IP of 192.168.41.221. My cable modem IP is 192.168.41.1 and DHCP/NAT is assigned range of 192.168.41.0 /24 (all default settings has been changed). Your default settings are 192.168.0.x or 192.168.1.x. Your DSL/Cable modem is 192.168.0.1 or 192.168.1.1. Either way, it is class C network.
Choose your NIC (aka LAN1). Now you can connect GNS router to Cloud C1 (dont worry about Cloud2 for now). Step 3. Choose Fast Ethernet link and connect router to Cloud C1. I have Fast Ethernet f0/0 connected to C1 Step 4. Start router; connect to it via Console; (dont forget to do idle-pc if you havent done it so) Step 5. Enter routers interface configuration mode, assign IP address via DHCP from your cable/DSL modem by typing:
R1(config-if)#ip address dhcp R1(config-if)#no shut R1(config-if)#exit
To make sure your router have IP assigned by DHCP, wait a 20 seconds and run
R1(config)# do show ip int brief
If you dont see IP address but status is UP UP, wait a bit and re-run show ip int brief. After that, check you connections; make sure Cable/DSL modem DHCP is on and assigning addresses. Dont forget to save running configuration by copy run start or wr (short for write). Step 6. Test by pinging your default gateway, your PC NIC (LAN1), and finally famous Public DNS server 4.2.2.2.
R1#ping 4.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/58/96 ms R1#
Also, you should be able to ping router interface f0/0 IP (my IP is 192.168.41.101) and default gateway from Windows CMD:
C:\Users\Martin>ping 192.168.41.101 Pinging 192.168.41.101 with 32 bytes of data: Reply from 192.168.41.101: bytes=32 time=87ms TTL=255 Reply from 192.168.41.101: bytes=32 time=61ms TTL=255 Reply from 192.168.41.101: bytes=32 time=61ms TTL=255 Reply from 192.168.41.101: bytes=32 time=61ms TTL=255
Ping statistics for 192.168.41.101: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 61ms, Maximum = 87ms, Average = 67ms
C:\Users\Martin>ping 192.168.41.1 Pinging 192.168.41.1 with 32 bytes of data: Reply from 192.168.41.1: bytes=32 time<1ms TTL=64 Reply from 192.168.41.1: bytes=32 time<1ms TTL=64 Reply from 192.168.41.1: bytes=32 time<1ms TTL=64 Reply from 192.168.41.1: bytes=32 time<1ms TTL=64
Step 7. Enabling GNS router to use DNS resolution of the Internet. Right now you will not be able to ping using DNS names, like ping www.cisco.com will fail. To do so, you need a global command: R1(config)# ip domain lookup source-interface f0/0
where FastEthernet0/0 might be different router interface
Save your router configuration. Now you should be able to ping using DNS names.
R1#ping www.yahoo.com Translating "www.yahoo.com"...domain server (68.87.77.134) [OK] Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 69.147.125.65, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 52/95/164 ms
On the other side of the router I have f0/1 connected to PC MS Loopback NIC. This is for later test. But I could connect f0/1 to my other NIC (LAN2) via GNS Cloud in order to connect to external device like real Cisco switch or router. Also, I have VMware installed with 2 NICs. I could connect Cloud 2 to VMware NIC and route traffic to Virtual Machine. But that is for Part 2 of this Tutorial.