CISCO交换机和路由器基本配置

合集下载

Cisco和H3C路由器交换机基本配置

Cisco和H3C路由器交换机基本配置

H3C路由器和交换机的基本配置交换机:1.基本配置:(1)视图:<H3C> 用户视图[H3C] 系统视图[H3C-ui-vty0-4] 用户界面视图[H3C-ethernet1/0/1] 以太网视图(2)<H3C>reset saved-configuration 初始化<H3C>reboot 重启<H3C>system-view 进入系统视图[H3C]sysname H3C 设置主机名[H3C]super password (level 1/2/3) simple/cipher password 配置特权口令[H3C]save (safely) 保存设置配置管理IP[H3C]interface vlan 1[H3C-Vlan-interface1]ip address 192.168.1.2 255.255.255.0]undo ip add配置端口[H3C]interface e1/0/2[H3C-ethernet1/0/2]duplex auto/full/half]flow-control 开启以太网端口Ethernet0/0的流量控制。

]undo flow-control 关闭以太网端口流量控制]speed 10/100/auto]display interface ethernet0/0配置网关[H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1配置Aux口令[H3C]user-interface aux 0 7[H3C-ui-aux0-7]authentication-mode password]set authentication password simple/cipher wnt]user privilege level 0/1/2/3配置Console口令[H3C]user-interface 0[H3C-ui0]authentication-mode password]set authentication password simple/cipher wnt]user privilege level 0/1/2/3配置vty口令[H3C]user-interface vty 0 4[H3C-ui-vty0-4]authentication-mode password]set authentication password simple/cipher wnt]user privilege level 0/1/2/3查看的命令[H3C]display history-command[H3C]display version[H3C]display current-configuration[H3C]display saved-configuration[H3C]display interface[H3C]display ip interface[H3C]display interface ethernet(0/0)[H3C]display ip host 显示域名解析表2.telnet(1)基于vty[H3C]ip host hostname ip-address 静态域名解析]display ip host[H3C]interface vlan 1[H3C-Vlan-interface1]ip address 192.168.1.2 255.255.255.0]quit[H3C]user-interface vty 0 4[H3C-ui-vty0-4]authentication-mode password (none/password/scheme) ]set authentication password simple/cipher wnt]user privilege level 0/1/2/3]quit<H3C>(按Ctrl+]键,断开telnet)>(按Ctrl+K键,断开telnet)[H3C]display users all]display users 显示连接本地的telnet会话]display tcp status 显示当前建立的所有TCP链接情况(2)基于用户Switch[H3C]interface vlan 1[H3C-Vlan-interface1]ip address 192.168.1.2 255.255.255.0]quit[H3C]local-user bob[H3C-luser-bob]password simple/cipher wnt]service-type telnet level 0/1/2/3]quit[H3C]super password simple/cipher wnt[H3C]user-interface vty 0 4[H3C-ui-vty0-4]authentication-mode scheme]quit[H3C]domain system[H3C-isp-system]authentication default local<H3C>telnet IP3.vlan(1)可用命令[H3C](undo) vlan 3[H3C-Vlan3]name wnt]description gongsi](undo)port ethernet1/0/2 to ethernet1/0/5 把e1/0/2、3、4、5加入vlan 3]port ethernet1/0/6 ethernet1/0/10 把e1/0/6和e1/0/10加入vlan 3]port ethernet1/0/12]save (safely)]undo name/description]return/quit[H3C]display brief interface ethernet 查看端口属于哪个Vlan[H3C]display brief interface vlan-interface 查看有几个Vlan[H3C]display ip interface brief 查看Vlan信息[H3C]display ip interface vlan-interface 3 查看已配置IP的Vlan信息 [H3C]display ip interface 查看配置IP的Vlan[H3C]display vlan all[H3C]display interface vlan-interface[H3C]interface vlan 0001[H3C-Vlan-interface1]ip address 192.168.1.2 255.255.255.0]undo ip add]return/quit[H3C]interface e1/0/5[H3C-ethernet1/0/5]port access vlan 2(2)单个交换机+Vlan间路由[H3C]vlan 2[H3C-vlan2]name caiwu]port e1/0/3 to e1/0/6]quit[H3C]vlan 3[H3C-vlan3]name kaifa]port e1/0/8 to e1/0/10]quit[H3C]interface vlan 2[H3C-vlan-interface2]ip add 192.168.1.1 255.255.255.0]quit[H3C]interface vlan 3[H3C-vlan-interface3]ip add 192.168.2.1 255.255.255.0]quit(3)Vlan间路由SwitchA[H3C]vlan 2[H3C-vlan2]name caiwu]port e1/0/2 to e1/0/3]quit[H3C]vlan 3[H3C-vlan3]name kaifa]port e1/0/4 to e1/0/5]quit[H3C]interface e1/0/1[H3C-ethernete1/0/1]port link-type trunk]port trunk permit vlan all[H3C]display vlan allRouterA[H3C]interface e0/0[H3C-ethernet0/0]undo ip address[H3C]interface e0/0.2[H3C-ethernet0/0.2]vlan-type dot1q vid 2]ip address 192.168.1.1 255.255.255.0 ]interface e0/0.3e0/0.3]vlan-type dot1q vid 3]ip address 192.168.2.1 255.255.255.0 HostA :192.168.1.2 GW:192.168.1.1HostB :192.168.2.2 GW:192.168.2.1HostA:ping 192.168.2.2路由器:1.基本配置:(1)视图:<H3C> 用户视图[H3C] 系统视图[H3C-ui-vty0-4] 用户界面视图[H3C-ethernet1/0/1] 以太网视图[H3C-serial1/0/0.1] 子接口视图[H3C-ospf] ospf协议视图[H3C-rip] rip协议视图[H3C-serial1/0/0] [H3C-serial1/0/0:1] 同/异步串口视图[H3C-async1/0/0] 异步视图(2)修改系统时间<H3C>clock datatime 11:20:30 2009/11/16[H3C]display clock<H3C>reset saved-configuration 初始化<H3C>reboot 重启<H3C>system-view[H3C]sysname H3C 设置主机名[H3C]super password (level 1/2/3) simple/copher password 配置特权口令[H3C]save (safely) 保存设置配置端口[H3C]interface e0/0[H3C-ethernet0/0]ip address 192.168.1.1 255.255.255.0]duplex auto/full/half]flow-control 开启以太网端口Ethernet0/0的流量控制。

思科交换机与路由器的基础配置

思科交换机与路由器的基础配置

今天主要是说思科路由器的一些设备配置思科IOS什么叫IOS,其实他相当于微软件操作系统,不过他是运行在思科路由器与交换机上面的一个系统IOS的一些基本功能:运载网络协议和功能对产生高速流量的设备进行连接增加网络安全性提供网络的可扩展性来简易网络的增长和冗佘问题可靠的连接网络资源一般可以通过三种方法进行IOS路由器的CONSOLE口,用于本地的也就是说用PC上面的COM口接到路由器上面的控制口还有就是通过MODEM连接aux口,用于远程,还有就是VTY线路来telnet一般我们用得最多的就是通过控制台,还有就是telnet那么一台路由器从开机要经过那些过程呢,其实跟一台PC差不多,首先加电以后,硬件自检,再是定位并载IOS文件最后一步是定位并运行配置文件最后一步完成,那么这个设备就算完成了可以正常工作了开机自检不需要说了吧那么重点在引导上面这个在考试中也会考到的如果加电自检没有问题,那么IOS存在的话,将从它的闪存(flash memory)查找与加载IOS 到ram中(以前的2500系列的不加载到RAM中的,直接从flash运行)flash是一种电子可擦除只读存储器,如果加载IOS也是成功的,那么他会在非容失性(NVRAM)中查找启动配置文件,startup-config 如果没有找到任何的启动配置文件,那么路由器将进入到setup模式中。

setup模式一看名字就知道,是一种安装模式这种模式可以对路由器进行一些配置但是一般最好不要用这种配置模式,一般在进入这种模式之前会有提示出现command-line interface你输入yes就是进入这种配置模式,如果输入no,那么你就进入了用户模式在setup模式中,[]代表默认设置,你可以使用ctrl+C随时退出setup模式[路由器的所有模式如下:用户模式,特权模式,(也可叫特机模式)全局配置模式,(也可叫配置模式)端口配置模式,(也可叫接口模式)子接口配置模式,线路配置模式,路由配置模式](用户模式)我们重点是进入路由器以后,就是一种用户模式如果你不进入setup模式就是进入了用户模式Router>这是用户模式的提示符,。

