收藏 分享(赏)

企业网络构建路由配置.ppt

上传人:无敌 文档编号:383520 上传时间:2018-04-04 格式:PPT 页数:100 大小:5.69MB
下载 相关 举报
企业网络构建路由配置.ppt_第1页
第1页 / 共100页
企业网络构建路由配置.ppt_第2页
第2页 / 共100页
企业网络构建路由配置.ppt_第3页
第3页 / 共100页
企业网络构建路由配置.ppt_第4页
第4页 / 共100页
企业网络构建路由配置.ppt_第5页
第5页 / 共100页
点击查看更多>>
资源描述

1、企业网络构建实验,RouterB(config)# line vty 0 4RouterB(config-line)# loginRouterB(config-line)# password cisco1RouterB(config-line)# exit RouterB(config)# enable password cisco2RouterC(config)# line vty 0 4RouterC(config-line)# loginRouterC(config-line)# password cisco3RouterC(config-line)# exit RouterC(conf

2、ig)# enable password cisco4,VTY,RouterAtelnet 192.168.3.2Password:RouterBctrl-shift-6,xRouterAtelnet 192.168.2.2Password:RouterCctrl-shift-6,xRouterARouterAshow sessionRouterAresume nRouterAdisconnect n,PC2,PC1,RouterA(config)# line vty 0 4RouterA(config-line)# loginRouterA(config-line)# password ci

3、sco5RouterA(config)# enable password cisco6,VTY,RouterBtelnet 192.168.2.1Password:RouterARouterCtelnet 192.168.3.1Password:RouterA,PC2,PC1,RouterAshow userRouterAclear line n,如图所示,如果从PC1telnet路由器B或C,则需要在路由器B或C上配置到PC1所在网段的静态路由。,rommon 2 set (查看配置)rommon 3 IP_ADDRESS10.32.10.1 (路由器的ip地址)rommon 4 IP_SU

4、BNET_MASK255.255.255.0 (路由器的掩码)rommon 5 DEFAULT_GATEWAY10.32.10.32 (pc机的ip地址)rommon 6 TFTP_SERVER10.32.10.32 (是pc机的ip地址)rommon 7 TFTP_FILEC2600-I-MZ.122-11.BIN (ios文件名称)rommon 8 set rommon 9 tftpdnld rommon 10 reset,升级IOS,switch: flash_init switch: load_helper switch:copy xmodem: flash:c2950-i6k2l2q

5、4-mz.121-22.EA.bin系统提示不断出现C这个字母就可以开始传文件了点击超级终端菜单:传送-发送文件,在协议选项中选择Xmodem或者Xmodem-1K协议,然后选择IOS文件,开始传送。switch:boot,升级IOS,switch:flash_init switch:load_helper switch:dir flash:switch:rename flash:config.text flash:config.old switch:boot Switch#rename flash:config.old flash:config.textSwitch#copy flash:c

6、onfig.text system:runningconfigSwitch(config)#no enable secret Switch(config)#copy run start,口令恢复,重启路由器,在60秒内按下CTRLBreak键rommon1 confreg 0x2142rommon2 resetRouter enableRouter# copy startup-config running-configRouter# config tRouter(config)# enable secret xxxxxxRouter(config)#config-register 0x2102

7、Router(config)#exitRouter# copy running-config startup-configRouter# reload,口令恢复,VLAN配置,VTP(可选)配置trunk创建vlanVlan中添加端口,单个交换机上配置VLAN,1900(config)#vlan 2 name VLAN_2 1900(config)#vlan 3 name VLAN_3 1900(config)#interface e 0/5 1900(config-if)#vlan-membership static 2 1900(config)#interface e 0/9 1900(c

8、onfig-if)#vlan-membership static 3,2950# vlan database2950(vlan)# vlan 2 name VLAN_22950(vlan)# vlan 3 name VLAN_32950(config)# int fa0/22950(config-if)# switchport access vlan 22950(config)# int fa0/32950(config-if)# switchport access vlan 3,1900# show vlan vlan# 显示vlan信息1900# show vlan-membership

9、显示接口的vlan分配2950# show vlan id vlan# 显示vlan信息2950# show vlan brief 显示接口的vlan分配,跨主干VLAN的配置,1900A# configure terminal 1900A(cofig)# vtp server1900A(cofig)# vtp domain Cisco 1900A(cofig)# pruning enable1900A(config)# interface fa 0/26 1900A(config-if)# trunk on1900A(config)# vlan 2 name VLAN2 1900A(conf

