brief VTP all VLAN status in brief id VTP VLAN status by VLAN id number VLAN number
SW2#show vlan brief
SW2#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config-if)#interface f0/3
SW2(config-if)#switchport mode access
SW2(config-if)#interface vlan 2
SW2(config-if)#ip address 192.168.1.1 255.255.255.0 SW2(config-if)#no shut SW2(config-if)#end
SW2#copy run start
Destination filename [startup-config]? Building configuration...
[OK]
在Host1中配置,并做测试
Press Enter to begin
C:>ipconfig /ip 192.168.0.11 255.255.255.0 C:>ping 192.168.0.33
C:>tracert 192.168.0.33
在Host2中配置,并做测试
C:>ipconfig /ip 192.168.0.22 255.255.255.0 C:>ping 192.168.0.11 C:>ping 192.168.0.44
在Host3中配置,并做测试
C:>ipconfig /ip 192.168.0.33 255.255.255.0 C:>ping 192.168.0.11
在Host4中配置,并做测试
C:>ipconfig /ip 192.168.0.44 255.255.255.0 C:>ping 192.168.0.33 C:>ping 192.168.0.22
C:>tracert 192.168.0.22
二、路由器配置命令 1.基本命令: Router>
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#host R1 R1(config)#enable secret c1 R1(config)#line vty 0 4 R1(config-line)#password c2 R1(config-line)#int e0
R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up R1(config-if)#int s0
R1(config-if)#ip address 10.0.0.1 255.0.0.0 R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up R1(config-if)#exit
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#host R2 R2(config)#enable se c1 R2(config)#line vty 0 4 R2(config-line)#pass c2 R2(config-line)#int e0
R2(config-if)#ip address 192.168.2.1 255.255.255.0 R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up R2(config-if)#int s0
R2(config-if)#ip address 10.0.0.2 255.0.0.0 R2(config-if)#clock rate 000 R2(config-if)#bandwidth 500
R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up R2(config-if)#exit 测试: Host1:
C:>ipconfig /ip 192.168.1.2 255.255.255.0 C:>ipconfig /dg 192.168.1.1
C:>ping 192.168.1.1 Host2:
C:>ipconfig /ip 192.168.2.2 255.255.255.0 C:>ipconfig /dg 192.168.2.1 C:>ping 192.168.2.1 2. 静态路由配置:
R1(config)#ip route 192.168.2.0 255.255.255.0 10.0.0.2 R1(config)#end R1#copy run start
Destination filename [startup-config]? Building configuration...
[OK]
R2(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.1 R2(config)#end R2#copy run start
Destination filename [startup-config]? Building configuration... [OK]
R2#show ip route 测试:
Host1:
C:>ping 192.168.2.2 C:>trecert 192.168.2.2
Host2:
C:>ping 192.168.1.2 C:>trecert 192.168.1.2 3.默认路由配置: R2#conf t
Enter configuration commands, one per line. End with CNTL/Z. R2(config)#no ip route 192.168.1.0 255.255.255.0 10.0.0.1 R2(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.1 R2(config)#end
R2#copy run start
Destination filename [startup-config]? Building configuration... [OK]
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int lo0
R1(config-if)#ip address 172.16.1.1 255.255.255.0 R1(config-if)#no shut R1(config-if)#end
R1#copy run start
Destination filename [startup-config]? Building configuration... [OK] 测试: Host2:
C:>ping 192.168.1.2 C:>ping 172.16.1.1 C:>trecert 172.16.1.1 4.Rip协议配置
5.IGRP配置
6.OSPF配置
7.EIGRP配置
8.PPP配置及测试
9.CHAP配置及测试
三、ISDN配置及测试 传统DDR配置
测试:
拨号原型配置:
测试:
四、帧中继配置 基本帧中继配置
测试
R1#show frame-relay map R1#show frame-relay pvc R1#show frame-relay lmi R1#ping 192.168.2.2
帧中继点到点子接口配置
测试:
R3#show frame-relay map R3#show frame-relay pvc R3#show frame-relay lmi R3#ping 192.168.1.2 R3#ping 192.168.2.2 五、ACL综合应用 路由器基本配置
网络地址和路由协议的配置
在R3上配置访问控制列表
将R1和R2配置为web服务器: R1#ip http server
R2#ip http server
设置pc机参数,并用ping命令查看连接
C:>ping 10.0.0.2 C:>ping 192.168.1.2 C:>ping 192.168.2.2 C:>ping 192.168.1.1 C:>ping 192.168.2.1