博客统计信息

51cto推荐博客
用户名:zhangmingchuan
文章数:38
评论数:93
访问量:76278
无忧币:165
博客积分:1494
博客等级:4
注册日期:2007-03-17

我最近发表的评论

验证“是先安装域.. 回复
没事,虚心接受!
验证“是先安装域.. 回复
yuelei博友你说的也不是没有道理.我..
验证“是先安装域.. 回复
90375博友说得对,当初我没有注意这..
驳!~AD和DNS不装.. 回复
是写得不错,我好像没有说过AD与DNS..
ISA 2004在工作组.. 回复
虚心接受。

背景音乐

我的音乐

00:00 | 00:00

2009-04-23 19:21:51
 
交换机的重要技术参数
  下面我将对交换机的重要技术参数作一一介绍,方便网友在选购交换机时比较不同厂商的不同产品。每一个参数都影响到交换机的性能、功能和不同集成特性。
 1、转发技术:交换机采用直通转发技术或存储转发技术?
 2、延时:交换机数据交换延时多少?
 3、管理功能:交换机提供给拥护多少可管理功能?
 4、单/多MAC地址类型:每个端口是单MAC地址,还是多MAC地址?
 5、外接监视支持:交换机是否允许外接监视工具管理端口、电路或交换机所有流量?
 6、扩展树:交换机是否提供扩展..
一个小公司经理的心里话--与应聘者交流 
春节过后,有两个业务员离职了。没有工作交接,没有一句抱歉,但发来了一封简单的辞职Email。
  其中一个业务员的电脑里,找工作时制作的简历忘记删除了,我看了一下:她在本公司的职位由销售助理“提升“到了销售主管,工作内容由跟单“变成”了独立开拓国际市场。
  这两个业务员,一个毕业半年,一个毕业一年半。
  在这里,我丝毫没有指责她们的意思,而且我也明白她们离职的原因:
  1、公司小,未来不可测;
  2、工资一般;
  3、事情杂,有时候还得干..

说明:
1、用小凡搭建实验环境。
2、使用4台3640模拟路由器
3、完成实验目的:出差的员工和分公司的员工都能访问总公司的资源。
 网络拓朴如下图所示:


R1
interface FastEthernet0/0
 ip address 192.168.2.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
interface FastEthernet1/0
 ip address 200.200.13.1 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0
ip nat inside source list 1 interface FastEthernet1/0 overload
access-list 1 permit 192.168.2.0 0.0.0.255

R2
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp key 6 for_vpn address 200.200.34.4       
crypto ipsec transform-set for_vpn esp-3des esp-md5-hmac 
crypto map for_map 1 ipsec-isakmp 
 set peer 200.200.34.4
 set transform-set for_vpn 
 match address for_vpn
interface FastEthernet0/0
 ip address 192.168.3.1 255.255.255.0
 duplex auto
 speed auto
interface FastEthernet1/0
 ip address 200.200.23.2 255.255.255.0
 duplex auto
 speed auto
 crypto map for_map
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0
ip access-list extended for_vpn
permit ip 192.168.3.0 0.0.0.255 192.168.4.0 0.0.0.255

R3
interface Loopback0
 ip address 200.200.3.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 200.200.23.3 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 200.200.13.3 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 ip address 200.200.34.3 255.255.255.0
 duplex auto
 speed auto

R4
aaa new-model
aaa authentication login vpn_authen local
aaa authorization network vpn_author local 
username aa password 0 123456
crypto isakmp policy 1
 encr 3des
 hash md5
 authentication pre-share
 group 2
crypto isakmp policy 2
 hash md5
 authentication pre-share
crypto isakmp key 6 for_vpn address 200.200.23.2 no-xauth
crypto isakmp client configuration group vpn_group
 key 6 123456
 pool vpn_pool
 acl for_vpn
 netmask 255.255.255.0
crypto ipsec transform-set for_vpn esp-3des esp-md5-hmac 
!
crypto dynamic-map vpn_dy_map 1
 set transform-set for_vpn 
 reverse-route
