實驗名稱:PC、交換機、路由通訊web
實驗拓撲:app
實驗步驟:PC配置IP、交換機配置IP網關開啓用戶遠程登陸、路由器配置IP開啓遠程登陸less
實驗總結:Ping正常,Telnet正常。 ip default-gateway 192.168.1.254dom
實驗命令:ide
Switch>enableui
Switch#configure terminal spa
Switch(config)#hostname CiscoSwitch1debug
CiscoSwitch1(config)#no IP domain-lookuporm
CiscoSwitch1(config)#line console 0blog
CiscoSwitch1(config-line)#password 111111
CiscoSwitch1(config-line)#login
CiscoSwitch1(config-line)#exit
CiscoSwitch1(config)#line vty 0 4
CiscoSwitch1(config-line)#password 222222
CiscoSwitch1(config-line)#login
CiscoSwitch1(config-line)#exit
CiscoSwitch1(config)#enable password 333333
CiscoSwitch1(config)#interface vlan 1
CiscoSwitch1(config-if)#no shutdown
CiscoSwitch1(config-if)#ip address 192.168.1.10 255.255.255.0
CiscoSwitch1(config-if)#exit
CiscoSwitch1(config)#ip default-gateway 192.168.1.254
CiscoSwitch1(config)#exit
CiscoSwitch1#
CiscoSwitch1#show running-config
Building configuration...
Current configuration : 1186 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname CiscoSwitch1
!
enable password 333333
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.1.10 255.255.255.0
!
ip default-gateway 192.168.1.254
!
!
!
!
line con 0
password 111111
login
!
line vty 0 4
password 222222
login
line vty 5 15
login
!
!
!
end
CiscoSwitch1#write
CiscoSwitch1#config terminal
CiscoSwitch1(config)#service password-encryption
CiscoSwitch1(config)#exit
CiscoSwitch1#write
CiscoSwitch1#reload
Router>enable
Router#configure terminal
Router(config)#hostname CiscoRouter
CiscoRouter(config)#no ip domain-lookup
CiscoRouter(config)#enable password 111111
CiscoRouter(config)#line console 0
CiscoRouter(config-line)#password 222222
CiscoRouter(config-line)#login
CiscoRouter(config-line)#exit
CiscoRouter(config)#line vty 0 4
CiscoRouter(config-line)#password 333333
CiscoRouter(config-line)#login
CiscoRouter(config-line)#exit
CiscoRouter(config)#interface GigabitEthernet 0/1
CiscoRouter(config-if)#no shutdown
CiscoRouter(config-if)#ip address 192.168.1.254 255.255.255.0
CiscoRouter(config-if)#exit
CiscoRouter(config)#interface gigabitEthernet 0/2
CiscoRouter(config-if)#no shutdown
CiscoRouter(config-if)#ip address 192.168.2.254 255.255.255.0
CiscoRouter(config-if)#end
CiscoRouter#
CiscoRouter#show running-config
Building configuration...
Current configuration : 809 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname CiscoRouter
!
!
!
enable password 111111
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524MK72
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
ip address 192.168.1.254 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/2
ip address 192.168.2.254 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
password 222222
login
!
line aux 0
!
line vty 0 4
password 333333
login
!
!
!
end
CiscoRouter#configure terminal
CiscoRouter(config)#service password-encryption
CiscoRouter(config)#end
CiscoRouter#
CiscoRouter#write
CiscoRouter#reload