CISCO交换机路由器配置手册

CISCO交换机路由器配置手册

CISCO交换机路由器配置手册王国栋编著……………… 目录………………交换机1、cisco 2950 交换机2、cisco 1950 交换机3、VLAN 间的通信路由器一、路由器配置1、路由器基本配置2、路由器的密码恢复3、恢复出厂设置4、备份IOS5、恢复IOS6、备份路由器配置7、静态路由的配置8、RIP路由协义配置9、IGRP路由协议配置10、EIGRP路由协议配置11、ospf路由协议基本配置12、点到点链路上的ospf13、广播链路上的ospf14、基于区域的ospf简单口今及MD5认证15、多区域的OSPF16、OSPF末节区域和完全末节区域17、OSPF命令汇总二、ACL NAT DHCP1、标准访问控制列表(Access Control Iists ) (list 列表)2、扩展访问控制列表(Access Control Iists ) (list 列表)3、命名ACL4、NAT(network address translation)网络地址翻译(1)、静态NAT配置(2)、动态NAT(3)、PAT(端口地址转换)配置5、DHCP (dynamic host configuration protocol) 动态主机配置协议三、远程接入、VPN1、HDLC (高级数据链路控制high-level data link control)2、路由器serial端口的基本配置3、PPP(1)、PPP的PAP认证(2)、PPP的CHAP认证4、帖中继(1)、帧中继基本配置(2)、点对多点帧中继(3)、|点对点帧中继上的RIP协议5、DDN(Digital Data Network 数字数据网)和数字链路6、ISDN7、ADSL Asymmetrical digital subscriber loop 非对称数字用户环路8、VPN 虚专用网络(Virtual Private Networks)交换机部分一、交换机配置图:二、环境说明:S2950-1 S2950-2 为12端口快速以太网交换机三、配置实例:1、cisco 2950 交换机//switch>enable//进入特权模式//switch #configure terminal//进入全局配置模式//switch (config)#hostname s2950-1//给交换机命名为S2950-1enable password 123456//设置密码ip address 192.168.0.1 255.255.255.0ip default-gateway 192.168.0.254ip domain-name //设置IP 、网关和域名ip name-server 200.0.0.1//设置域名服务器interface fastethernet 0/1//进入端口配置模式//s2950-1 (config-if)#speed auto//将接口速率设置成自适应(默认)//speed 100 10 auto//将接口速率设置成10/100自适应duplex full//将接口设置成全双功(默认)//duplex full falf autoend//s2950-1#copy running-config startup-config//保存配置文件valn database//从特权模式进入VLAN配置子模式//s2950-1 (vlan)#vtp server//VTP就是VLAN中继协议//设置交换机为VTP服务模式//vtp server client transparentvtp domain name-vtp-server//设置管理域的域名为name-vtp-server//创建管理域并命名end//s2950-1#configure terminal//s2950-1 (config)#interface fastethernet 0/1//s2950-1 (config-if)#switchport mode trunk//将端口fastethernet0/1设置为主干端口end//s2950-1#vlan database//s2950-1 (vlan)#//进入VLAN 配置模式valn 2 name namevlan-2//创建VLAN 2 并命名为namevlan-2//交换机默认所有未配置VLNA的交换机均为VLAN 1 //所以这里从VLAN 2 开始设置valn 3 name namevlan-3//创建VLAN 3并命名为namevlan-3valn 4 name namevlan-4valn 5 name namevlan-5exit//s2950-1#configure terminal//s2950-1 (config)#interface fastethernet 0/2//s2950-1 (config-if)#switchport mode access//设置当前端口为静态VLAN模式switchport access vlan 2//把当前端口分配给V ALN 2exit//s2950-1 (config)#interface fastethernet 0/3//s2950-1 (config-if)#switchport mode accessswitchport access vlan 3exit//s2950-1 (config)#interface fastethernet 0/4//s2950-1 (config-if)#switchport mode accessswitchport access vlan 4exit//s2950-1 (config)#interface fastethernet 0/5//s2950-1 (config-if)#switchport mode accessswitchport access vlan 5end//s2950-1#copy running-config startup-config//writeshow running-config//show vtp status//show vlan//show interface//show interface brief//show version2、cisco 1950 交换机//switch>enable//switch #configure terminal//switch (config)#hostname s2950-1enable password 123456username text1 password text2ip address 192.168.0.1 255.255.255.0ip default-gateway 192.168.0.254ip domain-name ip name-server 200.0.0.1interface fastethernet 0/1//s1950-1 (config-if)#speed auto//speed 100 10 autoduplex full//duplex full falf autoend//s1950-1#copy running-config startup-config//s1950-1#configure terminal//s1950-1 (config)#vtp server//在配置模式下设置交换机为VTP服务器//vtp server client transparent//也可以根据需要将交换机设置为VTP客户模式,或透明模式vtp domain name-vtpserver//创建VTP管理域并设置域名为name-vtpserverend//S1950VTP这块配置内容和s2950不一样//s1950-1#configure terminal//s1950-1 (config)#interface fastethernet 0/1//s1950-1 (config-if)#trunk on//设置VLAN主干端口//trunk on|off|desirable|autoEnd//trunk 的内容和S2950不一样//s1950-1#vlan database//s1950-1 (vlan)#valn 2 name namevlan-2//创建VLAN 2 并命名为namevlan-2//交换机默认所有未配置VLNA的交换机均为VLAN 1 ,//所以这里从VLAN 2 开始设置valn 3 name namevlan-3valn 4 name namevlan-4valn 5 name namevlan-5exit//s1950-1#configure terminal//s1950-1 (config)#interface fastethernet 0/2//s1950-1 (config-if)#vlan-membership static namevlan-2//划分VLAN端口//将本端口设置为namevlan-4的成员//S1950这块配置内容和s2950不一样exit//s1950-1 (config)#interface fastethernet 0/3//s1950-1 (config-if)#vlan-membership static namevlan-3exit//s1950-1 (config)#interface fastethernet 0/4//s1950-1 (config-if)#vlan-membership static namevlan-4exit//s1950-1 (config)#interface fastethernet 0/5//s1950-1 (config-if)#vlan-membership static namevlan-5end//s1950-1#copy running-config startup-configshow running-config//show vtp status//show vlan//show interface//show ip interface brief//显示所有接口的简短信息//show version3、VLAN间的通信(1)、利用三层交换机实现VLAN间的通信拓朴图:配置实例:S2950#vlan databaseS2950(vlan)#vlan 2 name namevlan-2S2950(vlan)#vlan 3 name namevlan-3S2950(vlan)#exitS2950#configure terminalS2950(config)#interface fastethernet 0/5S2950(config-if)#switchport mode accessS2950(config-if)#switchport access vlan 2S2950(config-if)#exitS2950(config)#interface fastethernet 0/6S2950(config-if)#switchport mode accessS2950(config-if)#switchport access vlan3S2950(config-if)#exitS2950(config)#ip routing//打开三层交换机的路由功能S2950(config)#interface vlan 2//将VLAN当成一个接口进行配置S2950(config-if)#no shutdownS2950(config-if)#ip address 192.168.0.1 255.255.255.0 S2950(config-if)#exitS2950(config)#interface vlan 3S2950(config-if)#no shutdownS2950(config-if)#ip address 192.168.1.1 255.255.255.0S2950(config-if)#endS2950#show ip router//由于是在同一三层交换机上,用show ip router 可以看到自动生存的路由表(2)、利用路由器实现VLAN间的通信配置拓朴图:配置实例:S2950#vlan databaseS2950(vlan)#vlan 2S2950(vlan)#vlan 3S2950(vlan)#exitS2950#configure terminalS2950(config)#interface fastehernet 0/1S2950(config-if)#switchport mode accessS2950(config-if)#switchport access vlan 2S2950(config-if)#exitS2950(config)#interface fastethernet 0/6S2950(config-if)#switchport mode accessS2950(config-if)#switchport access vlan 3S2950(config-if)#exitS2950(config)#(end)RouterA(config)#interface ethernet 0RouterA(config-if)#no shutdownRouterA(config-if)#ip address 192.168.0.1 255.255.255.0 RouterA(config-if)#exitRouterA(config)#interface ethernet 1RouterA(config-if)#no shutdownRouterA(config-if)#ip address 192.168.1.1 255.255.255.0 RouterA(config-if)#endRouterA#show ip route//可以看到由路器自动生成的两条路由表路由器部分一、路由器配置1、路由器基本配置(1)路由器基本的配置拓扑图:(2)、环境说明:Cisco 1605路由器(3)、配置实例://Router>enable//Router#configure terminal//Router(config)#enable password text1//enable secret texe2hostname R1no ip domain lookup//不用DNS 解析主机IPinterface fastethernet 0/1//R1605-1(config-if)#ip address 192.168.0.2 255.255.255.0no shutdownexit//R1605-1 (config)#interface fastethernet 0/2//R1605-1 (config-if)#ip address 192.168.0.2 255.255.255.0no shutdownexit//R1605-1 (config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2//配置默认路由//no ip route 0.0.0.0 0.0.0.0 192.168.1.2ip routing//起动路由功能//R1605-1(config)#line vty 0 4//VTY是路由器给远程登陆准备的虚拟端口//0 4表示可以同时打开5个会话//line vty 0 4是进入VTY端口(也就是同时充许5个会话登陆),对VTY端口//进行配置//R1605-1(config-line)#password 123456//设置telnet登陆时使用的密码//no password 这样就不能从telnet登陆了.(当你no password 取消掉了密码,//telnet会拒绝连接,这样就关闭了telnet)//要想明确禁止从telnet登陆最好使用ACL关闭23端口login//要求输入密码方能从telnet远程登陆,//no login 不使用密码就可以从telnet登陆end//R1605-1#write//copy running-config startup-config ,保存配置end//R1605-1#Show running-config//show version//show interface//show ip interface brief//显示所有接口的简短信息//show ip route//traceroute ip 192.168.3.1//show ip arp//show ip rip database//show runing-configexit2、路由器的密码恢复(1)、密码恢复的基本原理对CISCO的网络设备进行密码恢复的主要武器是配置注册码。