crypto map vpn_map client authentication list vpn_authen
crypto map vpn_map isakmp authorization list vpn_author
crypto map vpn_map client configuration address respond
crypto map vpn_map 1 ipsec-isakmp dynamic vpn_dy_map 
crypto map vpn_map 2 ipsec-isakmp 
 set peer 200.200.23.2
 set transform-set for_vpn 
 match address for_vpn
interface FastEthernet0/0
 ip address 192.168.4.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
interface FastEthernet1/0
 ip address 200.200.34.4 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
 crypto map vpn_map
ip local pool vpn_pool 172.16.10.1 172.16.10.100
ip route 0.0.0.0 0.0.0.0 FastEthernet1/0
ip nat inside source list for_nat interface FastEthernet1/0 overload
ip access-list extended for_nat
 deny   ip 192.168.4.0 0.0.0.255 192.168.3.0 0.0.0.255
 deny   ip 192.168.4.0 0.0.0.255 172.16.10.0 0.0.0.255
 permit ip any any
ip access-list extended for_vpn
 permit ip 192.168.4.0 0.0.0.255 192.168.3.0 0.0.0.255
 permit ip 192.168.4.0 0.0.0.255 172.16.10.0 0.0.0.255
[/img]..
2008-05-29 08:18:15

说明:
1、用小凡搭建实验环境。
2、使用4台3640模拟路由器,1台3640模拟交换机。
3、交换机的fa0/14端口桥接真机vmnet1网卡。
IP地址的划分如下:
R1
F0/0:172.16.3.1/24
Ser1/2:192.168.4.1/24
R2
F0/0:192.168.5.2/24
Ser1/2:192.168.4.2/24
R3
F0/0:192.168.5.3/24
Ser1/1:192.168.6.3/24
R4
F0/0:172.16.7.4/24
Ser1/1:192.168.6.4/24
真机:172.16.3.2/24,网关:172.16.3.1
实验目的:
1、各路由器能学习3条route路由。
2、从真机与R4能互相ping通。
网络拓朴如下图:

实验步骤:
1、按照上图用小凡模拟接好实验环境,SW1的fa0/8与真的vmnet1网卡桥接。
2、使用SecureCRT 5.1控制台开启R1、R2、R3、R4、SW1。
3、配置各设备如下:
R1:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R1
R1(config)#no ip domain-loo
R1(config)#line co 0
R1(config-line)#no exec-t
R1(config-line)#logg sy
R1(config-line)#end
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int f0/0
R1(config-if)#speed 100
R1(config-if)#duplex full
R1(config-if)#ip add 172.16.3.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int ser1/2
R1(config-if)#ip add 192.168.4.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#
R1(config)#
*Mar  1 00:04:06.903: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:04:07.359: %LINK-3-UPDOWN: Interface Serial1/2, changed state to up
*Mar  1 00:04:07.903: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R4(config)#
*Mar  1 00:04:08.359: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/2, changed state to up
R1(config)#
R2:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R2
R2(config)#no ip domain-loo
R2(config)#line co 0
R2(config-line)#no exec-t
R2(config-line)#logg sy
R2(config-line)#end
R2#
*Mar  1 00:06:36.319: %SYS-5-CONFIG_I: Configured from console by console
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int f0/0
R2(config-if)#speed 100
R2(config-if)#duplex full
R2(config-if)#ip add 192.168.5.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#int ser1/2
R2(config-if)#ip add 192.168.4.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#
*Mar  1 00:07:26.183: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:07:26.807: %LINK-3-UPDOWN: Interface Serial1/2, changed state to up
*Mar  1 00:07:27.183: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config)#
*Mar  1 00:07:27.807: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/2, changed state to up
R2(config)#
R3:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#host R3
R3(config)#no ip domain-loo
R3(config)#line co 0
R3(config-line)#no exec-t
R3(config-line)#logg sy
R3(config-line)#end
R3#
*Mar  1 00:08:11.171: %SYS-5-CONFIG_I: Configured from console by console
R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#int f0/0
R3(config-if)#speed 100
R3(config-if)#duplex full
R3(config-if)#ip add 192.168.5.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#int ser1/1
R3(config-if)#ip add 192.168.6.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#
*Mar  1 00:09:33.963: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:09:34.411: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Mar  1 00:09:34.963: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R3(config)#
*Mar  1 00:09:35.411: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
R3(config)#
R4:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R4
R4(config)#no ip domain-loo
R4(config)#line co 0
R4(config-line)#no exec-t
R4(config-line)#logg sy
R4(config-line)#end
R4#
*Mar  1 00:10:13.003: %SYS-5-CONFIG_I: Configured from console by console
R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#int f0/0
R4(config-if)#speed 100
R4(config-if)#duplex full
R4(config-if)#ip add 172.16.7.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#exit
R4(config)#int ser1/1
R4(config-if)#ip add 192.168.6.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#exit
R4(config)#
R4(config)#
*Mar  1 00:10:48.619: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:10:49.279: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Mar  1 00:10:49.619: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R4(config)#
*Mar  1 00:10:50.279: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
R4(config)#
SW1:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host SW1
SW1(config)#no ip domain-loo
SW1(config)#line co 0
SW1(config-line)#no exec-t
SW1(config-line)#logg sy
SW1(config-line)#end
SW1#
*Mar  1 00:19:01.427: %SYS-5-CONFIG_I: Configured from console by console
SW1#vlan dat
SW1(vlan)#vlan 2
VLAN 2 added:
    Name: VLAN0002
