赞
踩
S1(config)#line vty 0 2
S1(config-line)#exit
S1(config)#exit
S1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
S1(config)#line vty 0 2
S1(config-line)#login local
S1(config-line)#exit
S1(config)#username a1 password 1234
S1(config)#enable password 2345
S1:
S1(config)#vlan 50
S1(config-vlan)#vlan 60
S1(config-vlan)#exit
S1(config)#interface vlan 50
S1(config-if)#
%LINK-5-CHANGED: Interface Vlan50, changed state to up
S1(config-if)#ip address 172.0.50.254 255.255.255.0
S1(config-if)#exit
S1(config)#interface vlan 60
S1(config-if)#
%LINK-5-CHANGED: Interface Vlan60, changed state to up
S1(config-if)#ip address 172.0.60.254 255.255.255.0
S2:
S2(config)#vlan 10
S2(config-vlan)#vlan 20
S2(config-vlan)#exit
S2(config)#interface vlan 10
S2(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
S2(config-if)#ip address 172.0.10.254 255.255.255.0
S2(config-if)#exit
S2(config)#interface vlan 20
S2(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
S2(config-if)#ip address 172.0.20.254 255.255.255.0
配置各pc ip
S1:
S1(config)#interface fastEthernet 0/5
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 50
S1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up
S1(config-if)#exit
S1(config)#interface fastEthernet 0/6
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 60
S1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan60, changed state to up
S1(config-if)#exit
S1(config)#interface fastEthernet 0/1
S1(config-if)#switchport mode trunk
S1(config-if)#
R1:
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0.50
R1(config-subif)#
R1(config-subif)#ip add
R1(config-subif)#ip address 172.0.50.1 255.255.255.0
R1(config-subif)#encapsulation dot1Q 50
R1(config-subif)#ip address 172.0.50.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface fastEthernet 0/0.60
R1(config-subif)#
R1(config-subif)#encapsulation dot1Q 60
R1(config-subif)#ip address 172.0.60.1 255.255.255.0
R1(config-subif)#
验证可用性:
S2:
S2(config)#vlan 10
S2(config-vlan)#vlan 20
S2(config-vlan)#exit
S2(config)#interface fastEthernet 0/1
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 10
S2(config-if)#exit
S2(config)#interface fastEthernet 0/6
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 20
S2(config-if)#exit
S2(config)#interface fastEthernet 0/20
S2(config-if)#switchport mode trunk
S3:
S3(config)#vlan 10
S3(config-vlan)#vlan 20
S3(config-vlan)#exit
S3(config)#interface fastEthernet 0/1
S3(config-if)#switchport mode access
S3(config-if)#switchport access vlan 10
S3(config-if)#exit
S3(config)#interface fastEthernet 0/6
S3(config-if)#switchport mode access
S3(config-if)#switchport access vlan 20
S3(config-if)#exit
S3(config)#ip routing
三层路由验证:
R0:
R0#erase startup-config
R0(config)#interface fastEthernet 0/1
R0(config-if)#no shutdown
R0(config-if)#ip address 192.168.1.2 255.255.255.0
R0(config-if)#exit
R0(config)#interface fastEthernet 0/0
R0(config-if)#no shutdown
R0(config-if)#ip address 192.168.0.1 255.255.255.0
R0(config-if)#exit
R0(config)#interface fastEthernet 1/0
R0(config-if)#no shutdown
R0(config-if)#ip address 192.168.3.1 255.255.255.0
R0(config)#ip route 172.0.50.0 255.255.255.0 192.168.3.2
R0(config)#ip route 172.0.60.0 255.255.255.0 192.168.3.2
R0(config)#ip route 172.0.10.0 255.255.255.0 192.168.1.1
R0(config)#ip route 172.0.20.0 255.255.255.0 192.168.1.1
S3:
S3(config)#in fastEthernet 0/24
S3(config-if)#no switchport
S3(config-if)#ip address 192.168.1.1 255.255.255.0
S3(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
R1(config)#interface fastEthernet 0/1
R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.3.2 255.255.255.0
R1(config-if)#exit
R1(config)#
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1
服务器:
R1#copy running-config tftp
Address or name of remote host []? 192.168.0.2
Destination filename [R1-confg]? y
Writing running-config...!!
[OK - 787 bytes]
787 bytes copied in 0 secs
R1#
END:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。