思科交换机基本配置手册

思科交换机基本配置手册
switch(enable) set spantree portvlanpri {module/port}priority [vlans]
17. 在基于IOS的交换机上修改STP时钟:
switch(config)# spanning-tree [vlan vlan-list] hello-time seconds
switch(vlan)# exit
switch# configure teriminal
switch(config)# interface interface module/number
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan vlan-num
switch(vlan)# vtp domain domain-name
在基于CLI的交换机上配置VTP管理域:
switch(enable) set vtp [domain domain-name]
11.在基于IOS的交换机上配置VTP 模式:
switch# vlan database
22. 用show vtp domain 显示管理域的VTP参数.
23. 用show vtp statistics显示管理域的VTP参数.
24. 在Catalyst交换机上定义TrBRF的命令如下:
switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]
4.在基于IOS的交换机上启用和浏览CDP信息:

CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述CISCO交换机是一种常用的网络设备,用于构建局域网(Local Area Network,LAN)。

它可以通过物理线路的连接,将多台计算机或其他网络设备连接到同一个网络中,实现数据的传输和共享。

CISCO交换机的基本配置包括IP地址的配置、VLAN的配置、端口配置、安全性配置等。

接下来,我们将对这些配置进行详细说明。

首先,IP地址的配置是CISCO交换机的基本操作之一。

通过配置IP地址,我们可以对交换机进行管理和监控。

具体的配置步骤如下:1. 进入交换机的配置模式。

在命令行界面输入"enable"命令,进入特权模式。

2. 进入全局配置模式。

在特权模式下输入"configure terminal"命令,进入全局配置模式。

3. 配置交换机的IP地址。

在全局配置模式下输入"interfacevlan 1"命令,进入虚拟局域网1的接口配置模式。

然后输入"ip address 192.168.1.1 255.255.255.0"命令,配置交换机的IP地址和子网掩码。

4. 保存配置并退出。

在接口配置模式下输入"exit"命令,返回到全局配置模式。

然后输入"exit"命令,返回到特权模式。

最后输入"copy running-config startup-config"命令,保存配置到闪存中。

其次,VLAN的配置是CISCO交换机的关键配置之一。

通过配置VLAN,我们可以将交换机的端口划分为不同的虚拟局域网,实现数据的隔离和安全。

1. 进入交换机的配置模式。

同样,在特权模式下输入"configure terminal"命令,进入全局配置模式。

2. 创建VLAN。

在全局配置模式下输入"vlan 10"命令,创建一个编号为10的VLAN。

思科交换机路由基本配置命令

思科交换机路由基本配置命令

思科交换机路由基本配置命令常用命令1.配置接口:interface {interface_type} {interface_number}2.配置IP地址:ip address {IP_address} {subnet_mask}3.配置默认网关:ip default-gateway {default_gateway_IP}4.开启接口:no shutdown5.配置路由协议:router {routing_protocol}6.配置路由器ID:router-id {router_ID}7.配置路由信息:network {network_address} {subnet_mask}8.配置静态路由:ip route {destination_network} {subnet_mask}{next-hop_IP}9.配置动态路由:router {routing_protocol} {network_address}10.保存配置:copy running-config startup-config注意:上述命令仅作为参考,具体配置应根据实际环境和设备型号进行调整。

下面是一些基本的 Cisco 交换机路由配置命令:1.配置 hostname: hostname <name>2.配置 IP 地址: interface <interface> 后进入接口模式,再输入 ipaddress <ip address> <subnet mask>3.配置默认路由: ip route 0.0.0.0 0.0.0.0 <next hop IP>4.启用路由协议: router <protocol> (例如: router rip)5.配置路由连接: network <network address> (例如: network192.168.1.0)6.查看路由表: show ip routeCisco 交换机路由配置步骤1.进入配置模式:configure terminal2.配置 IP 地址和子网掩码:interface [interface-name] ; ip address[ip-address] [subnet-mask]3.配置默认路由:ip route 0.0.0.0 0.0.0.0 [next-hop-IP-address]4.启用路由协议:router [protocol-name] (如:router ospf)5.配置路由协议参数: [protocol-name] [process-id] (如:ospf 1)6.配置路由连接:network [network-address] [wildcard-mask] area[area-id] (如:network 192.168.1.0 0.0.0.255 area 0)7.保存配置:copy running-config startup-config8.退出配置模式:exit。

思科路由器、交换机的基本管理教程

思科路由器、交换机的基本管理教程

思科路由器、交换机的基本管理教程随着Internet的高速发展,网络规模不断膨胀,对于从事网络专业的学生熟练掌握路由器和交换机的配置已显得十分重要。

接下来是小编为大家收集的思科路由器、交换机的基本管理教程方法,希望能帮到大家。

思科路由器、交换机的基本管理教程的方法管理路由器和交换机的方法以及命令主要分为一下几个方面:1、了解命令行的模式。

2、配置接口的IP地址以及相关的路由条目。

3、路由器、交换机密码的管理。

4、远程管理路由器、交换机。

5、系统IOS的备份与恢复。

一、了解命令行的模式1)用户模式默认进入的是用户模式,在该模式下用户受到极大的限制,只能用来查看一些统计信息。

route> #路由器的用户模式switch> #交换机的用户模式2)特权模式在用户模式输入“enable”(可简写为“en”)命令就可以进入特权模式,在特权模式下可以查看并修改路由器或交换机的配置。

route>enable #也可以输入en进入特权模式route#switch>enswitch#在特权模式下常用的命令解释如下:show version :查看系统IOS版本show running-config :查看当前的配置信息copy running-config startup-config :保存当前的配置或者使用 writeerase startup-config :删除以保存的配置show startup-config :查看保存好的配置show mac-address-table :查看交换机的mac地址表show int 接口名称:查看接口的信息show arp :查看ARP缓存表show ip route :查看路由表信息show ip int brief :查看所有接口的IP地址信息。

no ip domain-lookup :禁用DNS查询line con 0exec-timeout 0 0 :不超时连接logging synchronous :不启用时间同步,信息不打断输入命令3)全局模式在特权模式下输入“config terminal”(可简写为conf t)命令就可以进入全局模式,用户在该模式下可以修改路由器或交换机的全局配置。

cisco路由器三层交换机简单环境配置实例

cisco路由器三层交换机简单环境配置实例

cisco路由器三层交换机简单环境配置实例随着Internet的高速发展,网络规模不断膨胀,对于从事网络专业的学生熟练掌握路由器和交换机的配置已显得十分重要。

接下来是小编为大家收集的cisco路由器三层交换机简单环境配置实例方法,希望能帮到大家。