SW1(vlan)#vlan 3
VLAN 3 added:
    Name: VLAN0003
SW1(vlan)#exit
APPLY completed.
Exiting....
SW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#int fa0/15
SW1(config-if)#sw mo acc
SW1(config-if)#sw acc vlan 2
SW1(config-if)#exit
SW1(config)#int fa0/8
SW1(config-if)#sw mo acc
SW1(config-if)#sw acc vlan 2
SW1(config-if)#exit
SW1(config)#int fa0/12
SW1(config-if)#sw mo acc
SW1(config-if)#sw acc vlan 3
SW1(config-if)#exit
SW1(config)#exit
SW1#show vlan-sw b

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/0, Fa0/1, Fa0/2, Fa0/3
                                                Fa0/4, Fa0/5, Fa0/6, Fa0/7
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/13
                                                Fa0/14
2    VLAN0002                         active    Fa0/8, Fa0/15
3    VLAN0003                         active    Fa0/12
1002 fddi-default                     active    
1003 token-ring-default               active    
1004 fddinet-default                  active    
1005 trnet-default                    active    
SW1#
*Mar  1 00:22:27.187: %SYS-5-CONFIG_I: Configured from console by console
SW1#
4、在路由器R1上做rip路由协议,并且为版式本1,如下设置:
R1(config)#router rip
R1(config-router)#network 172.16.0.0
R1(config-router)#network 192.168.4.0
R1(config-router)#exit
R1(config)#exit
R1#
*Mar  1 00:19:08.063: %SYS-5-CONFIG_I: Configured from console by console
R1#
5、在路由器R2、R3、R4上配置rip协议,并且运行版本2,如下设置:
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.4.0
R2(config-router)#network 192.168.5.0
R2(config-router)#exit
R2(config)#exit
R2#
*Mar  1 00:21:45.035: %SYS-5-CONFIG_I: Configured from console by console
R2#

R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.6.0
R3(config-router)#network 192.168.5.0
R3(config-router)#exit
R3(config)#exit
R3#
*Mar  1 00:22:17.031: %SYS-5-CONFIG_I: Configured from console by console
R3#

R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#no auto-summary
R4(config-router)#network 192.168.6.0
R4(config-router)#network 172.16.0.0
R4(config-router)#exit
R4(config)#exit
R4#
*Mar  1 00:22:53.731: %SYS-5-CONFIG_I: Configured from console by console
R4#
6、使用show ip route命令查看各路由器信息:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 2 subnets
R       172.16.7.0 [120/3] via 192.168.4.2, 00:00:10, Serial1/2
C       172.16.3.0 is directly connected, FastEthernet0/0
C    192.168.4.0/24 is directly connected, Serial1/2
R    192.168.5.0/24 [120/1] via 192.168.4.2, 00:00:10, Serial1/2
R    192.168.6.0/24 [120/2] via 192.168.4.2, 00:00:10, Serial1/2
R1#