10、ig)# vlan 3 name VLAN31900A(config)# vlan 4 name VLAN4 1900A(config)# interface e 0/2 1900A(config-if)#vlan-membership static 2 1900A(config)# interface e 0/3 1900A(config-if)#vlan-membership static 3 1900A(config)# interface e 0/5 1900A(config-if)#vlan-membership static 4,1900B# configure terminal

11、1900B(cofig)# vtp client1900A(cofig)# vtp domain Cisco1900B(config)# interface fa 0/26 1900B(config-if)# trunk on1900B(config)# interface e 0/61900B(config-if)#vlan-membership static 2 1900B(config)# interface e 0/7 1900B(config-if)#vlan-membership static 3 1900B(config)# interface e 0/81900B(config

12、-if)#vlan-membership static 41900# show vtp 查看vtp配置信息1900# show trunk A|B 显示trunk参数1900# show vlan vlan# 显示vlan信息1900# show vlan-membership 显示接口的vlan分配,1900A#configure terminal 1900A(config)#interface fa 0/26 1900A(config-if)#trunk on 1900A(config)#interface fa 0/271900A(config-if)#trunk on1900A(con

13、fig)#ip add 10.5.1.2 255.255.255.01900A(config)#ip default-gateway 10.5.1.1,R(config)#int f0/0R(config-if)#no ip addressR(config-if)#no shutdownR(config)#int f0/0.1R(config-subif)#encapsulation isl 1R(config-subif)#ip add 10.5.1.1 255.255.255.0R(config)#int f0/0.2R(config-subif)#encapsulation isl 2R

14、(config-subif)#ip add 10.5.2.1 255.255.255.0R(config)#int f0/0.3R(config-subif)#encapsulation isl 3R(config-subif)#ip add 10.5.3.1 255.255.255.0R(config)#int f0/0.4R(config-subif)#encapsulation isl 4R(config-subif)#ip add 10.5.4.1 255.255.255.0,1900B#configure terminal 1900B(config)#interface fa 0/2

15、6 1900B(config-if)#trunk on 1900B(config)#ip add 10.5.1.3 255.255.255.01900B(config)#ip default-gateway 10.5.1.1,VLAN间路由,跨主干VLAN的配置,2950A# vlan database2950A(vlan)# vtp server2950A(vlan)# vtp domain Cisco2950A(vlan)# vtp password 1232950A(vlan)# vtp pruning2950A(config)# interface fa 0/24 2950A(conf

16、ig-if)# switchport mode trunk2950A# vlan database2950A(vlan)# vlan 2 name VLAN_22950A(vlan)# vlan 3 name VLAN_32950A(config)# interface f 0/2 2950A(config-if)#switchport access vlan 2 2950A(config)# interface f 0/3 2950A(config-if)# switchport access vlan 3,2950B# vlan database 2950B(vlan)# vtp clie

17、nt2950B(vlan)# vtp domain Cisco 2950B(vlan)# vtp password 1232950B(config)# interface fa 0/242950B(config-if)# switchport mode trunk2950B(config)# interface f 0/42950B(config-if)#switchport access vlan 2 2950B(config)# interface f 0/3 2950B(config-if)# switchport access vlan 32950# show vtp status 查

18、看vtp配置信息2950# show int int switchport 显示trunk参数2950# show vlan id vlan# 显示vlan信息2950# show vlan brief 显示接口的vlan分配,trunk,vlan4,vlan2,vlan3,vlan4,vlan3,vlan2,VLAN间路由,2950A(config)#interface fa 0/23 2950A(config-if)#switchport mode trunk 2950A(config)#interface vlan 12950A(config-if)# ip add 10.5.1.2 2

19、55.255.255.02950A(config-if)# no shut2950A(config)#ip default-gateway 10.5.1.12950B(config)#interface vlan 12950B(config-if)# ip add 10.5.1.3 255.255.255.02950B(config-if)# no shut2950B(config)#ip default-gateway 10.5.1.1,在前面实验的基础上做该实验路由器上的主接口必须打开子接口先封装后配IP地址,R(config)#int f0/0R(config-subif)#ip add