cisco路由器三层交换机简单环境配置实例:一、网络拓扑图:二、配置命令:1、路由器的配置:interface FastEthernet0/0ip address 10.66.88.222 255.255.255.0ip nat outsideduplex autospeed autointerface FastEthernet0/1ip address 192.168.1.1 255.255.255.0ip nat insideduplex autospeed autointerface Vlan1no ip addressshutdownip nat inside source list 1 interface FastEthernet0/0 overload ip classlessip route 192.168.2.0 255.255.255.0 192.168.1.222ip route 192.168.3.0 255.255.255.0 192.168.1.222access-list 1 permit 192.168.0.0 0.0.255.255三、三层交换机的配置:hostname L3-SWip dhcp pool vlan2poolnetwork 192.168.3.0 255.255.255.0 default-router 192.168.3.1dns-server 202.101.172.35ip dhcp pool vlan1poolnetwork 192.168.2.0 255.255.255.0 default-router 192.168.2.1dns-server 202.101.172.35interface FastEthernet0/1no switchportip address 192.168.1.222 255.255.255.0 duplex autospeed autointerface FastEthernet0/2 switchport mode trunkinterface FastEthernet0/5 switchport mode trunkinterface Vlan1ip address 192.168.2.1 255.255.255.0 interface Vlan2ip address 192.168.3.1 255.255.255.0 ip classlessip route 0.0.0.0 0.0.0.0 192.168.1.1四、二层交换机的配置:1、switch0的配置:hostname sw0interface FastEthernet0/1 switchport mode trunkinterface FastEthernet0/2 switchport mode access2、switch1的配置:hostname sw1interface FastEthernet0/1switchport mode trunkinterface FastEthernet0/2switchport access vlan 2switchport mode access看了“cisco路由器三层交换机简单环境配置实例”还想看:1.思科交换机基本配置实例讲解2.三层交换机配置的实例教程3.cisco路由器怎么在虚拟环境下配置三层交换4.cisco2960交换机的简单配置5.交换机配置基础及实例讲解6.思科三层交换机与路由器的比较方法7.思科交换机配置教程详解。

Cisco基本网络配置

Cisco基本网络配置

19
防火墙asa基本设置
asa特点: • (1)从高安全级别接口到低安全级别接口的流量叫outside 流量,这 种流量默认是允许的 • (2)从低安全级别接口到高安全级别接口的流量叫inbound流量,这 种流量默认是不允许的,但我们可以使用ACL来放行inbound流量 • (3)相同安全级别的接口之间的流量默认是不允许的,但是可以用 命令打开 • (4) 安全级别的范围为0-100 • (5)默认inside安全级别为100,其余接口默认为0
进入vlan 1 设置IP地址 设置默认网关
6、交换机如何划分vlan switch#vlan database switch(vlan)#vlan 2 switch(vlan)#no vlan 2 或者 switch(config)#interface vlanX
进入VLAN设置 新建VLAN 2 删除VLAN 2 X表示vlan数
一、cisco的三种设备类型
• 1、cisco 路由器 • 2、cisco switch (思科交换机) • 3、cisco asa5510(思科防火墙)
1
1、路由器设备型号
• • • • • •
871 1800 2600 2800 3600 7200
2
2、交换机设备型号
• • • • • • • • 2950 2960 2970 3550 3560 4506 4510 6050
13
Cisco 基本网络设置
17、cisco路由器查看命令 Who 查看telnet 登陆用户 Show running-configure 查看配置信息 Show running-configure interface fx/x 查看接口详细配置 Show ip route 查看路由表 Show interface fastethernet x/x 查看快速以太网接口 Show ip interface brief 查看接口链路层状态 Show arp 查看ARP地址表 Show version 查看路由器版本信息 Show user 查看登陆用户 Show processes cpu 查看cpu使用进程 Show log 查看日志

Cisco路由器、交换机基本配置方法

Cisco路由器、交换机基本配置方法

常用命令—et hostname|IP address
网络侦测
ping hostname|IP address
路由跟踪
trace hostname|IP address
常用命令—基本设置命令
任务 全局设置 设置访问用户及密码 设置特权密码 命令 config terminal username username password password enable secret password
设置队列表中队列的大小
queue-list list-number queue queuenumber byte-count byte-count-number
ip access-group list {in | out}
使用指定的访问表
ACL——访问控制举例
Router1: access-list 1 deny 192.1.3.0 0.0.0.255 access-list 1 permit any interface serial 0 ip access-group 1 in
指定内部和外部 端口
ip nat {inside | outside}
网络地址翻译配置举例
设置如下: ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192 interface Ethernet 0 ip address 10.0.0.1 255.255.255.0 ip nat inside ! interface Serial 0 ip address 202.200.10.5 255.255.255.252 ip nat outside ! ip route 0.0.0.0 0.0.0.0 Serial 0 access-list 2 permit 10.0.0.0 0.0.0.255 ! Dynamic NAT ! ip nat inside source list 2 pool c2501 overload line console 0 exec-timeout 0 0 ! line vty 0 4 end

思科交换机的基本配置

思科交换机的基本配置

思科交换机的基本配置思科交换机的基本配置H3C每年将销售额的15%以上用于研发投入,在中国的北京、杭州和深圳设有研发机构,在北京和杭州设有可靠性试验室以及产品鉴定测试中心。

下面店铺整理一些思科交换机的基本配置,希望大家认真阅读!CISCO交换机基本配置:Console端口连接用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname csico ;设置交换机的主机名switch(config)#enable secret csico1 ;设置特权加密口令switch(config)#enable password csico8 ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;虚拟终端允许登录switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6switch#exit ;返回命令交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config)#speed ? 查看speed命令的子命令switch(config)#speed 100 设置该端口速率为100mb/s (10/auto)switch(config)#duplex ? 查看duplex的子命令switch(config)#duplex full 设置该端口为全双工(auto/half)switch(config)#description TO_PC1 这是该端口描述为TO_PC1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain vtpserver ;设置vtp域名相同switch(config)#vtp password ;设置发vtp密码switch(config)#vtp server ;设置vtp服务器模式switch(config)#vtp client ;设置vtp客户机模式交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关switch(config)#ip domain-name 设置域名switch(config)#ip name-server 192.168.1.18 设置域名服务器switch(config)#mac-address-table? 查看mac-address-table 的子命令switch(config)#mac-address-table aging-time 100 设置超时时间为100msswitch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7 switch(config)#endswitch#show mac-address-table 查看整个MAC地址表switch#clear mac-address-table restricted static 清除限制性静态地址交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息switch#show int f0/0 status;查看指定端口状态switch#dir flash: ;查看闪存Cisco路由器配置命令大全网络2010-06-26 06:43:44 阅读657 评论0 字号:大中小订阅 .(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"config t"全局配置模式----接口模式,使用命令"interface+接口类型+接口号"全局配置模式----线控模式,使用命令"line+接口类型+接口号"注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAM write 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息 + # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configure terminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。

交换机和路由器的基本配置命令

交换机和路由器的基本配置命令

使用的是cisco网络设备操作系统命令,其他厂商设备应该相差不远,实验使用的设备时cisco catalyst1912交换机和cisco 2621路由器。

终端的IP配置命令:Ipconfig /ip IP地址子网掩码;Ipconfig /dg 网关IP常用的交换机的配置命令:交换机工作在OSI 模型的第二层(数据链路层), 地址学习, 转发过滤, 消除循环是交换机的三个主要功能。

有三种模式,“>”用户模式,“#”特权模式,“(CONFIG)#”全局模式.从用户模式进入特权模式:enable从特权模式进入全局模式:configure terminal,在特权模式下输入disable或者exit 回到用户模式,其他模式类似。

从全局模式进入端口模式:interface e0/1。

switch: ;ROM状态,路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态用户模式(>)下:可以查看一些基本的配置信息。

特权模式(#)下:show ip 查看交换机的IP地址。

Show interface 查看所有端口的配置信息show interfaces Ethernet 0/1 查看E0/1口的信息Show interface e0/1 查看e0/1端口的配置信息。

show version 查看系统硬件的配置,软件版本号等。

show port ;(CatOS)显示每个端口的简要信息(号、VLAN、双工、…)show interface ;(IOS)show trunk ;(CatOS)显示中继信息(模式、封装、允许端口、剪裁、…)show interface trunk ;(IOS)show spantree 45 ;(CatOS)显示端口的STP模式、类型、状态、速端口、…) show spanning-tree 45 ;(IOS)Show running-config (show running也可以)查看当前正在运行的配置信息全局模式//配置模式((config)#):设置交换机名:hostname[交换机名]如:hostname switch1设置交换机的IP地址:ip address [ip address ][netmask]如ip address 172.16.0.1 255.255.0.0设置交换机的缺省网关:ip default-gatway [ip address]如:ip default-gatway 172.16.0.1设置密码enable password level [1-15] [passwork]1-15 表示级别,1表示设置登录时的密码,15设置进入全局模式的密码。