R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets
R       172.16.7.0 [120/2] via 192.168.5.3, 00:00:00, FastEthernet0/0
C    192.168.4.0/24 is directly connected, Serial1/2
C    192.168.5.0/24 is directly connected, FastEthernet0/0
R    192.168.6.0/24 [120/1] via 192.168.5.3, 00:00:00, FastEthernet0/0
R2#

R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets
R       172.16.7.0 [120/1] via 192.168.6.4, 00:00:03, Serial1/1
R    192.168.4.0/24 [120/1] via 192.168.5.2, 00:00:23, FastEthernet0/0
C    192.168.5.0/24 is directly connected, FastEthernet0/0
C    192.168.6.0/24 is directly connected, Serial1/1
R3#

R4#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.7.0 is directly connected, FastEthernet0/0
R    192.168.4.0/24 [120/2] via 192.168.6.3, 00:00:11, Serial1/1
R    192.168.5.0/24 [120/1] via 192.168.6.3, 00:00:11, Serial1/1
C    192.168.6.0/24 is directly connected, Serial1/1
R4#

7、在R1上的路由信息中,R1路由器已经学习到其它路由的信息,因为R1是设置版本1的rip路由协议,是可以学习到版本2的路由信息,而版本2只能学习到版本2的路由信息,所以路由器R2、R3、R4没有学习到R1的路由信息,可以使用show ip protocols查看,如所示:
R1#show ip protocols 
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 17 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: rip
  Default version control: send version 1, receive any version
    Interface             Send  Recv  Triggered RIP  Key-chain
    FastEthernet0/0       1     1 2                                  
    Serial1/2             1     1 2                                  
  Automatic network summarization is in effect
  Maximum path: 4
  Routing for Networks:
    172.16.0.0
    192.168.4.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.4.2          120      00:00:14
  Distance: (default is 120)

R1#

R2#show ip pro
R2#show ip protocols 
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 10 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: rip
  Default version control: send version 2, receive version 2
    Interface             Send  Recv  Triggered RIP  Key-chain
    FastEthernet0/0       2     2                                    
    Serial1/2             2     2                                    
  Automatic network summarization is not in effect
  Maximum path: 4
  Routing for Networks:
    192.168.4.0
    192.168.5.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.5.3          120      00:00:08
  Distance: (default is 120)

R2#
8、为了让路由器R2、R3、R4也能学习到R1的路由信息,只需要在R2的ser1/2端口做如下设置就可以,因为rip路由协议是相邻路由器之间路由信息相互复制,所以只要R2路由器学习到了,其它路由器就能学习到。
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int ser1/2
R2(config-if)#ip rip re
R2(config-if)#ip rip receive v
R2(config-if)#ip rip receive version 1 2
R2(config-if)#exit
R2(config)#exit
R2#
*Mar  1 00:37:27.503: %SYS-5-CONFIG_I: Configured from console by console
R2#
10、再次使用show ip protocols查看:
R2#show ip protocols 
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 24 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: rip
  Default version control: send version 2, receive version 2
    Interface             Send  Recv  Triggered RIP  Key-chain
    FastEthernet0/0       2     2                                    
    Serial1/2             2     1 2                                  
  Automatic network summarization is not in effect
  Maximum path: 4
  Routing for Networks:
    192.168.4.0
    192.168.5.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.4.1          120      00:00:22
    192.168.5.3          120      00:00:12
  Distance: (default is 120)

R2#
11、再次使用show ip route命令时,R2、R3、R4学习到R1的路由信息:
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R       172.16.7.0/24 [120/2] via 192.168.5.3, 00:00:02, FastEthernet0/0
R       172.16.0.0/16 [120/1] via 192.168.4.1, 00:00:12, Serial1/2
C    192.168.4.0/24 is directly connected, Serial1/2
C    192.168.5.0/24 is directly connected, FastEthernet0/0
R    192.168.6.0/24 [120/1] via 192.168.5.3, 00:00:02, FastEthernet0/0
R2#

R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R       172.16.7.0/24 [120/1] via 192.168.6.4, 00:00:09, Serial1/1
R       172.16.0.0/16 [120/2] via 192.168.5.2, 00:00:18, FastEthernet0/0
R    192.168.4.0/24 [120/1] via 192.168.5.2, 00:00:18, FastEthernet0/0
C    192.168.5.0/24 is directly connected, FastEthernet0/0
C    192.168.6.0/24 is directly connected, Serial1/1
R3#

