一實驗目的ide
學習如何配置路由器的gatway、Console、vty、enable password學習
學習如何配置交換機的vlan1 gatway、Console、vty、enable passwordspa
學習如何安裝telnet3d
學習如何遠程登陸交換機路由器orm
二實驗步驟blog
路 由 配 置接口
R1路由器配置IP、子網掩碼、ip
R1(config)#int f0/0 //進入F0/0接口路由
R1(config-if)#ip add 192.168.100.1 255.255.255.0 //配置IP和默認網關get
R1(config-if)#no shutdown // 激活接口
R1(config-if)#exit //退出
Console密碼
R1(config)#line console 0 //進入console o 口
R1(config-line)#password 123 //設置密碼123
R1(config-line)#exit //退出
虛擬終端開啓數和密碼
R1(config)#line vty 0 4 //進入虛擬類型終端設置鏈接數(0是1個、0_ 2 是2個、 0_ 3是3個、0_4是4個)
R1(config-line)#password 123 //設置VTY的密碼123
R1(config-line)#login //開啓激活
R1(config-line)#exit //退出
R1(config)#enable password 123 //給特權模式設置進入密碼123
R1(config)#
交換機配置
S1#conf t //進入特權模式
S1(config)#int vlan 1 //進入vlan 1口
S1(config-if)#ip add 192.168.100.2 255.255.255.0 //配置IP
S1(config-if)#no shutdown //激活接口
S1(config-if)#exit
S1(config)#line console 0 //進入console 0口
S1(config-line)#password 123 //設置密碼123
S1(config-line)#exit //退出
S1(config)#
S1(config)#
S1(config)#line vty 0 4 //進入虛擬類型終端設置鏈接數(0是1個、0_ 2 是2個、 0_ 3是3個、0_4是4個)
S1(config-line)#password 123 //配置IP
S1(config-line)#login //激活
S1(config-line)#exit //退出
S1(config)#
S1(config-if)#ip default-gateway 192.168.100.1 //配置交換機的網關(不在同一網段的時候要用)
S1(config)#enable password 123 //特權模式設置密碼123
安裝telnet
遠程登錄交換機路由器
這裏192.168.100.1是路由器的 192.168.100.2是交換機的
三注意事項
此處當出現遠程鏈接出現(connect refuse或者在端口 23: 鏈接失敗)通常有2種狀況。
1 GNS3的兼容性個出現了問題只能從新打開GNS3程序從新配置
2 telnet的服務默認沒有打開