配置Cisco交换机启动及基本设置

配置Cisco交换机启动及基本设置

•配置Cisco交换机启动及基本设置本实验是对Cisco Catalyst 1900系列交换机的启动和基本设置的操作。

本实验是对Cisco Catalyst 1900系列交换机的启动和基本设置的操作。

1.实验目的通过本实验,读者可以掌握以下技能熟悉交换机的开机界面;对交换机进行基本的设置;理解交换机的端口及其编号。

2.设备需求本实验需要以下设备:Cisco Catalyst 1900系列交换机1台,型号不限,企业版软件,本实验中使用了1912交换机;PC机1台,操作系统为Windows系列。

装有超级终端程序;Console电缆1条及相应的接口转换器。

3.线缆连接及配置说明如图3.1所示,PC机通过串口与交换机的Console端口相连。

和路由器一样,Cisco交换机的Console端口的缺省设置如下端口速率:9600bit/s数据位:8奇偶校验:无停止位:1流控:无把PC机超级终端程序中串行端口的属性设置成与上述参数一致后,便可以开始实验。

4.实验配置及监测结果在PC机启动正常,PC机与交换机使用Console电缆连接起来,并且已经进入超级终端程序的情况下。

接通交换机电源。

由于交换机没有电源开关,接通电源即直接插上电源插头。

监测清单3.1记录了Catalyst 1912交换机启动的全过程。

监测清单3-1 Catalyst 1912交换机启动及基本配置第1段:交换机的启动Catalyst 1900 Management ConsoleCopyright (c) Cisco Systems, Inc. 1993-1999All rights reserved.Emter[rose Edotopm SoftwareEthernet Address: 00-04-DD-4E-9C-80PCA Number: 73-3122-04PCA Serial Number: FAB0503D0B4Model Number: WS-C1912-ENSystem Serial Number: FAB0503W0FAPower Supply S/N PHI044207FRPCB Serial Number: FAB0503D0B4,73-3122-041 user(s)now active on Management Console.User Interface Menu[M] Menus[K] Command Line[1] IP Configuration[P] Console PasswordEnter Selection:第2段:进行交换机基本配置Enter Selection: KCLI session with the switch is open.To end the CLI session, enter [Exit].>?Exec commands:enable Turn on privileged commandsexit Exit from the EXEChelp Description of the interactive help systemping Send echo messagessession Tunnel to moduleshow Show running system informationterminal Set terminal line parameters>enable##conftEnter configuration commands, one per line. End with CNTL/Z (config)#?Configure commands:address-violation Set address violation actionback-pressure Enable back pressurebanner Define a login bannerbridge-group Configure port grouping using bridge groupscdp Global CDP configuration subcommandscgroup Enable CGMPcluster Cluster configuration commandsecc Enable enhanced congestion controlenable Modift enable password parametersend Exit from configure modeexit Exit from configure modehelp Description of the interactive help systemhostname Set the system's network nameinterface Select an interface to configureip Global IP configureation subcommandsline Configure a terminal linelogin Configure options for logging inmac-address-table Configure the mac address tablemonitor-port Set port monitoring--More--mlilticast-store-and-forward Enables multicast store and forward network-port Set the network portno Negate a cominand or set its defaultsport-channel Configure Fast EtherChannelrip Routing information protocol configurationservice Configuration Commandsump-server Modify SNMP parametersspantree Spanning subsystemspantree-template Set bridge template parameterstorm-control Configure broadcast storm contfolpirameters switching-mode Set the switching modetacacs-server Modify TACACS query parameterstftp Configure TFTPuplink-fast Enable Uplink fastvlan VLAN configurationvlan-membership VLAN membership server configurationvtp Global VTP configuration commands(config)#SiostBiame SW1912SW1912(config)#enabSe password ?level Set exec level passwordSW1912(config)#enable password level 1 pass1SW1912(config)#enabSe password level 15 passl5SW1912(config)#enable secret CiscoSW1912#disableSW1912>SW1912>enEnter password: ***** ( 键入cisco )SW1912#conf tEnter configuration commands, one per line. End with CNTL/Z SW1912(config)#ip address 192.168.1.1255.255.255.0SW1912(config)#ip default-gateway 192.168.1.254SW1912(config)#ip domain-name ?WORD Domain nameSW1912(config)#ip domain-name SW1912(config)#ip name-server 200.1.1.1SW1912(config)#endSW1912#sh versionCisco Catalyst 1900/2820 Enterprise Edition Software Version V9.00,05 written from 192.168.000.005Copyright (c) Cisco Systems, Inc. 1993-1999SW1912 uptime is 0day(s)00hour(s)12minute(s)44secibd(s)cisco Catalyst 1900(486sxl)processor with 2048K/1024K bytes of memory Hardware board revision is 5Upgrade Status: No upgrade currently in progress.Config File Status: No configuration upload/download is in progress 15 Fixed Ethernet/IEEE802.3interface(s)Base Ethernet Address: 00-04-DD-4E-9C-80SW1912#show ipIP Address:192.168.1.1Subnet Mask:255.255.255.0Default Gateway:192.168.1.254Management VLANl: 1Domain name:Name server1:200.1.1.1HTTP server:EnabledHTTP port: 80RIP:EnabledSW1912#show running-configBuilding configuration...Current configuration:!tftp accepttftp server "192.168.0.5"tftp filename "catl900EN.9.00.05.bin"!hostname "SW1912"!ip address 192.168.1.1255.255.255.0ip default-gateway 192.168.1.254ip domain-name ""ip name-server 200.1.1.1!enable secret 5 $l$FMFQ$mlNHW7EzaJpG9uhKPWBvf/enable password level 1 "PASS 1"enable password level 15 "PASS 15"!interface Ethernet 0/1!interface Ethernet 0/2!interface Ethernet 0/3!interface Ethernet 0/4!interface Ethernet 0/5!interface Ethernet 0/6!interface Ethernet 0/7!interface Ethernet 0/8!interface Ethernet 0/9interface Ethernet 0/10!interface Ethernet 0/11!interface Ethernet 0/12!interface Ethernet 0/25!interface FastEthernet 0/26!interface FastEthernet 0/27!line consoleendSW1912#show int e0/lEthernet 0/1 is Suspended-no-linkbeat802.1 dSTP State: Forwarding Forward Transitions:1Port monitoring: DisabledUnknown unicast flooding: EnabledUnregistered multicast flooding: EnabledDescription:Duplex setting: Half duplexBack pressure: DisabledReceive Statistics Transmit StatisticsTotal good frames 0 Total frames 0Total octets 0 Total octets 0Broadcast/multicast frames 0 Broadcast/multicast frames 0Broadcast/multicast octets 0 Broadcast/multicast octets 0Good frames forwarded 0 Deferrals 0Frames filtered 0 Single collisions 0Runt frames 0 Multiple collisions 0No buffer discards 0 Excessive collisions 0Queue full discards 0Errors: Errors:第3段:重新启动交换机查看配置保持情况SW1912#reloadThis command resets the switch. All configured system parameters and static addresses will be retained. All dynamic addresses well be removed. Reset system, [Y]es or [N]o? YesCatalyst 1900 Management ConsoleCopyright (c) Cisco Systems, Inc. 1993-1999All rights reserved.Enterprise Edition SoftwareEthernet Address: 00-04-DD-4E-9C-80PCA Number: 73-3122-04PCA Serial Number: FAB0503D0B4Model Number: WS-C 1912-ASystem Serial Number: FAB0503W0FAPower Supply S/N: PH1044207FRPCB Serial Number: FAB0503DOB4,73-3122-04----------------------1 user(s) now active on Management Console.User Interface Menu[M]Menus[K]Command LineEnter Selection: KEnter password: *****CLI session with the switch is open.To end the CLI session, enter [Exit].SW1912>enableEnter password: ***** (键入cisco )SW1912#show running-config…(与第2段中配置清单相同,此处省略)(1)第1段是1912交换机加电后出现的显示内容,依次列出了版权信息、软件版本信息(企业版)、以太网地址(00.04,DD-4E-9C.80)以及各种序列号。

CISCO路由器交换机配置

CISCO路由器交换机配置

1.CDP协议:a)要允许在Cisco IOS 10.3 或者以后版本上运行.b)汇总信息包括: 1). 设备标识2). 地址表3).端口标识4). 性能表5). 平台.c)定义: 思科发现协议(CDP:Cisco Discovery Protocol)思科发现协议CDP 基本上是用来获取相邻设备的协议地址以及发现这些设备的平台。

