资源预览内容
第1页 / 共26页
第2页 / 共26页
第3页 / 共26页
第4页 / 共26页
第5页 / 共26页
第6页 / 共26页
第7页 / 共26页
第8页 / 共26页
第9页 / 共26页
第10页 / 共26页
亲,该文档总共26页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
routeenableroute#config terminalroute(confing)#hostname sw1sw1(conf)#interface f0/1sw1(conf-if)#ip address 172.16.230.2 255.255.255.0sw1(conf-if)#duplex fullsw1(conf-if)#no shutdownsw1(conf-if)#endsw1#show ip interface f0/1创建 trunk :sw1(conf)#interface f0/14sw1(conf-if)#switchport mode trunksw1(conf-if)#switchport trunk encapsulation dot1qsw1(conf-if)#switchport trunk allowed vlan 10-20sw1(conf-if)#end划分 vlan 及 vtp 的一些配置:sw1#vlan database sw1(vlan)#vtp domain cciesw1(vlan)#vtp mode server|client| transparentsw1(vlan)#vtp pruningsw1(vlan)#vlan 23 name wangsw1#show vtp status (查看 vtp 状态)sw1(vlan)#exitsw1#conf tsw1(conf)#interface range f0/1 -2sw1(conf-if)#switch mode accesssw1(conf-if)#switch access vlan 23sw1(conf-if)#endsw1#exitsw1#show interface trunk (查看中继端口配置)sw1#show vlan-switch brief (查看 vlan)sw1#show running interface f0/5sw1#copy running-config startup-configSTP 生成树协议sw1#spanning-tree vlan 23 root primaryaw1#spanning-tree vlan 20 root secondarysw1#spanning-tree vlan 23 cost 30sw1#show spanning-tree vlan 23 brief (生成树协议)sw1(conf)#spanning-tree vlan 23 proirity 327681(config)#spanning-tree vlan 1 ?forward-time Set the forward delay for the spanning treehello-time Set the hello interval for the spanning treemax-age Set the max age interval for the spanning treepriority Set the bridge priority for the spanning treeroot Configure switch as root一些必配的命令:router(config)#interface loopback0 (建立回环路 0)router(config)#no ip domain-lookup (取消反向地址解析)router(config)#line consol 0router(config-line)#logging synchronous (取消中途打断命令)router(config-line)#exitroute(confing)#hostname sw1RIP:router(config)#router rip router(config-router)#version 1|2router(config-router)#no auto-summary(取消自动汇总)router(config-router)#network 主类网络号静态路由:router(config)#ip route destination(目标网络号) address netmask 下一跳地址或本路由器的出站端口router(config)#ip route 192.168.3.0 255.255.255.0 下一跳地址EIGRP :router(config)#router eigrp 100 (自治系统好)router(config-router)#network 接口 ip 地址 通配符掩码router(config-if)#ip summary-address eigrp 100 汇总 ip 地址 子网掩码router(config-if)#ip authentication mode eigrp 100 md5router(config-if) #ip authentication key-chain eigrp 100 wangrouter(config)#key chain wangrouter(config-key-chain)#key 1router(config-key-chain)#key-string 123router#show ip routerrouter#show ip eigrp neighbors(查看接口邻居信息)router#show ip eigrp topology (查看拓扑表)router#show ip protocols (查看当前运行的路由协议)router#show ip eigrp traffic 查看 eigrp 路由协议的交流量(接收和发送的路由更新量)OSPF :router(config)#router ospf 12 (进程号)router(config-router)#network 直连网络号 反掩码 area (区域号)router(config-router)#area 1 virtual-link 对方的 router-id 双方都设置router(config-router)#area 1 stub | nssa no-summaryrouter(config-router)#area 1 nssa defualt-information-originaterouter(config-router)#router-id 172.16.10.1router(config-router)# area 51 range 192.168.168.0 255.255.255.0 路由汇总1:向骨干区域宣告汇总的区域路由;2:没有使用的子网地址,不会传播到骨干区域(相当于一条 null0 语句)router#clear ip ospf processrouter(config)#interface e0/0router(config-if)#ip ospf messeage-digest-key 1 md5 wangrouter(config-if)#ip ospf authentication message-digestrouter(config-if)#ip ospf 12 area 0router(config-if)#ip ospf network point-to-point | broadcast | point-to-multipoint 在 ospf network type 为 non-broadcast 时配置router#show ip ospf interface (查看区域号和与此相关的信息)router#show ip ospf neighbors(查看接口邻居信息)router#show ip ospf database (查看拓扑表)router#show ip protocols (查看当前运行的路由协议)访问列表 ACLr1(config)#access-list 123 permit ? An IP protocol numberahp Authentication Header Protocoleigrp Ciscos EIGRP routing protocolesp Encapsulation Security Payloadgre Ciscos GRE tunnelingicmp Internet Control Message Protocoligmp Internet Gateway Message Protocolip Any Internet Protocolipinip IP in IP tunnelingnos KA9Q NOS compatible IP over IP tunneling ospf OSPF routing protocolpcp Payload Compression Protocolpim Protocol Independent Multicasttcp Transmission Control Protocoludp User Datagram Protocolrouter(config)#access-list 1-99 permit|deny 源地址 通配符掩码router(config)#access-list 100-199 permit|deny ip (tcp/udp) source address 通配符掩码 端口号 destination address 通配符掩码 eq 端口号r2(config)#ip access-list extended wangr2(config-ext-nacl)#permit eigrp any anyr2(config-ext-nacl)#permit tcp any host 3.3.3.3 eq 23 reflect aaar2(config-ext-nacl)#permit icmp host 1.1.1.1 host 3.3.3.3 reflect bbbr2(config-ext-nacl)#deny ip any anyr2(config-ext-nacl)#exitr2(config)#ip access-list extended inwangr2(config-ext-nacl)#permit eigrp any any 允许 eigrp 协议r2(config-ext-nacl)#evaluate aaa 反射 aclr2(config-ext-nacl)#evaluate bbbr2(config-ext-nacl)#deny ip any anyr2(config-ext-nacl)#exitr2(config)#int e0/1r2(config-if)#ip access-group wang outr2(config-if)#ip access-group inwang inrouter(config)#interface e0/0router(config-if)#ip access-group 1 in|outroute#show access-lists line vty 0 4login localtransport
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号