SwitchA# conf t
SwitchA(config)# int vlan 1
SwitchA(config-if)# ip address 10.1.1.20 255.255.255.0
SwitchA(config-if)# no shutdown
SwitchA(config-if)# end
SwitchA#
[從 Step 1 開始]
SwitchA# conf t
SwitchA(config)# vlan 2
SwitchA(config-vlan)# name VLAN0002
SwitchA(config-vlan)# exit
SwitchA(config)# exit
SwitchA# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1, Gi0/2
2 VLAN0002 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
.....
SwitchA# conf t
SwitchA(config)# int fa 0/2
SwitchA(config-if)# switchport access vlan 2
SwitchA(config-if)# exit
SwtichA(config)# int fa 0/2
SwitchA(config-if)# spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single host.
Connecting hubs, concentrators, switches, bridges, etc.to this interface
when portfast is enabled, can cause temporary spanning tree loops.
Use with CAUTION
%Portfast has been configured on FastEthernet0/2 but will only
have effect when the interface is in a non-trunking mode.
SwitchA (config-if)# exit
SwitchA# show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1, Gi0/2
2 VLAN0002 active Fa0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SwitchA#
[從 Step 6 開始]
RouterA>enable
Password:
RouterA#conf t
RouterA(config)# int fa 0/0
RouterA(config-if)# ip address 10.2.2.12 255.255.255.0
RouterA(config-if)# no shutdown
RouterA(config-if)# exit
RouterA(config)# exit
RouterA# ping 10.2.2.3
Sending 5, 100-byte ICMP Echos to 10.2.2.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
RouterA# ping 10.1.1.10
Sending 5, 100-byte ICMP Echos to 10.1.1.10, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
RouterA# conf t
RouterA(config)# ip route 0.0.0.0 0.0.0.0 10.2.2.3
RouterA(config)# exit
RouterA# ping 10.1.1.10
Sending 5, 100-byte ICMP Echos to 10.1.1.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
RouterA#
0 意見:
張貼留言
小技巧:也可以 匿名 留言!