CDP 也可为路由器的使用提供相关接口信息。

CDP 是一种独立媒体协议,运行在所有思科本身制造的设备上,包括路由器、网桥、接入服务器和交换机。

需要注意的是,CDP是工作在Layer 2 的协议,默认情况下,每60秒以01-00-0c-cc-cc-cc 为目的地址发送一次组播通告,当达到180秒的holdtime上限后仍未获得邻居设备的通告时,将清除邻居设备信息。

d)百度百科: /view/51078.html?wtp=tte)命令:1)Show cdp neighbors 看看邻居2)Show cdp entry * 查看邻居的详细信息3)Show cdp interface 查看在每个接口上CDP的运行情况4)全局配置模式: no cdp run 关闭CDP运行5)接口配置模式: int fa2/0 no cdp enable 关闭接口的cdp6)接口配置模式: int fa2/0 cdp enable 打开接口的cdp7)Show cdp 查看CDP的状态输出8)Cdp timer 90 发包间隔9)Cdp holdtime 240 保存时间10)Show cdp traffic 查看cdp 历史发包记录.2.IOS管理a)架设tftp服务器b)检查FLASH是否有足够的空间来装载镜像c)Copy tftp flash / copy flash tftpd)Show flash 查看镜像e)Copy running-config tftp 备份tftp服务器f)Copy tftp running-config3.口令恢复a)Cisco 2500/3000/7000 系列,在路由器加电60S内按下break 键,进入维护模式b)输入o/r ox2142 是路由器从闪存中启动,此时不会加载starup配置c)O/r ox2141 使路由器从rom启动,此时不会加载starup配置d)输入I 重新启动路由器e)正常启动后更正Miami,更改寄存器的f)可以通过show version 来查看配置寄存器的值, 最下面有显示.g)全局配置模式下config-register 0x2102 修改寄存器的值为正常启动h)如果为cisco 1003/1600/2600/3600/4500/7100/7200/7500 在加电60秒内,按下breake,进入只读存储区的监视模式i)输入confreg 0x2142j)Reload 重启路由器.4.配置静态路由和默认路由a)静态路由是单向的,通过用于一个末梢网络的出口b)Show ip route 查看路由c)Ip route 203.0.0.0 255.255.255.0 202.0.0.2(下一跳的设备的接口地址)d)Ip route 201.00.0 255.255.255.0 s1/5 →和上面的是双向的e)命令格式: router(config)# ip route network [mask] {address | interface} [distance][permanent] →permanent表示即使接口被关闭,路由也不能被取消.f)默认路由加法: ip route 0.0.0.0 0.0.0.0 s1/2 在show ip route 中用s*标识5.浮动静态路由a)Ip route 30.0.0.0 255.0.0.0 10.0.0.2 130 → 130标识管理距离, 范围0-255 ,0为直连,1 为静态路由. 标识越小,优先选择.6.配置dhcp服务a)Conf tb)Service dhcpc)Ip dhcp pool addrpool 进入dhcp地址池配置.d)Network 201.0.0.0 255.255.255.0e)Dns-server 222.222.222.222 指定dns 服务器f)Default-router 201.0.0.1g)全局配置模式ip dhcp excluded-address 201.0.0.1 201.0.0.3 →过滤掉01到03 地址h)No service dhcpi)No ip dhcp pool addrpoolj)跨网段分配IP,Dhcp中继配法:k)Ip dhcp pool test2l)Network 203.0.0.0 255.255.255.0m)Default-router 203.0.0.1n)Dns-server 211.211.211.211o)ip dhcp excluded-address 203.0.0.1 203.0.0.3p)在客户路由器上ip helper-address 205.0.0.2 默认支持8种udp服务的转发.7.无编号ip地址的配置,用于2个接口共享ip,借用者使用被借者的ip作为自己的源Ip,vpn会使用到:a)接口配置模式: ip unnumbered type numberb)原则: 借用者的接口必须是串行接口,并且是被一条点到点链路连接着,2)在该广播域网链路两端”借给”他们ip地址的局域网接口地址应属于同一个主类地址,并有相同长度的子网掩码.或者在改广域网链路两端的局域网接口地址属于没有被划分子网的不同主类网络.8.路由选择协议:a)可/被路由协议: 利用网络层完成通信的协议,允许数据包从一个主机依靠以寻址方案转发到另一主机:例如: IP,IPX,AppleTalk.b)路由选择协议: 本质是创建和维护路由表,可路由协议利用他实现路由功能.例如:RIP,IGRP,EIGRP,OSPF,BGP,IS-IS等.c)动态路由协议分类: 1. 按算法:距离矢量RIP,IGRP,egp,2 . 链路状态: OSPF,IS-IS 3. 混合算法: EIGP. 2. 按是否发送子网掩码: 1)有类,不需要发送子网掩码按ABC类地址例如: RIP1,IGRP , 无类,支持子网划分.:RIP2,EGRP,等d)按适应的网络规模分为: IGP, EGPe)自治系统: 使用相同的路由准则的网络的集合. IGP在一个自治系统内运行,EGP连接2个自治系统.f)反应路由选择协议的参数: 1. 收敛时间 2. 管理距离,一个路由协议所计算的路由协议的条目和准确度9.RIP协议。

网络工程实践教程-基于Cisco路由器与交换机课程设计

网络工程实践教程-基于Cisco路由器与交换机课程设计

网络工程实践教程-基于Cisco路由器与交换机课程设计1. 课程背景网络工程实践教程-基于Cisco路由器与交换机课程设计,是一门网络工程实践课程,旨在培养学生对计算机网络的实践操作能力。

本课程主要基于Cisco路由器与交换机,主要内容包含CISCO路由器与交换机的配置及调试实现、网络协议、网络安全、网络故障等方面的知识。

2. 课程目标本课程旨在通过实践操作,培养学生对计算机网络中常见问题的分析与解决能力,掌握计算机网络配置与维护技能,深入了解网络协议的实现原理,提高系统管理与维护能力。

学生通过本门课程的学习,可以逐步掌握网络工程实践的全过程,培养”动手实践”的意识,增强实践经验,提高实践技能。

3. 课程设置•实验1:CISCO路由器与交换机的基础配置•实验2:网络协议的实现原理•实验3:网络安全技术的实现•实验4:网络故障的排除与解决4. 实验要求实验1:CISCO路由器与交换机的基础配置实验内容•使用Telnet协议连接路由器•路由器基本参数的设置•VLAN的配置•IP地址的配置实验要求•学会路由器的基本配置方法,并能够从实践中观察到路由器的工作状态。

•学习VLAN的概念和配置方法,能够在实际网络环境中应用。

•学会IP地址的配置方法,并能够实现网络的正常通信。

实验2:网络协议的实现原理实验内容•ARP协议的实现过程•ICMP协议的实现过程实验要求•学习ARP协议的基础知识,了解其实现过程,能够在实践中观察到ARP协议的工作过程。

•学习ICMP协议的基础知识,了解其实现过程,能够在实践中观察到ICMP协议的工作过程。

实验3:网络安全技术的实现实验内容•记录网络攻击历史•Telnet远程管理的安全配置•SSH安全接入的配置•ACL规则的配置实验要求•学习如何保障网络的安全,了解对网络进行攻击的方式,能够记录并分析网络攻击历史。

•学习Telnet、SSH等远程管理工具的安全配置方法,了解ACL规则的作用,能够在实践中完成相关配置。

思科交换机基本配置命令

思科交换机基本配置命令

思科交换机基本配置命令目录1、基本概念介绍 (2)2、密码、登陆等基本配置 (2)3、CISCO设备端口配置详解 (4)4、VLAN的规划及配置 (6)4.1核心交换机的相关配置 (6)4.2接入交换机的相关配置 (8)5、配置交换机的路由功能 (9)6、配置交换机的DHCP功能 (9)7、常用排错命令 (10)1、基本概念介绍IOS: 互联网操作系统,交换机和路由器常用操作系统VLAN: 虚拟lanVTP: VLAN TRUNK PROTOCOLDHCP: 动态主机配置协议ACL:访问控制列表三层交换机:具有三层路由转发能力的交换机2、密码、登陆等基本配置本节介绍cisco路由器或者交换机的基本配置,本教程用的是cisco的模拟器做的介绍,一些具体的端口显示可能与实际的设备不符,但并不影响基本配置命令的执行。

