交换机的基本配置:
s1(conf)#int vlan 1
s1(conf-if)#ip address 192.168.1.254 255.255.0
s1(conf-if)#no shut
s1#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up up
FastEthernet0/1 unassigned YES unset up down
FastEthernet0/2 unassigned YES unset up down
FastEthernet0/3 unassigned YES unset up down
FastEthernet0/4 unassigned YES unset up down
FastEthernet0/5 unassigned YES unset up down
FastEthernet0/6 unassigned YES unset up down
Vlan1 192.168.1.254 YES manual up up
s1#
s1#
配置R1:
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname r1
r1(config)#no ip domain-lookup
r1(config)#line console 0
r1(config-line)#no exec-timeout
r1(config-line)#logging synchronous
r1(config-line)#end
r1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
r1(config)#int f
00:00:43: %SYS-5-CONFIG_I: Configured from console by console
r1(config)#int f0/0
r1(config-if)#ip add 192.168.1.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#end
r1#
r1#ping 192.168.1.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/760/1888 ms
r1#
交换机和路由器中间是相通的
我们配置交换机远程登录
s1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
s1(config)#enable password cisco
s1(config)#line vty ?
<0-871> First Line number
s1(config)#line vty 0 15
s1(config-line)#password cisco
s1(config-line)#login
s1(config-line)#end
s1#
*Mar 1 00:16:02.243: %SYS-5-CONFIG_I: Configured from console by console
s1#
r1#
r1#telnet 192.168.1.254
Trying 192.168.1.254 ... Open
User Access Verification
Password:
s1>en
Password:
s1#
设置交换机的安全端口:
本版本不支持,实验暂不做了.......抱歉.......