思科Cisco 遠程訪問
實驗拓撲:
實驗準備:一個路由器,兩個交換機,兩臺計算機
實驗目的:使PC0能遠程訪問交換機
實驗步驟:1.給計算機配置IP、網關、子網掩碼,
2. 給交換機配置IP,網關
Switch1 配置IP
Switch1>en
Switch1(config)#config terminal
Switch1(config)#interface vlan 1
Switch1(config-if)#ip address 192.168.1.10 255.255.255.0
Switch1(config-if)#no shutdown
配置網關
Switch1(config)#config terminal
Switch1(config)#ip default-gateway 192.168.1.254
Switch#show ip interface brief(檢查)
配置VTY密碼(遠程訪問)
Switch1>en
Switch1(config)#config terminal
Switch(config)#line vty 0 4
Switch(config-line)#password 112233
Switch2 配置IP
Switch2>enable
Switch2(config)#config terminal
Switch2(config)#interface vlan 1
Switch2(config-if)#ip address 192.168.2.20 255.255.255.0
Switch2(config-if)#no shutdown
Switch2(config-if)# end
配置網關
Switch2(config)#config terminal
Switch2(config)#ip default-gateway 192.168.2.254
Switch#show ip interface brief(檢查)
配置VTY密碼(遠程訪問)
Switch2>enable
Switch2 #config terminal
Switch2(config)#line vty 0 4
Switch2(config-line)#password 112233 )
3.給路由器端口配置IP地址
Router>enable
Router#config terminal
Router(config)#hostname wanglu
wanglu(config)#interface gi0/0
wanglu(config-if)#no shutdown
wanglu(config-if)#ip address 192.168.1.254 255.255.255.0
wanglu(config-if)#end
wanglu#config terminal
wanglu(config)#interface gi 0/1
wanglu(config-if)#ip address 192.168.2.254 255.255.255.0
wanglu(config-if)#no shutdown
wanglu(config-if)#end
wanglu#show ip interface brief(檢查)
4.驗證實驗:在計算機上
在交換機上
實驗總結:
1.知道在什麽時候需要配置網關
思科Cisco 遠程訪問