Router># 显示稳定后,出现最初的提示符,提示符“>”表示目前所处的状态为用户模式。

Router>Router>en# 如果在当前状态下没有重复的命令,可以用“TAB”键来补齐命令Router>enable# 从用户模式(user mode)进入到特权模式(exec mode),提示符变为“#”Router#configure terminal#在特权模式下输入configure terminal进入全局配置模式(global configuration mode),在这之下输入的命令叫做全局命令,一旦输入,将对整个router产生即时影响。

*Mar 1 00:44:26.491: %SYS-5-CONFIG_I: Configured from console by console t # 在输入命令的过程中,IOS会出现一些即时提示。

Enter configuration commands, one per line. End with CNTL/Z.Router(config)#exit # 退出当前模式Router(config)#hostname test# 更改当前设备的名字,主要是为了便于区分设备。

思科交换机基本配置(非常详细)

思科交换机基本配置(非常详细)

cisco交换机基本配置1.Cisco IOS简介Cisco Catalyst系列交换机所使用的操作系统是IOS(Internetwork Operating System,互联网际操作系统)或COS (Catalyst Operating System),其中以IOS使用最为广泛,该操作系统和路由器所使用的操作系统都基于相同的内核和shell。

IOS的优点在于命令体系比较易用。

利用操作系统所提供的命令,可实现对交换机的配置和管理。

Cisco IOS操作系统具有以下特点:(1)支持通过命令行(Command-Line Interface,简称CLI)或Web界面,来对交换机进行配置和管理。

(2)支持通过交换机的控制端口(Console)或Telnet会话来登录连接访问交换机。

(3)提供有用户模式(user level)和特权模式(privileged level)两种命令执行级别,并提供有全局配置、接口配置、子接口配置和vlan数据库配置等多种级别的配置模式,以允许用户对交换机的资源进行配置。

(4)在用户模式,仅能运行少数的命令,允许查看当前配置信息,但不能对交换机进行配置。

特权模式允许运行提供的所有命令。

(5)IOS命令不区分大小写。

(6)在不引起混淆的情况下,支持命令简写。

比如enable通常可简约表达为en。

(7)可随时使用?来获得命令行帮助,支持命令行编辑功能,并可将执行过的命令保存下来,供进行历史命令查询。

1.搭建交换机配置环境在对交换机进行配置之前,首先应登录连接到交换机,这可通过交换机的控制端口(Console)连接或通过Telnet登录来实现。

(1)通过Console口连接交换机对于首次配置交换机,必须采用该方式。

对交换机设置管理IP地址后,就可采用Telnet登录方式来配置交换机。

对于可管理的交换机一般都提供有一个名为Console的控制台端口(或称配置口),该端口采用RJ-45接口,是一个符合EIA/TIA-232异步串行规范的配置口,通过该控制端口,可实现对交换机的本地配置。

cisco三层交换机重置及与路由器连接方法

cisco三层交换机重置及与路由器连接方法

Cisco三层交换机重置及与路由器连接方法一、重置交换机1.启用超级终端并出现连接界面;2.拔掉交换机的电源;3.按下交换机上的Mode按钮,与此同时,重新插上交换机的电源线;4.观察sys指示灯由闪烁到常亮,其他部分指示灯红色闪过;(提前松开Mode按钮会直接进入正常启动,要重置必须跳回步骤2 。

)5.松开Mode按钮。

之后系统将显示一些指示信息:The system has been interrupted prior to initializing the flash file system. The followingcommands will initialize the flash file system, and finish loading the operating systemsoftware:flash_init /---初始化flash文件系统---/load_helper /---加载帮助文件---/boot /---启动设备进入正常的模式---/步骤:switch:Switch:flash_initSwitch:dir flash: /---查看Flash的文件名字可以用来确认文件名为config.text---/Switch:rename flash:config.text flash:config.text.old /---把配置文件重命名,当然你可以不改为config.text.old,只要文件名和原来的不相同就可以---/ Switch:boot /---手动启动交换机---/由于配置文件改过了,所以交换机找不到默认的config.text而出现配置的对话向导,选择n然后回车(这里特别注意,如果直接回车原来的配置都丢失了。

),然后我们就会绕过原来的password而进入到:Switch>Switch>en /--可以进入特权模式--/Switch#rename flash:config.text.old flash:config.text /---恢复交换机配置文件---/Switch#copy flash:config.text system:running-config /---保存配置到DRAM里---/Switch#config tSwitch(config)#no enable password /---干掉特权模式旧密码---/ Switch(config)#no enable secret /---干掉加秘密码---/Switch(config)#exitSwitch#copy run start /---把当前配置的文件写回Flash---/用这个方法修改密码不会把原来的配置文件内容清掉。

cisco35603层交换机和路由器连接,交换机如何配置

cisco35603层交换机和路由器连接,交换机如何配置

如图。

pcO 属于 vian2 , pci 属于 vlan3 , pcO ip 192.168.0.10 /24 192.168.0.254 pci ip 1 0.139.168.10 /21 10.139.168.254 。

所有交换机的管理 vian 是 vian4 192.168.1.X/2 4。

要求pc0、pc1可以tel net 到交换机,和路由器 R1,交换机之间可以互 ping 通,pc0和pc1可以ping 通pc3。

pc0、pc1、可以互ping 通。

3层交换机和路由器 R1如何配 置,主要是3层交换机如何配置,我已经在交换机的端口配置好了ip 。

路由器之间的ip 1 0.1.1.0/24也已经配置好。

麻烦高后帮忙配置一下3层交换机和路由器。

谢谢。

分享到:2012-11-21 18:00 提问者采纳 这种配置我郁闷!我直接打命令看看能不能解决。

同时覆盖你一些配置吧!三层交换机3560en ablecon figure termi nalin terface range fastether netO/1 -2switchport trunk en capsulati on dot1qswitchport mode trunkexit这个时候,三层交换机接下面的二层交换机都为中继链路了(trunk ),同时需 要配置vtp,让各个交换机的vlan 信息同步,如下配置:三层交换:en able L®SeO/0/0 eO/O/O 2sn fFaO/O r 192. 169.100.254/24 10.139. LT2. 13/24 PC-PT PC 3 aO/24 10 139 172.17/24 192.168,100. 1/24 PC-PT PCO 2960-24TT 192-168.1.251 192.166^1.254 PC-PT PUL :C-PTPC 2con figure termi nalvtp domai n net vtp mode server两个二层交换机都要配:en ablecon figure termi nalvtp domai n netvtp mode clie nt然后在三层交换上配置vlanen ablevla n databasevla n 2vla n 3vla n 4exitcon figure termi nalin terface vla n 2ip address 192.168.0.254 255.255.255.0 exitin terface vla n 3ip address 10.139.168.254 255.255.248.0 exitin terface vla n 4ip address 192.168.1.254 255.255.255.0然后在第一个二层交换机上将PC划分相应的vlan当中en ablecon figure termi nalin terface fastethernet0/1switchport mode access switchport access vla n 2 in terface fastethernet0/2 switchport mode access switchport access vla n 3这样内网通信基本没问题了。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