20、 10.5.1.1 255.255.255.0R(config-if)#no shutdownR(config)#int f0/0.2R(config-subif)#encapsulation dot1q 2R(config-subif)#ip add 10.5.2.1 255.255.255.0R(config)#int f0/0.3R(config-subif)#encapsulation dot1q 3R(config-subif)#ip add 10.5.3.1 255.255.255.0R(config)#int f0/0.4R(config-subif)#encapsulation

21、 dot1q 4R(config-subif)#ip add 10.5.4.1 255.255.255.0,2950(config)# int range f0/23 242950(config-if-range)# speed 1002950(config-if-range)# deplex full2950(config-int-range)# channel-group 1 mode on2950(config-int-range)# switchport mode trunk2950(config-int-range)# switchport trunk allowed vlan re

22、move 32950(config-int-range)# switchport trunk allowed vlan add 32924(config-if)# switchport trunk encapsulation dot1q,VLAN中其它命令,如图进行配置如果S1上不配置vlan,S0和S2上相同vlan中的PC能否通信?,三层交换机vlan配置,3550# vlan database3550(vlan)# vtp server3550(vlan)# vtp domain Cisco3550(vlan)# vtp password 1233550(vlan)# vtp pruni

23、ng3550(config)# interface fa 0/23 3550(config-if)# switchport3550(config-if)# switchport mode trunk3550(config)# interface fa 0/23 3550(config-if)# switchport3550(config-if)# switchport mode trunk3550# vlan database3550(vlan)# vlan 23550(vlan)# vlan 3,2950A# vlan database 2950A(vlan)# vtp client2950

24、A(vlan)# vtp domain Cisco 2950A(vlan)# vtp password 1232950A(config)# interface fa 0/242950A(config-if)# switchport mode trunk2950A(config)# interface f 0/22950A(config-if)#switchport access vlan 2 2950A(config)# interface f 0/3 2950A(config-if)# switchport access vlan 3,三层交换机vlan配置,2950B# vlan data

25、base 2950B(vlan)# vtp client2950B(vlan)# vtp domain Cisco 2950B(vlan)# vtp password 1232950B(config)# interface fa 0/242950B(config-if)# switchport mode trunk2950B(config)# interface f 0/22950B(config-if)#switchport access vlan 2 2950B(config)# interface f 0/3 2950B(config-if)#switchport access vlan

26、 3,3550(config)# int vlan 2 3550(config-if)# ip add 172.16.1.1 255.255.255.03550(config-if)# int vlan 33550(config-if)# ip add 172.16.2.1 255.255.255.03550(config)# ip routing,3550(config)# int vlan 2 3550(config-if)# ip add 172.16.1.1 255.255.255.03550(config-if)# ip helper-address DHCP Server IP 3

27、550(config-if)# int vlan 33550(config-if)# ip add 172.16.2.1 255.255.255.03550(config-if)# ip helper-address DHCP Server IP3550(config)#service dhcp3550(config)#ip dhcp replay infomation option,PVST的配置命令,Switch(config)#spanning-tree vlan vlan-list 启用生成树Switch(config)#spanning-tree vlan vlan-list roo

28、t primary | secondary 设置根网桥 (优先级变成24576)Switch(config)#spanning-tree vlan vlan-list priority Bridge-priority 网桥的优先级 (4096的倍数)Switch(config-if)#spanning-tree vlan vlan-list cost cost 修改端口成本 Switch(config-if)#spanning-tree vlan vlan-list port-priority priority 改端口优先级Switch(config)#spanning-tree uplink

29、fast 上行速链路 Switch(config-if)#spanning-tree portfast 端口速链路 Switch#show spanning-tree vlan vlan-id detail,PVST配置实例,C,A,B,D,Port 24,Port 24,Port 23,Port 23,Port 22,Port 23,Port 23,Port 22,Port 22,Port 22,32768.000d.28bf.4b40,32768.0013.6007.6a00,32768.000d.2861.b100,32768.000d.28bf.1140,缺省情况下的STP,Root