R4#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       172.16.7.0/24 is directly connected, FastEthernet0/0
R       172.16.0.0/16 [120/3] via 192.168.6.3, 00:00:19, Serial1/1
R    192.168.4.0/24 [120/2] via 192.168.6.3, 00:00:19, Serial1/1
R    192.168.5.0/24 [120/1] via 192.168.6.3, 00:00:19, Serial1/1
C    192.168.6.0/24 is directly connected, Serial1/1
R4#

12、测试,真机与R4能互相ping通:
R4#ping 172.16.3.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 136/253/408 ms
R4#
C:\Documents and Settings\Administrator>ping 172.16.7.4

Pinging 172.16.7.4 with 32 bytes of data:

Reply from 172.16.7.4: bytes=32 time=244ms TTL=252
Reply from 172.16.7.4: bytes=32 time=268ms TTL=252
Reply from 172.16.7.4: bytes=32 time=185ms TTL=252
Reply from 172.16.7.4: bytes=32 time=176ms TTL=252

Ping statistics for 172.16.7.4:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 176ms, Maximum = 268ms, Average = 218ms

C:\Documents and Settings\Administrator>

在R4上使用扩展ping

R4#ping
Protocol [ip]: 
Target IP address: 172.16.3.2
Repeat count [5]: 
Datagram size [100]: 
Timeout in seconds [2]: 
Extended commands [n]: y
Source address or interface: 172.16.7.4
Type of service [0]: 
Set DF bit in IP header? [no]: 
Validate reply data? [no]: 
Data pattern [0xABCD]: 
Loose, Strict, Record, Timestamp, Verbose[none]: 
Sweep range of sizes [n]: 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds:
Packet sent with a source address of 172.16.7.4 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 108/176/256 ms
R4#[/img]..
2008-05-28 15:49:22

 
用小凡模拟实验环境:
设备:1台3640路由器
    1台3640模拟交换机
1台3640模拟PC2
真机充当PC1
注意:模拟PC2的路由器需要将关闭路由功能(no ip routing)。

R1:
Router>en
Router#conf t
Router#host R1
R1(config)#no ip domain-loo
R1(config)#line co 0
R1(config)#no exec-t
R1(config)#logg sy
R1(config)#end
R1#conf t
R1(config)#int f0/0
R1(config-if)#no ip add
R1(config-if)#no shut
R1(config-if)#end
R1#conf t
R1(config)#int f0/0.2
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#encapsulation dot1q 2
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f0/0.3
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#encapsulation dot1q 3
R1(config-if)#no shut
R1(config-if)#exit
R1#

R2:(3640模拟的PC2)
Router>en
Router#conf t
Router#host R2
R2(config)#no ip domain-loo
R2(config)#line co 0
R2(config)#no exec-t
R2(config)#logg sy
R2(config)#end
R2#conf t
R2(config)#int f0/0
R2(config-if)#ip add 192.168.3.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#no ip routing   关闭路由功能
R2(config)#ip default-gat 192.168.3.1
R2(config)#exit
R2#

SW1:
Router>en
Router#conf t
Router#host SW1
SW1(config)#no ip domain-loo
SW1(config)#line co 0
SW1(config)#no exec-t
SW1(config)#logg sy
SW1(config)#end
SW1h#vlan data
SW1(vlan)#vlan 2 
SW1(vlan)#vlan 3
SW1(vlan)#exit
SW1#conf t
SW1(config)#int fa0/0
SW1(config-if)#sw mod tru
SW1(config-if)#swi trunk encap dot1q
SW1(config-if)#int fa0/14
SW1(config-if)#sw mod acc
SW1(config-if)#sw acc vlan 2
SW1(config-if)#no shut
SW1(config-if)#int fa0/15
SW1(config-if)#sw mod acc
SW1(config-if)#sw acc vlan 3
SW1(config-if)#no shut
SW1(config-if)#exit
SW1(config)#exit
SW1#

真机:设置IP地址为:192.168.2.2/24
      网关:192.168.2.1
测试:
真机与R2互相能ping通。[/img]..
 <<   1   2   3   4   5   >>   页数 ( 1/8 )

公告