一CISCO交换机和路由器基本配置交换机的配置1用户模式switch >2进入特权模式switch > enable3 进入全局配置模式,全局模式的配置对整个交换机生效. switch # config terminalswitch (config)#4进入接口模式,配置只对当前的接口生效switch(config) # interface f0/1switch(config-if) #进入line 模式,这个模式主要用来对控制台做相应的配置5 switch(config) # line console 0switch(config-line)6配置主机名switch(config) #hostname 主机名7配置使能口令switch(config) # enable password 密码8 配置加密使能口令switch(config) # enable secret 密码9配置ip地址switch(config) # interface vlan 1switch(config) # ip add ip地址子网掩码switch(config) # no shutdown10配置交换机的网关switch(config) # ip default-gateway ip地址11 保存配置switch # copy runing-config startup-configswitch # write12清空配置switch # erase startup-config13 清空接口配置switch (config) # interface f0/1switch (config-if) # default interface f0/114清空交换机密码(1) 关闭电源.(2) 开启电源, 并且按住交换机的mode键,当交换机进入................................ ................................flash_initload_helperbootswitch:(3) 在switch 后执行 flash_init命令switch: flash-init(4) 在查看flash中的文件switch: dir flash:/(5) 把config.text文件后缀名改了就可以,并且重新启动.(交换机重启后不会在读取配置文件了)switch:rename flash:config.text config.oldswitch:boot(6) 启动后进入特权模式查看flash里面的文件,并且把config.text文件改回来.并且把flash里面的文件复制到内存中switch # rename flash:config.old flash:config.textswitch # copy startup-config running-config15创建vlan 2switch (config) # vlan 216删除vlan 2switch (config) # no vlan 217 把端口 f0/5到10 添加到vlan 2switch (config) # interface range f0/5 - 10switch (config) # switchport access vlan 218将f0/1设置成中 trunkswitch (config) # interface f0/1switch (config) # switchport mode trunk19将f0/1 设置成期望型或自动型switch (config) # switchport dynamic desirable / auto20如果不需要trunk 传送vlan 2的数据,可以将vlan 2 从trunk中删除.switch (config) # interface f*/* (trunk接口)switch (cofnig-if) # switchprot trunk allowed vlan remove vlan 221也可以添加vlan 2switch (config) # interface f*/* (trunk接口)switch (config) # switchprot trunk allowed vlan add vlan 2二交换机的查看命令switch # show mac-address-table 查看本机的mac地址表switch # show cdp neighbors 列出与本设备相连的cisco设备switch # show running-config 查看交换机的配置switch # show vlan brief 查看vlan的详细信息switch # show Internet trunk 可以查看生成树协议三路由器配置命令1 配置默认路由route (config) # ip route 0.0.0.0 0.0.0.0 下一跳2 配置静态路由route (config) # ip route 目的ip 子网掩码下一跳3 对所有密码进行加密route (config) # enable password-encryption4 如果要使enable密码也以加密的形式保存在running-config中,中需运行route (config) # service password-encryption5 接口route (config-if) # speed 10/100/auto (配置速率)route (config-if) # duplex auto/full/half (工作模式,自动/半双工/全双工)route (config-if) # description 文本 (接口模式为当前接口列出希望跟踪的信息文本)6 对接口进行标识route (config) # interface f0/1route (config) # description 内容7 配置超时route (route) # line console 0route (route_line) #exec-timeout 0 0 (第一个0代表分钟,第二个0代表秒)8 配置telnetroute (route) # line vty 05 (配置同时登陆的个数)route (route) # password 密码 (配置telnet密码)route (route) # login9 配置sshroute (route) # line vty 05route (route-line) # transport ipput telnet ssh (同时接受telnet和ssh登陆)route (route) # username 用户名 password 密码 (配置用户名和密码)route (route) # ip domain-name 域名 (配置一个dns域名)route (route) # crypto key generate RSA (配置交换机生成一对匹配的公钥和私钥,以及一个共享的加密密钥)route # show crypto key mypubkey rsa (查看ssh密钥的副本)route # show running-config | begin line vty (查看当前运行的配置,从包含第一个line bty开始)10显示同步route (config) # line ocnsole 0route (config_line) # logging synchronous11 配置禁用dnsroute (config) # no ip domain-lookup12 路由器的密码恢复(1) 重新启动路由器,在启动的60 s内按下ctrl + break 使路由器进入rom monitor模式(2) 在提示符下输入命令修改配置寄存器的值,然后程序启动rommon 1>confreg 0x2142rommon 2>resetroute >enableroute #copy startup-config running-config (然后修改密码在保存)route #config-register 0x2102 (上系统在启动时读取配置文件)route # write13 路由器和交换机的单臂路由route (config) # interface 接口类型槽位/接口序号.子接口route (config-subif) # ip add ip地址子网掩码route (config-subif) # encapsolation dot1q vlan-id14 rip路由协议的配置rip v2的配置route (config) # route riproute (config-route) # version 2route (config-route) # no uato -summaryroute (config-route) # network 主网络宣告主网络号四路由器查看命令route # show interface 接口查看接口的状态route # show ip int b 查看接口起用状态route # show ip route 查看路由表route # show version 查看路由器的版本信息route # show clock 查看路由器当前的时间route # show ip protocol 查看路由协议配置route # show protocols 显示配置的协议route # show debug ip rip 开启调试命令route # Trace ip地址跟踪ip 路由五备份los和上传losroute # copy startup-config tftp 备份losroute # copy tftp startup-config 上传losroute # copy running-config tftp 备份配置文件route # copy tftp running-config 下载配置文件六组合键ctrl + shift + 6 中止解析ctrl + z 取消上一次操作七 vtp协议1 vtp 协议慨述vtp 是vlan.中继协议,vtp协议是cisco的专用协议,做作用如下:(1) 保持vlan配置的一致性(2) 提供从一个交换机在正规管理域增加虚拟局域网的方法2 vtp的工作原理要使用vtp,就必须为每台交换机指定vtp域名一台交换机只能属于一个vtp域,不同域中的交换机不能共享vtp信息.vtp服务器上进行了vlan配置变更后,所做的vtp域内的所有交换机上.vtp消息通过所有的中继连接进行传播.域内的交换机都必须使用相同的vtp域名,不论是同配置实现,还是由交换机自动学到.交换机必须是相邻的,在交换机之间,必须启用中继.3 vtp的运行模式(1) 服务器模式每个域中至少有一个服务器,服务器可以创建,修改,删除vlan信息,向外提供vtp通告.并且会监听学习域名相同的vtp通告.(2) 客户机模式每个域中至少有一个客户机,客户机不可以创建,修改,删除vlan信息.但向外发送vtp请求.并且会监听学习域名相同的vtp通告.(3) 透明模式能转发vtp消息.可以创建和删除本地的vlan信息.4 vtp 的通告来自客户机的通告请求-----服务器以汇总和子集通告作为回应.汇总通告-----在vlan1上,每隔300秒进行一次,每当拓扑发生改变时,也会发出该通告,包含了变化的配置修订号,配置发生改变和超时以后.都会发送汇总通告子集通告-----包含与vlan有关的详细信息5 vtp的配置switch (config) # vtp domain 域名switch (config) # vtp mode server | client | transparentswitch (config) # vtp vtp password 密码switch (config) # vtp pruning vtp修剪switch (config) # vtp version 2 运行版本2switch (config) # shutdown vlan 2 在该交换机上禁用vlan 2switch (config) # switchport trunk encapsulation dotlq | isl | negotiate 定义中继使用类型,假定中继已配置或经过协商的接口子命令.switch (config) # switchport voice vlan 定义来自cisco ip 电话以及用于发生帧的vlan接口子命令6 vtp 查看命令switch # show vtp status 查看vtp配置switch # show vtp password 查看vtp密码switch (config-~~~) # do show ~~~查看交换机或路由器配置八 stp 协议1 stp慨述stp生成树协议. 一方面保证网络的可靠性 ,另一方面还可以防止广播风暴的产生.2 stp工作原理通过发送BPDU选择根网桥,根端口,指定端口.再阻塞剩下的端口,达到stp收敛的效果.BPDU 有两种通告,一种是配置BPDU,用于生成树计算另一种是拓扑变更BPDU用于通告网络拓扑的变化3 stp 配置switch (config) # spanning-tree vlan vlan-id "启用生成树协议"switch (config) # spanning-tree vlan vlan-id root primary | secondary "配置交换机为根网桥"switch (config) # spanning-tree vlan vlan-id priority 优先级 "修改交换机的优先级"switch (config-if) # spanning-tree vlan vlan-id cost 路径成本 "修改端口的路径成本"switch (config-if) # spanning-tree vlan vlan-id port-priority 优先级 "修改端口的优先级"switch (config) # spanning-tree uplinkfast "配置上行链路"switch (config-if) # spanning-tree portfast "配置速端口"switch (config) # spanning-tree mode mst | rapidpvst | pvst "启用pvst+ 和802.1q(pvst)".pvrst和802.1w(rapid-pvst) ,或IEEE802.1s(多生成树)和802.1w(mst)"4以太通道配置switch (config) # Internet range fastethernet 0/1 - 2switch (config-if-range) # channel-group 1 mode on | auto | desirable5交换机查看命令switch # show spanning-treeswitch # show spanning-tree vlan vlan-id 查看特定的vlan 的stp信息switch # show spanning-tree vlan vlan-id root 查看特定的vlan的根信息switch # show spanning-tree events 上交换机提供关于stp拓扑结构变化的信息消息switch # show etherchannel 以太编号 brief | detail | port |port-channel | summary 查看交换机上以太通道的状态信息.九 ppp协议(1)工作过程:链路不可用状态-->链路建立状态-->认证阶段-->网络层协议阶段-->链路终止阶段在以上的建立过程中任何阶段建立失败都会返回到链路不可用状态.(2) pap认证过程由被认证方发起认证请求,发送用户名和口令到主认证方。

相关文档
最新文档