30、Bridge,Block,希望的配置结果,Vlan 1-4,Vlan 1-4,Vlan 1-2的根网桥,Vlan 3-4的根网桥,PVST配置实例,配置SwA为VLAN 2和3的根网桥SwA(config)#spanning-tree vlan 2 root primarySwA(config)#spanning-tree vlan 3 root primary配置SwB在VLAN 4和5中优先级为4096SwB(config)#spanning-tree vlan 4 priority 4096SwB(config)#spanning-tree vlan 5 priority 4096,PV

31、ST配置实例,查看配置结果SwB# show spanning-treeVLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 000d.28bf.4b40 Cost 19 Port 24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0013.6007.6a00 Hello T

32、ime 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p Fa0/24 Root FWD 19 128.24 P2p,根网桥的信息,自己的信息,本地接口的信息,VLAN 1的根网桥为SwA,优先级为24576VLAN ID,端口22和23阻塞,24为根端口,PVST配置实例,VLAN0002 Spanning tree

33、enabled protocol ieee Root ID Priority 24578 Address 000d.28bf.4b40 Cost 19 Port 24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32770 (priority 32768 sys-id-ext 2) Address 0013.6007.6a00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 30

34、0Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p Fa0/24 Root FWD 19 128.24 P2p,PVST配置实例,C,D,Port 24,Port 24,Port 23,Port 23,Port 22,Port 23,Port 23,Port 22,Port 22,Port 22,24576.000d.28bf.4b40,32768.0013.6007.6a00,32768.000d.2861.b100,32768

35、.000d.28bf.1140,VLAN 1-2的逻辑拓朴,Vlan 1-4,Vlan 1-4,Vlan 1-2的根网桥,B,A,PVST配置实例,查看配置结果(VLAN 3 4)SwA#show spanning-tree VLAN0003 Spanning tree enabled protocol ieee Root ID Priority 4099 Address 0013.6007.6a00 Cost 19 Port 24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID

36、 Priority 32771 (priority 32768 sys-id-ext 3) Address 000d.28bf.4b40 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p Fa0/24 Root FWD 19 128.24 P2p,PVST配置实例,VLAN0004 Spanning

37、 tree enabled protocol ieee Root ID Priority 4100 Address 0013.6007.6a00 Cost 19 Port 24 (FastEthernet0/24) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32772 (priority 32768 sys-id-ext 4) Address 000d.28bf.4b40 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Ti

38、me 300Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p Fa0/24 Root FWD 19 128.24 P2p,PVST配置实例,C,D,Port 24,Port 24,Port 23,Port 23,Port 22,Port 23,Port 23,Port 22,Port 22,Port 22,32768.000d.28bf.4b40,4096.0013.6007.6a00,32768.000d.2861.b100,3

39、2768.000d.28bf.1140,VLAN 3-4的逻辑拓朴,Vlan 1-4,Vlan 1-4,Vlan 3-4的根网桥,B,A,路由协议,启动路由进程宣告网络,静态路由,RA(config)#ip route 192.168.1.0 255.255.255.0 10.1.1.2RB(config)#ip route 192.168.1.0 255.255.255.0 10.2.2.3RB(config)#ip route 172.16.1.0 255.255.255.0 10.1.1.1RC(config)#ip route 172.16.1.0 255.255.255.0 10.2

40、.2.2,静态路由,RA(config)#ip route 192.168.1.0 255.255.255.0 10.1.1.2RA(config)#ip route 10.2.2.0 255.255.255.0 10.1.1.2RB(config)#ip route 192.168.1.0 255.255.255.0 10.2.2.3RB(config)#ip route 172.16.1.0 255.255.255.0 10.1.1.1RC(config)#ip route 172.16.1.0 255.255.255.0 10.2.2.2RC(config)#ip route 10.1.

41、1.0 255.255.255.0 10.2.2.2,静态路由-负载均衡,RB(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1RB(config)#ip route 172.16.1.0 255.255.255.0 172.16.3.1RC(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1RC(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1RA(config)#ip route 172.16.2.0 255.255.

42、255.0 192.168.2.2RA(config)#ip route 172.16.3.0 255.255.255.0 192.168.3.2RA(config)#ip route 172.16.1.0 255.255.255.0 192.168.2.2RA(config)#ip route 172.16.1.0 255.255.255.0 192.168.3.2RD(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2RD(config)#ip route 192.168.3.0 255.255.255.0 172.16.3.2RD(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2RD(config)#ip route 192.168.1.0 255.255.255.0 172.16.3.2 10,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 经营企划

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报