標籤:internet windows 網路連接 路由器 寬頻連線 gns3
實現GNS的類比路由器串連Internet
1、環境: XP 系統,GNS3.0.7.2 整合SecureCRT(也可以沒有SecureCRT)
準備:在XP系統下添加Loopback adapter 虛擬網卡,一個ADSL撥號連線
2、網路連接配置:
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287560229GIQc.gif" />
7、選中R1然後按右鍵,單擊“開始“,接著在選中R1按右鍵,單擊“Console”出現與GNS整合的SecureCRT配置控制台(如果沒有整合SecureCRT的話會出現一個dos一樣的控制台):
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287561273Mc10.gif" />
3、接著開啟運行,輸入services.msc出現如下介面:
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287560406HGll.gif" />
然後找到下面服務,並確定這些服務已啟動,否則設定他們為已啟動。
DHCP Client 設為已啟動
DNS Client 設為已啟動
Windows Firewall / Internet Connection Sharing(ICS) 設為已啟動.
4、開啟網路連接,雙擊“寬頻連線勾上”任何使用此電腦的人“接著填上密碼,然後,選擇“屬性”然後選擇“進階“ 進行設定:
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287560601NczD.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287560601NczD.gif" height="370" width="347" />
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287560675emMP.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287560675emMP.gif" height="443" width="371" />
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287560730RFQx.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287560730RFQx.gif" height="411" width="361" />
完成設定後查看網路連接變化:
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287560806jVJY.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287560806jVJY.gif" height="380" width="553" />
5、完成以上步驟後開啟GNS3.0.7.2構建拓撲如下:
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287560919nhM6.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287560919nhM6.gif" height="313" width="553" />
配置Cloud “Loopback”,按右鍵“Loopback”選擇“配置“,按順序進行以下操作即可:
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287561031CsNS.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287561031CsNS.gif" height="417" width="553" />
進行裝置串連,單擊GNS的工具列的“添加串連”按鈕,接著用滑鼠把裝置串連,接著再按“show interface names”按鈕,如:
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287561173diO7.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287561173diO7.gif" height="273" width="553" />
6、選中R1然後按右鍵,單擊“開始“,接著在選中R1按右鍵,單擊“Console”出現與GNS整合的SecureCRT配置控制台(如果沒有整合SecureCRT的話會出現一個dos一樣的控制台):
650) this.width=650;" src="http://hi.csdn.net/attachment/201010/20/0_1287561273Mc10.gif" alt="http://hi.csdn.net/attachment/201010/20/0_1287561273Mc10.gif" height="387" width="553" />
7、在SecureCRT裡對R1進行配置.命令如下:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#enable pass cisco
R1(config)#line con 0
R1(config-line)#pass cisco
R1(config-line)#login
R1(config-line)#logg synchronous
R1(config-line)#no exec-timeout
R1(config-line)#line vty 0 15
R1(config-line)#pass cisco
R1(config-line)#login
R1(config-line)#logg syn
R1(config-line)#no exec-timeout
R1(config-line)#exit
R1(config)#int fa0/0
R1(config-if)#ip add 192.168.0.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#
*Mar 1 00:05:53.659: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:05:54.659: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#end
R1#
*Mar 1 00:07:06.071: %SYS-5-CONFIG_I: Configured from console by console
R1#ping 192.168.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 24/41/48 ms
R1#
8、測試ping外網發現失敗:
R1#ping www.baidu.com
Translating "www.baidu.com"...domain server (255.255.255.255)
% Unrecognized host or address, or protocol not running.
R1#ping google.com
Translating "google.com"...domain server (255.255.255.255)
% Unrecognized host or address, or protocol not running.
R1#
9、添加預設路由
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.0.1
R1(config)#exit
10、最後測試成功:
R1#ping www.baidu.com
Translating "www.baidu.com"...domain server (255.255.255.255) [OK]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 220.181.6.18, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/96/120 ms
R1#ping www.google.com
Translating "www.google.com"...domain server (255.255.255.255) [OK]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 66.249.89.104, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/105/144 ms
本文出自 “劉豐源” 部落格,謝絕轉載!
實現GNS的類比路由器串連Internet