思科三层交换机简单配置说明

合集下载

cisco3750三层交换机配置说明

cisco3750三层交换机配置说明

三层交换机可以通过Telnet方式或超级终端方式连上,第一次使用的三层交换机需要进行配置,具体步骤如下:1)、用Cisco 3750三层交换机自带的一条串行电缆将其Console口与1台维护笔记本的串口(需要知道是Com1还是Com2)相连。

2)在维护笔记本上执行以下操作:“开始→程序→附件→通讯→超级终端”,在“连接描述”对话框的名称一栏中输入“cisco3750”(此名字没有实际意义,可以随便输入),创建一个叫做"cisco3750"的新连接,点击"确定",缺省的使用COM1(根据维护计算机连接的端口选择),在"串口设置"中将波特率改为9600波特,其他参数不变,点击"确定"就可以得到三层交换机的控制台。

3)、设置结束,打开三层交换机电源,就会出现三层交换机的启动信息。

这时就可以像在终端一样对三层交换机进行操作了。

此时不要进行任何操作,以免破坏三层交换机的启动进程,直到三层交换机出现了:“Copyright (c) 1986-2006 by Cisco Systems, Inc.Compiled Fri 28-Jul-06 08:46 by yenanh”回车,提示“Would you like to terminate autoinstall? [yes]:”是否要终止自动安装,输入N,进入配置页面:“--- System Configuration Dialog ---Would you like to enter the initial configuration dialog? [yes/no]:”输入N,选择不需要,提示“Switch>00:14:58: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down”,出现“switch>”就可以输入命令进行配置。

CISCO三层交换机VLAN配置说明

CISCO三层交换机VLAN配置说明

CISCO三层交换机VLAN配置说明CISCO三层交换机VLAN配置说明。

实验目标:(1) 第一步实现划分4个vlan,将相应port置入到vlan号中(2) 第二步实现4个vlan间可以相互ping(3) 第三步实现sales,tech,manage不可以相互通讯,但允许和server通讯实现过程:第一步划分vlan如下:Switch#vlan dataSwitch(vlan)#vlan 10 name salesVLAN 10 added:Name: salesSwitch(vlan)#vlan 20 name techVLAN 20 added:Name: techSwitch(vlan)#vlan 30 name manageVLAN 30 added:Name: manageSwitch(vlan)#vlan 40 name serverVLAN 40 added:Name: serverSwitch(vlan)#Switch(config)#int range fa 0/0 - 3Switch(config-if-range)#switchport access vlan 10 Switch(config-if-range)#exitSwitch(config)#int range fa 0/4 - 6Switch(config-if-range)#switchport access vlan 20 Switch(config-if-range)#exitSwitch(config)#int range fa 0/7 - 8Switch(config-if-range)#switchport access vlan 30 Switch(config-if-range)#exitSwitch(config)#int fa 0/9Switch(config-if)#switSwitch(config-if)#switchport acceSwitch(config-if)#switchport access vlan 40 Switch(config-if)#exit查看Switch#sh vlan-switchVLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/10, Fa0/11, Fa0/12, Fa0/13 Fa0/14, Fa0/1510 sales active Fa0/1, Fa0/2, Fa0/320 tech active Fa0/4, Fa0/5, Fa0/630 manage active Fa0/7, Fa0/840 server active Fa0/91002 fddi-default active第二步实现4个vlan内的服务器互相pingSwitch(config)#int fa 0/0Switch(config-if)#switchport mode trunkRouter(config-if)#exitRouter(config)#int fa 0/0Router(config-if)#no shutRouter(config-if)#no ip addressRouter(config-if)#exitRouter(config)#int fa0/0.1Router(config-subif)#encapsulation dot1Q 10Router(config-subif)#ip addreRouter(config-subif)#ip address 192.168.33.1 255.255.255.0 Router(config-subif)#exitRouter(config)#int fa0/0.2Router(config-subif)#encapsulation dot1Q 20 Router(config-subif)#ip address 192.168.34.1 255.255.255.0 Router(config-subif)#exitRouter(config)#int fa0/0.3Router(config-subif)#encapsulation dot1Q 30 Router(config-subif)#ip address 192.168.35.1 255.255.255.0 Router(config-subif)#exitRouter(config)#int fa0/0.4Router(config-subif)#encapsulation dot1Q 40 Router(config-subif)#ip address 192.168.36.1 255.255.255.0 Router(config-subif)#查看路由器:interface FastEthernet0/0no ip addressduplex autospeed auto!interface FastEthernet0/0.1 encapsulation dot1Q 10ip address 192.168.33.1 255.255.255.0 !interface FastEthernet0/0.2 encapsulation dot1Q 20ip address 192.168.34.1 255.255.255.0 !interface FastEthernet0/0.3 encapsulation dot1Q 30ip address 192.168.35.1 255.255.255.0!interface FastEthernet0/0.4encapsulation dot1Q 40ip address 192.168.36.1 255.255.255.0!测试:VPCS 1 >shNAME IP/CIDR GATEWAY LPORT RPORT PC1 192.168.33.2/24 192.168.33.1 10001 21001PC2 0.0.0.0/0 0.0.0.0 10002 21002PC3 0.0.0.0/0 0.0.0.0 10003 21003PC4 192.168.34.2/24 192.168.34.1 10004 21004PC5 0.0.0.0/0 0.0.0.0 10005 21005PC6 0.0.0.0/0 0.0.0.0 10006 21006PC7 192.168.35.2/24 192.168.35.1 10007 21007PC8 0.0.0.0/0 0.0.0.0 10008 21008PC9 192.168.36.2/24 192.168.36.1 10009 21009 VPCS 1 >ping 192.168.34.2192.168.34.2 icmp_seq=1 timeout192.168.34.2 icmp_seq=2 time=45.000 ms192.168.34.2 icmp_seq=3 time=47.000 ms192.168.34.2 icmp_seq=4 time=43.000 ms192.168.34.2 icmp_seq=5 time=8.000 msVPCS 1 >ping 192.168.35.2192.168.35.2 icmp_seq=1 time=43.000 ms192.168.35.2 icmp_seq=2 time=14.000 ms192.168.35.2 icmp_seq=3 time=8.000 ms192.168.35.2 icmp_seq=4 time=10.000 ms192.168.35.2 icmp_seq=5 time=12.000 msVPCS 1 >ping 192.168.36.2192.168.36.2 icmp_seq=1 timeout192.168.36.2 icmp_seq=2 time=47.000 ms192.168.36.2 icmp_seq=3 time=6.000 ms192.168.36.2 icmp_seq=4 time=10.000 ms192.168.36.2 icmp_seq=5 time=43.000 msOK,这一步也成功了。

思科三层交换机配置实例及命令

思科三层交换机配置实例及命令

思科三层交换机配置实例及命令思科三层交换机配置实例及命令交换机的命名一般是WS开头这个是固定的,再下一个字母有两种一个是C一个是X,C代表固化交换机或者机箱,X代表的是模块。

下面是店铺精心整理的思科三层交换机配置实例及命令,仅供参考,希望能够帮助到大家。

三层交换机是不是经常让你机器不好使,看看下面的三层交换机配置文章,一切问题都能解决。

本文详细介绍实例讲解:全面的三层交换机配置比较全面的三层交换机配置实例,带命令解释哟!三层交换机配置:Enable //进入私有模式Configure terminal //进入全局模式service password-encryption //对密码进行加密hostname Catalyst 3550-12T1 //给三层交换机定义名称enable password 123456. //enable密码Enable secret 654321 //enable的加密密码(应该是乱码而不是654321这样)Ip subnet-zero //允许使用全0子网(默认都是打开的)Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1Service dhcp //提供DHCP服务ip routing //启用三层交换机上的路由模块Exit三层交换机配置:Vtp mode server //定义VTP工作模式为sever模式Vtp domain centervtp //定义VTP域的名称为centervtpVlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan 3 name vlan3Vlan 4 name vlan4Vlan 5 name vlan5Vlan 6 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exit三层交换机配置:interface Port-channel 1 //进入虚拟的以太通道组1switchport trunk encapsulation dot1q //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1 switchport trunk encapsulation dotlq //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过channel-group 1 mode on //把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allchannel-group 1 mode on三层交换机配置:port-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依*源和目的IP的方式)interface gigabitethernet 0/3 //进入模块0上的.吉比特以太口3switchport trunk encapsulation dotlq //给trunk封装为802.1Qswitchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //允许所有vlan信息通过interface gigabitethernet 0/4 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/5 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/6 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchprot trunk allowed vlan all三层交换机配置:interface gigbitethernet 0/7 //进入模块0上的吉比特以太口7 Switchport mode access //定义这个接口的工作模式为访问模式switchport access vlan 9 //定义这个接口可以访问哪个vlan(实际就是分配这个接口到vlan)no shutdownspanning-tree vlan 6-9 cost 1000 //在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 – 10 //进入模块0上的吉比特以太口8,9,10switchport mode access //定义这些接口的工作模式为访问模式switchport access vlan 8 //把这些接口都分配到vlan8中no shutdown三层交换机配置:spanning-tree portfast //在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态) interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11switchport trunk encapsulation dotlq //给这个接口封装为802.1Qswitchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //允许所有vlan信息通过interface gigabitethernet 0/12 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface vlan 1 //进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)ip address 172.16.1.7 255.255.255.0 //配置IP地址和子网掩码no shutdown三层交换机配置:standby 1 ip 172.16.1.9 //开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9standby 1 priority 110 preempt //定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interface vlan 2 //同上ip address 172.16.2.252 255.255.255.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in //在入方向上使用扩展的访问控制列表101interface vlan 3 //同上ip address 172.16.3.252 255.255.255.0 no shutdown三层交换机配置:standby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 //同上ip address 172.16.4.252 255.255.255.0 no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0 no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0 no shutdown三层交换机配置:standby 6 ip 172.16.6.254standby 6 priority 100 preempt interface vlan 7ip address 172.16.7.252 255.255.255.0 no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0no shutdown三层交换机配置:standby 9 ip 172.16.9.254standby 9 priority 100 preemptaccess-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101access-list 101 permit ip any anyInterface vlan 1 //进入vlan1这个逻辑接口Ip helper-address 172.16.8.1 //可以转发广播(helper-address 的作用就是把广播转化为单播,然后发向172.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1interface vlan 4ip helper-address 172.16.8.1interface vlan 5ip helper-address 172.16.8.1interface vlan 6ip helper-address 172.16.8.1interface vlan 7ip helper-address 172.16.8.1interface vlan 9ip helper-address 172.16.8.1router rip//启用路由协议RIPversion 2//使用的是RIPv2,如果没有这句,则是使用RIPv1network 172.16.0.0//宣告直连的网段exit三层交换机配置:ip route 0.0.0.0 0.0.0.0 172.16.9.250//缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line con 0line aux 0line vty 0 15//telnet线路(路由器只有5个,是0-4)password 12345678//login密码loginendcopy running-config startup-config 保存配置。

思科三层交换机基于环形网络的配置方案

思科三层交换机基于环形网络的配置方案

思科三层交换机基于环形网络的配置方案1.网络拓扑设计首先,我们需要设计一个环形网络拓扑结构。

环形网络是指将多台交换机连接成一个环形的结构,每个交换机都与相邻的两个交换机直接相连。

通过该环形拓扑,可以实现冗余路径,提高网络的可靠性和吞吐量。

2.IP地址分配在环形网络中,每个交换机都需要配置一个IP地址,作为其管理接口的地址。

可以使用私有IP地址范围,如192.168.0.0/24、为了方便管理,可以按顺序分配IP地址,如192.168.0.1、192.168.0.2、192.168.0.3等。

3.交换机配置配置思科三层交换机需要使用命令行界面或者图形界面进行操作。

以下是基于环形网络的交换机配置的步骤:3.1连接到交换机使用串口线或网络接口连接计算机和交换机,通过终端软件(如SecureCRT)登录到交换机的命令行界面。

3.2配置交换机基本信息输入以下命令配置交换机的基本信息:```enable // 进入特权模式configure terminal // 进入全局配置模式hostname switch1 // 配置交换机的主机名exit // 退出全局配置模式```3.3配置管理接口输入以下命令配置交换机的管理接口:```interface vlan1 // 进入VLAN1接口配置模式ip address 192.168.0.1 255.255.255.0 // 配置IP地址和子网掩码no shutdown // 开启接口exit // 退出VLAN1接口配置模式```3.4配置交换机皮膜输入以下命令配置交换机皮膜:```interface fastethernet0/1 // 进入具体接口配置模式switchport mode trunk // 配置接口为trunk模式exit // 退出接口配置模式将上述命令复制粘贴并逐个修改交换机接口的号码,以配置其他交换机的皮膜。

3.5配置交换机路由协议输入以下命令配置交换机的路由协议:```enable // 进入特权模式configure terminal // 进入全局配置模式ip routing // 开启IP路由功能exit // 退出全局配置模式```3.6配置交换机路由输入以下命令配置交换机的路由:```interface vlan1 // 进入VLAN1接口配置模式ip address 192.168.0.1 255.255.255.0 // 配置IP地址和子网掩码no shutdown // 开启接口exit // 退出VLAN1接口配置模式将上述命令复制粘贴并逐个修改交换机接口的IP地址和子网掩码,以配置其他交换机的路由。

思科三层交换机基于环形网络的配置方案(初学者的宝典)

思科三层交换机基于环形网络的配置方案(初学者的宝典)

Cisco三层交换机网络配置方案二vlan设置此处的实验划分了3个vlan,一个服务器组,一个子站的主环形通道,一个子站的备环形通道。

如果有多个环形通道,按照文章中的主备环形通道的配置方法增加配置即可。

本片文章是以Cisco 3560编写的,配置3750与3560不一样的地方会在每一部分的开头标出,如果没有标出就是两种交换机的配置方法是一样的。

如果配置的是3750(或者其他型号的可堆叠Cisco交换机),请先参阅4.6。

2.1 进入配置模式2.1.1 进入特权模式Switch>en如图6所示。

图 62.1.2 进入配置模式Switch#configure terminal如图7所示。

hou图7进入配置模式后就可以开始划分vlan了(关于“模式”的解释请查阅4.2)。

2.2 划分vlan2.2.1 配置交换机的名称Switch(config)#hostname switch1如图8所示。

图82.2.2 划分3个vlanswitch1(config)#vlan 10 !全局配置模式下进入vlan模式并创建vlan10 switch1(config-vlan)#name commmaster !把vlan10命名为commmasterswitch1(config-vlan)#vlan 20 !vlan模式下创建vlan20switch1(config-vlan)#name commbak !把vlan20命名为commbakswitch1(config-vlan)#vlan 30 !vlan模式下创建vlan30switch1(config-vlan)# name server !把vlan30命名为serverswitch1naswitch1(config)#如图9所示。

图92.2.3 分配端口3560端口1的名称是g0/1,3750堆叠后交换机1的端口1名称是Gi1/0/1。

交换机端口的名字是什么可在特权模式(即switch1#)下用sh vlan brief查看。

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.思科交换机配置教程详解。

Cisco3560三层交换机VLAN的配置案例

Cisco3560三层交换机VLAN的配置案例
4)、创建访问控制列表(ACL) 3560(config)#access-list 101 deny ip 192.168.7.0 0.0.0.255 192.168.8.0 0.0.0.255 3560(config)#access-list 101 deny ip 192.168.7.0 0.0.0.255 192.168.10.0 0.0.0.255 3560(config)#access-list 101 deny ip 192.168.7.0 0.0.0.255 192.168.11.0 0.0.0.255 3560(config)#access-list 101 permit ip any any
3、网络拓扑图
4、配置三层交换机 本例以思科三层交换机为例,具体配置命令如下所示:
1)、创建5个vlan 3560(config)#vlan 10 3560(config-vlan)#vlan 20 3560(config-vlan)#vlan 30 3560(config-vlan)#vlan 40 3560(config-vlan)#vlan 50 3560(config-vlan)#exit
2、各机房IP地址分配
机房一、二: IP:192.168.7.X/24,网关:192.168.7.254 机房三、四: IP:192.168.8.X/24,网关:192.168.8.254 机房五、六: IP:192.168.10.X/24,网关:192.168.10.254 机房七: IP:192.168.11.X/24,网关:192.168.11.254 服务器: IP:192.168.12.X/24 网关:192.168.12.254
2)、将端口划分到相应的VLAN
3560(config)#int range f0/1-5 3560(config-if-range)#switchport mode access 3560(config-if-range)#switchport access vlan10 3560(config-if-range)#exit 3560(config)#int range f0/6-10 3560(config-if-range)#switchport mode access 3560(config-if-range)#switchport access vlan20 3560(config-if-range)#exit 3560(config)#int range f0/11-15 3560(config-if-range)#switchport mode access 3560(config-if-range)#switchport access vlan30 3560(config-if-range)#exit 3560(config)#int range f0/16-20

思科三层交换机配置总结

思科三层交换机配置总结

思科三层交换机配置总结思科交换机的基本配置命令学习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并命名为vlan3 switch(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 /doc/0113809409.html, 设置域名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 3560 系列简单三层划分 配置

Cisco 3560 系列简单三层划分 配置

Cisco 3560 系列简单三层划分配置三层交换机具备网络层的功能,实现VLAN 相互访问的原理是:利用三层交换机的路由功能,通过识别数据包的IP地址,查找路由表进行选路转发,三层交换机利用直连路由可以实现不同VLAN 之间的相互访问。

三层交换机给接口配置IP 地址。

采用SVI(交换虚拟接口)的方式实现VLAN 间互连。

SVI是指为交换机中的VLAN 创建虚拟接口,并且配置IP地址。

实现目标:PC3能访问PC1和PC2, 但PC1不能和PC2/PC3互通 PC2不能和PC1/PC3互通。

\一、首先我们配置PC上的IP和GateWay:PC1IP: 192.168.1.2Submark: 255.255.255.0Gateway: 192.168.1.1PC2IP: 192.168.2.2Submark: 255.255.255.0Gateway: 192.168.2.1PC3IP: 192.168.1.3Submark: 255.255.255.0Gateway: 192.168.1.1二、其次进行对Cisco2950进行vlan划分:Switch1:Switch>en --进入特权Switch#conf t --全局配置Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2 --创建vlan 2 使用默认vlan名Switch(config-vlan)#exit --退出vlan 2 配置操作Switch(config)#vlan 3 --创建vlan 3Switch(config-vlan)#exit -- 退出vlan 3 配置操作Switch(config)#int fa0/2 --配置交换机2口Switch(config-if)#switch access vlan 2 设置交换机2口为vlan 2 Switch(config-if)#exit --退出2口操作Switch(config)#int fa0/3 --配置3口Switch(config-if)#switch acces vlan 3 --设置交换机3口为 vlan 3 Switch(config-if)#exit --退出3口配置操作。

思科三层交换机配置命令

思科三层交换机配置命令

1. 交换机支持的命令:2. 交换机基本状态:3. switch: ;ROM状态,路由器是rommon>4. hostname> ;用户模式5. hostname# ;特权模式6. hostname(config)# ;全局配置模式7. hostname(config-if)# ;接口状态8. 交换机口令设置:9. switch>enable ;进入特权模式10. switch#config terminal ;进入全局配置模式11. switch(config)#hostname ;设置交换机的主机名12. switch(config)#enable secret xxx ;设置特权加密口令13. switch(config)#enable password xxa ;设置特权非密口令14. switch(config)#line console 0 ;进入控制台口15. switch(config-line)#line vty 0 4 ;进入虚拟终端16. switch(config-line)#login ;允许登录17. switch(config-line)#password xx ;设置登录口令xx18. switch#exit ;返回命令19. 交换机VLAN设置:20. switch#vlan database ;进入VLAN设置21. switch(vlan)#vlan 2 ;建VLAN 222. switch(vlan)#no vlan 2 ;删vlan 223. switch(config)#int f0/1 ;进入端口124. switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 225. switch(config-if)#switchport mode trunk ;设置为干线26. switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan27. switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继28. switch(config)#vtp domain ;设置发vtp域名29. switch(config)#vtp password ;设置发vtp密码30. switch(config)#vtp mode server ;设置发vtp模式31. switch(config)#vtp mode client ;设置发vtp模式32. 交换机设置IP地址:33. switch(config)#interface vlan 1 ;进入vlan 134. switch(config-if)#ip address ;设置IP地址35. switch(config)#ip default-gateway ;设置默认网关36. switch#dir flash: ;查看闪存37. 交换机显示命令:38. switch#write ;保存配置信息39. switch#show vtp ;查看vtp配置信息40. switch#show run ;查看当前配置信息41. switch#show vlan ;查看vlan配置信息42. switch#show interface ;查看端口信息43. switch#show int f0/0 ;查看指定端口信息44. 补充:45. 3层交换机多出的就是路由能力,体现在vlan的互相通信功能和端口的路由能力,下面介绍:46. 开启路由功能:ip routing47. 进入vlan 配置网段网关与路由配置接口相同48. interface vlan 149. ip 192.168.1.1 255.255.255.050. 路由配置与路由器配置相同只是把接口换为VLAN+VLAN号,开启接口路由功能,进入接口配置:no swichport。

思科交换机配置教程

思科交换机配置教程

• 在PC2上 ping 192.168.1.1
给VLAN配置IP
interfacesw VLAN 10 IP addsress 192.168.1.254 255.255.255.0 ex interfacesw VLAN 20 IP addsress 192.168.2.254 255.255.255.0 ex ip routing
给电脑配置IP
杨毅pcpc1pc2pc1ip19216812542552552550pc2ip19216822542552552550首先把交换机与电脑相连把pc1连在switcha的01端口pc2连在switcha的02端口注意
思科交换机配置教程
制作人:杨毅
简单三层交换机配置
配置条件和要求
• • • • • 三层交换机一台(switchA) pc两台pc1, pc2 直通线两根 pc1 ip 192.168.1.254 255.255.255.0 pc2 ip 192.168.2.254 255.255.255.0
第一步
• 首先把交换机与电脑相连 把pc1连 在 switchA的 0/1端口,pc2连在switchA 的0/2端口 • 注意:电脑与交换机相连用直通线
第二步

• 在交换机switchA上面配置~(步骤如下 • • • • • 1、创建VLAN10 20 2、把端口分给VLAN 3、给我VLAN划分IP 4、激活端口 5、完成
• • • • • • PC1 上 IP :192.168.1.1 子网:255.255.255.0 网关:192.168.1.254 PC2 上 IP :192.168.2.1 子网:255.255.255.0 网关:192.168.2.254

思科三层交换机路由功能配置教程

思科三层交换机路由功能配置教程

思科三层交换机路由功能配置教程交换机工作于OSI参考模型的第二层,即数据链路层。

交换机内部的CPU会在每个端口成功连接时,通过将MAC地址和端口对应,形成一张MAC表,在思科三层交换机中,路由功能是很重要的功能,需要做好正确配置,下面一起看看!方法步骤而三层交换机可以在网络层配置路由功能,使不同网段的设备可以通信。

现以思科3550交换机为例配置三层路由功能。

以实现如下拓扑通信。

----------------------------------| 思科3550三层交换机 |---- -------------------- -------50.1.1.1 (23口) 60.1.1.1(24口)|| |||| ||50.1.1.2 60.1.1.2(pc1) (pc2)配置23口:Switch#enableSwitch#configure terminalSwitch(config)#interface fastEthernet 0/23Switch(config)ip addr 50.1.1.1 255.255.255.0Switch(config-if)#no switchportSwitch(config-if)#no shutdownSwitch(config-if)#end类似的配置24口:Switch#enableSwitch#configure terminalSwitch(config)#interface fastEthernet 0/24Switch(config)ip addr 60.1.1.1 255.255.255.0Switch(config-if)#no switchportSwitch(config-if)#no shutdownSwitch(config-if)#end打开交换机路由转发开关:Switch#configure terminalSwitch(config)#ip routingSwitch(config)#ip cef (这个默认是打开的)此时可以查看下23口的状态:Switch#show interfaces fastEthernet 0/23此时在交换机上ping两个口的地址成功:Switch#ping 50.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 50.1.1.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msSwitch#ping 60.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 60.1.1.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 msSwitch#pc1(win7)增加路由:到60.1.1.0/24的数据包通过50.1.1.1转发:route ADD 60.1.1.0 MASK 255.255.255.0 50.1.1.1 METRIC 3 对应的pc2也增加路由:route ADD 50.1.1.0 MASK 255.255.255.0 60.1.1.1 METRIC 3 此时50.1.1.2和60.1.1.2即可通信。

Cisco三层交换机配置命令及解释

Cisco三层交换机配置命令及解释

Cisco三层交换机配置命令及解释1、2、DEBUG命令3、思科交换机⽇志管理查看⽇志:show loggingCisco交换机 SNMP配置——————————————————————————————————————基本配置S> enable 进⼊特权模式S# configure terminal 进⼊全局配置模式S(config)# hostname name 改变交换机名称S(config)# enable password level level_# password 设置⽤户⼝令(level_#=1)或特权⼝令(level_#=15)S(config)# line console 0 进⼊控制台接⼝S(config-line)# password console_password 接上⼀条命令,设置控制台⼝令S(config)# line vty 0 15 进⼊虚拟终端S(config-line)# password telnet_password 接上⼀条命令,设置Telnet⼝令S(config-line)# login 允许Telnet登录S(config)# enable password|secret privilege_password 配置特权⼝令(加密或不加密)S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进⼊接⼝⼦配置模式S(config-if)# [no] shutdown 关闭或启⽤该接⼝(默认启⽤)S(config)# ip address IP_address sunbet_mask 指定IP地址S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认⽹关S# show running-config 查看当前的配置S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM中S> show interface [type slot_#/port_#] 查看所有或指定接⼝的信息S> show ip 显⽰交换机的IP配置(只在1900系列上可⽤)S> show version 查看设备信息S# show ip interface brief 验证IP配置S(config-if)# speed 10|100|auto 设置接⼝速率S(config-if)# duplex auto|full|half 设置接⼝双⼯模式S> show mac-address-table 查看CAM表S# clear mac-address-table 清除CAM表中的动态条⽬1900(config)# mac-address-table permanent MAC_address type [slot_#/]port_# 在CAM表中创建静态条⽬2950(config)# mac-address-table static MAC_address vlan VLAN_# interface type [slot_#/] port_# 在CAM表中创建静态条⽬1900(config)# mac-address-table restricted static MAC_address source_port list_of_allowed_interface 设置静态端⼝安全措施1900(config-if)# port secure 启⽤粘性学习1900(config-if)# port secure max-mac-count value 设置粘性学习特性能够学到的地址数量(默认132,取值范围是1-132)1900(config)# address-violation suspend|ignore|disable 改变安全选项1900> show mac-address-table security 验证端⼝安全措施2950(config)# switchport mode access 定义接⼝为主机端⼝⽽不是中继端⼝2950(config)# switchport port-security 启⽤端⼝安全措施2950(config)# switchport port-security maximum value 指定可与此接⼝相关的设备的最⼤数量2950(config)# switchport port-security violation protect|restrict|shutdown 指定出现安全违规时应该发⽣的事2950(config)# switchport port-security mac-address MAC_address 指定允许与此接⼝相关的确切的MAC地址2950(config)# switchport port-security mac-address sticky 启⽤粘性学习特性2950(config)# show port interface type [slot_#/] port_# 验证接⼝配置2950(config-if) description name 设置接⼝描述信息2950# show buffers 查看系统缓存的⼤⼩1900# copy nvram tftp:// IP_address_of_TFTP_server/ file_name 将配置⽂件备份到TFTP服务器上1900# copy tftp:// IP_address_of_TFTP_server/ file_name nvram 从TFTP服务器上恢复配置到NVRAM1900# delete nvram 删除配置⽂件2950# erase startup-config 删除配置⽂件3550# show tcam qos TCAM_ID statistics 查看TCAM剩余容量4000> enable 进⼊特权模式4000>(enable) set password 设置⽤户模式密码4000>(enable) set enablepass 设置授权密码4000>(enable) set interface sc0 IP_address mask 配置IP地址4000>(enable) set port enable|disable slot_#/port_# 启⽤/禁⽤接⼝4000>(enable) show port [slot_#/port_#] 显⽰接⼝信息4000>(enable) set port name slot_#/port_# name 设置交换机接⼝描述信息4000>(enable) set port speed slot_#/port_# 4|10|16|100|auto 设置交换机接⼝速率4000>(enable) set port duplex slot_#/port_# full|half 设置交换机接⼝双⼯模式4000>(enable) clear config all 删除NVRAM中的配置信息4000>(enable) erase all 删除FLASH中的内容4000>(enable) show flash 显⽰FLASH中的内容4000>(enable) show cam [count] dynamic|static|permanent|system [vlan_#] 显⽰CAM表VLAN 1900(config)# vtp domain VTP_domain_name 定义交换机域名1900(config)# vtp server|client|transparent 定义交换机VTP模式(默认服务器)1900(config)# vtp password VTP_password 配置VTP⼝令1900(config)# vtp pruning enable|disable 启⽤/禁⽤修剪(默认启⽤)1900(config)# vtp trap enable 启⽤SNMP陷阱(默认启⽤)1900# show vtp 验证VTP配置2950# vtp database 访问VLAN和VTP配置(以下均是在IOS12.1前⽤,12.1后全是在全局配置模式下)2950(vlan)# vtp domain VTP_domain_name 定义交换机域名2950(vlan)# vtp server|client|transparent 定义交换机VTP模式(默认服务器)2950(vlan)# vtp password VTP_password 配置VTP⼝令2950(vlan)# vtp pruning 启⽤/禁⽤修剪(默认启⽤)2950(config)# snmp-server enable traps vtp 启⽤SNMP陷阱(默认启⽤)2950# show vtp status 检查VTP配置2950# show vtp counters 显⽰与VTP消息发送与接收相关的VTP统计信息1900(config-if)# trunk on|off|desirable|auto 指定中继类型1900# show trunk A|B 验证接⼝中继(A是fa0/26,B是fa0/27)2950(config-if)# switchport mode trunk|dynamic desirable|dynamic auto|nonegotiate 指定中继类型(默认⾃动协商)2950(config-if)# switchport trunk native|allowed|pruning vlan VLAN_# 配置中继2950(config-if)# switchport trunk pruning vlan remove VLAN_# 清除不希望消减的VLAN2950# show interfaces [type 0/port_#] switchport|trunk 验证接⼝中继1900(config)# vlan VLAN_# [name VLAN_name] 创建VLAN1900(config-if)# vlan-membership static VLAN_# 将该接⼝静态地分配给⼀个VLAN1900# show vlan 验证VLAN1900# show vlan-membership 查看VLAN成员关系1900# show spantree [VLAN_#] 查看VLAN的STP信息2950# vlan database 进⼊VLAN数据库(ISO12.1前⽤)2950(vlan)# vlan VLAN_# [name VLAN_name] 创建VLAN2950(config)# vlan VLAN_# 进⼊VLAN数据库(ISO12.1后⽤)2950(config-vlan)# name VLAN_name 创建VLAN2950(config-if)# switchport mode access 指定连接是接⼊链路连接2950(config-if)# switchport access vlan VLAN_# 指定VLAN是接⼊链路连接4000>(enable) set vlan VLAN_# name VLAN_name 配置VLAN4000>(enable) set vlan VLAN_# slot_#/port_#-port_# 为VLAN分配端⼝4000>(enable) set trunk slot_#/port_# [on|off|desirable|auto|nonegotiate] [VLAN_#] [isl|dot1q|dot10|lane|negotiate] 配置中继4000>(enable) clear trunk slot_#/port_# VLAN_# 删除VLAN4000>(enable) show trunk slot_#/port_# 验证中继端⼝4000>(enable) set vtp v2 enable 配置VTPv24000>(enable) set vtp [domain name] [mode client|server|transparent] [passwd password] [pruning enable|disable] [v2 enable|disable] 设置VTP4000>(enable) show vtp domain 验证VTP域的信息4000>(enable) show vtp statistics 显⽰发出或收到的VTP通告信息的摘要内容4000>(enable) set vtp pruneeligible VLAN_# 设置VTP消减4000>(enable) clear vtp pruneeligible VLAN_# 清除不希望消减的VLANSTP 4000>(enable) set spantree enable|disable VLAN_# 启⽤/禁⽤STP(默认启⽤)2950(config)# [no] spanning-tree vlan VLAN_# 启⽤/禁⽤STP(默认启⽤)4000>(enable) show spantree [VLAN_#] 验证STP状态2950# show spanning-tree 验证STP状态4000>(enable) set spantree root [secondary] VLAN_# [dia network_diameter] [hello hello_time] 设置主根节点桥、备份节点桥、最⼤桥数量(2-7)、持续时间(1-10,默认2)4000>(enable) set spantree portcost slot_#/port_# cost_# 设置端⼝开销2950(config-if)# spanning-tree cost cost_# 设置端⼝开销4000>(enable) set spantree portpri slot_#/port_# priority_# 设置端⼝优先级4000>(enable) set spantree portvlanpri slot_#/port_# priority_# [VLAN_#] 改变VLAN的优先级设置2950(config-if)# spanning-tree vlan VLAN_# port-priority priority_# 设置端⼝优先级4000>(enable) set spantree fwddelay delay_# [VLAN_#] 设置从侦听状态到学习状态再到转发状态的时间间隔(默认15秒,取值范围是4-30秒)4000>(enable) set spantree hello interval_time [VLAN_#] 设置根节点交换机发送BPDU的时间间隔(默认2秒,取值范围是1-10秒)4000>(enable) set spantree maxage agingtime [VLAN_#] 设置交换机持有BPDU的时间(默认20秒,取值范围是6-40秒)2950(config)# spanning-tree vlan VLAN_# forward-time forward_time 设置从侦听状态到学习状态再到转发状态的时间间隔(默认15秒,取值范围是4-30秒)2950(config)# spanning-tree vlan VLAN_# hello-time hello_time 设置根节点交换机发送BPDU的时间间隔(默认2秒,取值范围是1-10秒)2950(config)# spanning-tree vlan VLAN_# max-age maxage 设置交换机持有BPDU的时间(默认20秒,取值范围是6-40秒)4000>(enable) set port channel slot_#/port_# on 建⽴以太通道集合4000>(enable) show port capabilities slot_#/port_# 查看端⼝的配置4000>(enable) show port channel 验证以太通道集合的配置2950(config-if)# channel-group group_number mode auto|desirable|on 建⽴以太通道集合2950# show etherchannel group_number|brief|detail|load-balance|port|port-channel|summary 验证以太通道集合的配置4000>(enable) set spantree portfast slot_#/port_# enable 配置PortFast2950(config-if)# spanning-tree portfast 配置PortFast4000>(enable) set spantree uplinkfast enable|disable [rate station_update_rate] [all-protocols off|on] 启⽤/禁⽤UplinkFast4000>(enable) show spantree uplinkfast 验证UplinkFast配置2950(config)# spanning-tree uplinkfast [max_update_rate] 启⽤/禁⽤UplinkFast2950# show spanning-tree uplinkfast 验证UplinkFast配置4000>(enable) set spantree backbonefast enable|disable 启⽤/禁⽤BackboneFast4000>(enable) show spantree backbonefast 验证BackboneFast配置2950(config)# spanning-tree backbonefast 启⽤BackboneFast虚拟⽹间路由2600(config)# interface type slot_#/port_#.subint_number 配置⼦接⼝2600(config-subif)# encapsulation dot1q|isl|sde|tr-isl VLAN_# 配置封装类型4000>(enable) show module 查看交换机的硬件配置4000>(enable) session module_# 访问L3SML3SM(config-if)# mac-address mac_address 分配MAC地址MLS 2600(config)# mls rp ip 启动MLS2600(config-if)# mls rp vtp-domain domain_name 分配路由器接⼝到VTP域中2600(config-if)# mls rp vlan-id VLAN_# 向接⼝分配VLAN2600(config-if)# mls rp management-interface 指定该接⼝为管理接⼝2600# show mls rp 提供全局MLS信息2600# show mls rp interface type slot_#/port_# 提供指定接⼝的MLS信息2600# show mls rp vtp-domain domain_name 提供VTP域的MLS信息6500>(enable) set mls enable 在MLS-SE上启动MLS6500>(enable) set mls include rp_ip_address 告诉交换机哪⼀个IP地址是正确的6500>(enable) show mls include 显⽰外部路由处理器的IP地址列表6500>(enable) set mls flow [destination|destination-source|full] 告诉MLS交换机要缓存候选数据包的哪些信息6500>(enable) show mls entry 显⽰第三层缓存表6500>(enable) set mls agingtime aging_time 改变缓存的衰⽼时间(默认256秒,取值范围是8-2032秒中的8的倍数值)6500>(enable) set mls agingtime fast fast_aging_time pkt_threshold 改变快速衰⽼周期和数据包门限值6500>(enable) show mls ip 验证MLS-SE的配置6500>(enable) clear mls entry [destination IP_address] [source IP_address] [flow protocol] [source_port] [destination_port] [all] 删除所有或指定MLS缓存记录3550(config)# ip routing 启动IP路由3550(config)# ip cef 启动CEF3550(config-if)# no switchport 将第⼆层接⼝转换为第三层接⼝3550(config-if)# ip route-cache cef 在接⼝上启动CEF3550# show ip cef 验证CEF组播3640(config)# ip multicast-routing 启动路由器上的组播服务3640(config-if)# ip pim dense-mode 将接⼝设置为PIM密集模式3640(config-if)# ip pim sparse-mode 将接⼝设置为PIM稀疏模式3640(config-if)# ip pim sparsed-dense-mode 将接⼝设置为PIM稀疏-密集模式3640(config)# ip pim rp-address IP_address group_ACL_# [override] ⼿⼯配置RP3640(config)# ip pim send-rp-announce type slot_#/port_# scope ttl_value group-list ACL_# 通告RP组的分配3640(config)# ip pim send-rp-discovery scope ttl_value 配置RP映射代理3640(config-if)# ip multicast ttl-threshold ttl_value 设置TTL门限值3640(config-if)# ip igmp join-group group_address 加⼊组播组3640# show ip mroute 查看组播信息3640# ping 验证RP之间或其他组播路由器之间的连接3640# mtrace source_IP_address [destination_IP_address] [group] 组播traceroute3640(config-if)# ip cgmp 配置CGMP路由器4000>(enable) set cgmp enable 启动CGMP4000>(enable) show cgmp statistics 查看CGMP统计信息4000>(enable) show multicast group cgmp 查看交换机了解到的组播组信息4000>(enable) set cgmp leave enable 检查由客户端产⽣的IGMPv2的离开信息4000>(enable) set igmp enable 启动IGMP4000>(enable) ip igmp snooping 启动IGMP探听4000>(enable) set igmp fastleave enable 启动快速离开过程4000>(enable) show igmp statistics 显⽰交换机上IGMP探听的状态信息QoS 2950(config)# wrr-queue cos-map queue_ID cos_value 建⽴队列2950(config)# wrr-queue bandwidth bandwidth_value 设置队列门限2950(config)# class-maps name 定义对信息传输分类时的匹配标准2950(config-cmap)# match access-group ACL_# 识别被分类的信息传输2950(config)# policy-map name 确定为接⼊信息传输所设置的分类标准2950(config-pmap)# class name2950(config-pmap-c)# set ip dscp number2950(config-if)# service-policy input name 对该接⼝应⽤策略3550(config)# mls qos 启动QoS3550(config-if)# auto qos voip 在接⼝上启动⾃动服务质量3550(config)# priority-list priority_queue_# protocol protocol high|medium|normal|low [list ACL_#] 为优先级队列定义信息流3550(config)# priority-list priority_queue_# queue-limit limit_# 定义特定优先级队列的最⼤队列空间3550(config-if)# priority-group priority_queue_# 向特定输出接⼝分配优先级队列3550(config)# queue-list queue_list_# interface type slot_#/port_# queue_number 为⼀个特定的定制队列定义信息流3550(config)# queue-list queue_list_# queue queue_number byte-count size_in_bytes [limit number_of_queue] 为特定的定制队列定义队列的最⼤空间3550(config-if)# custom-queue-list custom_queue_number 为特定的输出接⼝分配优先级队列4840(config)# ip slb serverfarm serverfarm_name 配置SLB冗余4840(config-slb-sfarm)# real IP_address [port_#] 指定虚拟IP地址4840(config-slb-sfarm)# inservice 启动服务器4840(config)# virtual IP_address [network_mask] tcp|udp [port_number|wsp|wsp-wtp|wsp-wtls|wsp-wtp-wtls] [service service_name] 建⽴虚拟服务器IP地址h。

配置思科三层交换的综合案例

配置思科三层交换的综合案例

配置思科三层交换的综合案例网络基本情况网络拓扑结构为:中心交换机采用Cisco Catalyst 4006-S3,Supervisor Engine III G引擎位于第1插槽,用于实现三层交换;1块24口1000Base-T模块位于第2插槽,用于连接网络服务器;1块6端口1000Base-X模块位于第3插槽,用于连接6台骨干交换机。

一台交换机采用Cisco Catalyst 3550-24-EMI,并安装1块1000Base-X GBIC千兆模块。

一台交换机采用Cisco Catalyst 3550-24-SMI,也安装1块1000Base-X GBIC千兆模块。

另外四台交换机采用Cisco Catalyst 2950G-24-SMI,安装1块1000Base-T GBIC千兆模块。

所有服务器划分为一个VLAN,即VLAN 50。

四台Catalyst 2950G-24-SMI交换机也只划分为一个VLAN,分别为VLAN 60、VLAN 70、VLAN 80和VLAN 90。

Catalyst 3550-24-EMI划分为4个VLAN,分别为VLAN 10、VLAN 20、VLAN 30和VLAN 40。

Catalyst 3550-24-SMI划分2个VLAN,分别为VLAN 60和VLAN 80,与另外两台Catalyst 2950G-24-SMI交换机分别位于同一VLAN。

***************************实例分析****************************由于所有Catalyst 2950G交换机都是一个独立的VLAN,因此,必须先在这些交换机上创建VLAN(VLAN 60~VLAN 90),并将所有端口都指定至该VLAN。

然后,再在Catalyst 4006交换机相应端口上分别创建VLAN。

Catalyst 4006的1000Base-X端口分别与各Catalyst 2950G的1000Base-X端口连接。

2、思科模拟器 实验二(三层交换机VLAN配置)hao

2、思科模拟器 实验二(三层交换机VLAN配置)hao

思科模拟器三层交换机VLAN配置一、实验拓扑图:交换机switch 1的端口fei_0/1和交换机switch 2的端口fei_0/1属于VLAN 10;交换机switch 1的端口fei_0/2和交换机switch 2的端口fei_0/2属于VLAN 20,均为Access端口。

两台交换机通过端口fei_0/16以Trunk方式连接,两端口为Trunk端口。

二、操作步骤:1、在switch 1上配置VLAN10和VLAN20,VLAN10的成员包括fei_0/1和上行端口fei_0/16,VLAN20的成员包括fei_0/2上行端口fei_0/16。

2、在switch 2上配置VLAN10和VLAN20,VLAN10的成员包括fei_0/1和上行端口fei_0/16,VLAN20的成员包括fei_0/2和上行端口fei_0/16。

switch 1配置命令如下:ZXR10>enableZXR10#vlan database------在特权模式下配置VLAN数据库ZXR10(vlan)#vlan 10-------创建VLAN 10ZXR10(vlan)#vlan 20------创建VLAN 20ZXR10(vlan)#exitZXR10#configure terminalZXR10(config)#1、进入端口fei_0/1,把端口fei_0/1加入vlan 10,fei_0/1模式为access;ZXR10(config)#interface fastethernet 0/1ZXR10(config-if)#switchport mode accessZXR10(config-if)#switchport access vlan 10ZXR10(config-if)#exit2、进入端口fei_0/2,把端口fei_0/2加入vlan 20,fei_0/2模式为access;ZXR10(config)#interface fastethernet 0/2ZXR10(config-if)#switchport mode accessZXR10(config-if)#switchport access vlan 20ZXR10(config-if)#exit3、进入fei_0/16端口,将该端口设置成trunk模式,并且把端口fei_0/16以trunk模式加入vlan10,vlan 20ZXR10(config)#interface fastethernet 0/16ZXR10(config-if)#switchport mode trunkZXR10(config-if)#switchport trunk allowed vlan 10,20ZXR10(config-if)#endZXR10#write---------保存文件(备注:switch 2配置命令同switch 1一样)三、验证方法:1. PC-1和PC-2不能互通,PC-3和PC-4不能互通2. PC-1和PC-3互通,PC-2和PC-4互通。

思科三层交换机配置

思科三层交换机配置

思科三层交换机配置思科三层交换机配置为解决vlan间的路由问题,我们引进三层交换概念,它被大家称为二层交换+三层转发。

三层交换机相当于多个专门处理vlan间路由的多个单臂路由和交换的集成。

三层交换机的转发原理三层交换机通过硬件来交换和路由选择数据包。

为处理数据包的高层信息,三层交换有两种体系结构:1> 传统的MLS(Multilayer Switching)依靠ASIC(Application-Specific Integrated Circuit)对数据流的第一个数据包进行路由处理后,第三层引擎对硬件交换组件进行程序处理为后续数据包提供路由。

产生MLS条目记录,一次路由多次交换。

2> 基于CEF(Cisco Express Forwarding)的MLSCEF是基于拓扑的转发模型,它预先将所有路由信息加入到转发信息库(FIB),方便快速路由。

基本概念有:转发信息库(FIB):类似路由表,记录IP与vlan的对应关系邻接关系表:类似mac地址表,记录相邻接口所连接主机的'mac 地址虚接口:不依赖物理接口的子接口,开启vlan配置网关,属于该vlan的物理接口即可动态充当vlan的网关三层交换机配置三层交换机的接口默认是二层接口,命令switchport 转换为三层接口,相反no switchport将路由接口转为交换接口。

以下面模拟图配置为例。

配置步骤:1>在二层交换机上创建vlan,并分配端口,f0/0端口配置trunk(命令略)2>在三层交换机上创建vlan,并配置trunk指定接口封装方式SW_3L(config)# int f0/0SW_3L(config-if)# switchport trunk encapsulation dot1qSW_3L(config-if)# switchport mode trunk3> 在三层交换机上配置各vlan的ip地址SW_3L(config)# int vlan 10SW_3L(config-if)# ip add 192.168.1.1 255.255.255.0SW_3L(config-if)# no shvlan20和vlan30略4> 三层交换机启用路由,配置接口ipSW_3L(config)# ip routingSW_3L(config)# int f1/0SW_3L(config-if)# no switchportSW_3L(config-if)# ip add 10.1.1.1 255.255.255.248SW_3L(config-if)# no sh5> 为三层交换机配置默认路由SW_3L(config)# ip route 0.0.0.0 0.0.0.0 10.1.1.2经过上面配置,在对客户机设置ip和网关,不同vlan间已经可以正常通信。

cisco3750三层交换机配置说明

cisco3750三层交换机配置说明

cisco3750三层交换机配置说明三层交换机可以通过Telnet方式或超级终端方式连上,第一次使用的三层交换机需要进行配置,具体步骤如下:1)、用Cisco 3750三层交换机自带的一条串行电缆将其Console口与1台维护笔记本的串口(需要知道是Com1还是Com2)相连。

2)在维护笔记本上执行以下操作:“开始→程序→附件→通讯→超级终端”,在“连接描述”对话框的名称一栏中输入“cisco3750”(此名字没有实际意义,可以随便输入),创建一个叫做"cisco3750"的新连接,点击"确定",缺省的使用COM1(根据维护计算机连接的端口选择),在"串口设置"中将波特率改为9600波特,其他参数不变,点击"确定"就可以得到三层交换机的控制台。

3)、设置结束,打开三层交换机电源,就会出现三层交换机的启动信息。

这时就可以像在终端一样对三层交换机进行操作了。

此时不要进行任何操作,以免破坏三层交换机的启动进程,直到三层交换机出现了:“Copyright (c) 1986-2006 by Cisco Systems, Inc.Compiled Fri 28-Jul-06 08:46 by yenanh”回车,提示“Would you like to terminate autoinstall? [yes]:”是否要终止自动安装,输入N,进入配置页面:“--- System Configuration Dialog ---Would you like to enter the initial configuration dialog? [yes/no]:”输入N,选择不需要,提示“Switch>00:14:58: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down”,出现“switch>”就可以输入命令进行配置。

思科设备三层交换机的vlan间通信配置

思科设备三层交换机的vlan间通信配置

思科设备三层交换机的vlan间通信配置本次主要讲解三层交换实现vlan间的相互通信:本例配置模型图命令行:swA配置命令:Switch>enableSwitch#vlan database //进入vlan配置模式% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 2 name TztA //在swA上创建vlan 2 名为TztA VLAN 2 added: Name: TztASwitch(vlan)#vlan 3 name TztB //在swA上创建vlan 3 名为TztB VLAN 3 added: Name: TztBSwitch(vlan)#exitAPPLY completed.Exiting....Switch#conf tEnter configuration commands, one per line. End with CNTL/Z. Switch(config)#int f0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 2 //将f0/2划分给vlan 2Switch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 3 //将f0/3划分给vlan 3Switch(config-if)#exitSwitch(config)#int f0/1Switch(config-if)#switchport mode trunk //配置与三层设备连接的f0/1为trunk模式%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#switchport trunk allowed vlan all //允许所有vlan通过f0/1端口Switch(config-if)#exitSwitch(config)#exitSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#wrBuilding configuration... [OK]Switch#(三层交换机)M sw命令配置:Switch>Switch>enableSwitch#vlan database //进入vlan配置模式% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 2 name TztA //在Msw上创建vlan 2 名为TztAVLAN 2 added:Name: TztASwitch(vlan)#vlan 3 name TztB //在Msw上创建vlan 2 名为TztAVLAN 3 added:Name: TztBSwitch(vlan)#exitAPPLY completed.Exiting....Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/1Switch(config-if)#switchport mode trunk //配置三层设备与二层设备连接的f0/1为trunk模式Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.Switch(config-if)#switchport trunk allowed vlan all //允许所有vlan通过f0/1端口Switch(config-if)#no shutdown //激活端口Switch(config-if)#exit Switch(config)#ip routing //使用三层设备的路由功能Switch(config)#int vlan 2 //进入vlan 2配置模式虚拟端口%LINK-5-CHANGED: Interface Vlan2, changed state to upSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to up Switch(config-if)#ip address 192.168.1.1 255.255.255.0 //配置vlan 2的ip地址Switch(config-if)#no shutdown //激活端口Switch(config-if)#exitSwitch(config)#int vlan 3 //配置vlan 3虚拟端口Switch(config-if)#%LINK-5-CHANGED: Interface Vlan3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3, changed state to up Switch(config-if)#ip address 192.168.2.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#do show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan2 //上述的配置成果C 192.168.2.0/24 is directly connected, Vlan3Switch(config)#Switch(config)#exit Switch#%SYS-5-CONFIG_I: Configured from console by console Switch#wrBuilding configuration...[OK]以上配置结束完成后,两台PC能够相互通信(如图):注意:通信基础需要配置网关本次讲解结束!。

思科三层交换机基于环形网络的配置方案(初学者的宝典)

思科三层交换机基于环形网络的配置方案(初学者的宝典)

Cisco三层交换机网络配置方案二vlan设置此处的实验划分了3个vlan,一个服务器组,一个子站的主环形通道,一个子站的备环形通道。

如果有多个环形通道,按照文章中的主备环形通道的配置方法增加配置即可。

本片文章是以Cisco 3560编写的,配置3750与3560不一样的地方会在每一部分的开头标出,如果没有标出就是两种交换机的配置方法是一样的。

如果配置的是3750(或者其他型号的可堆叠Cisco交换机),请先参阅4.6。

2.1 进入配置模式2.1.1 进入特权模式Switch>en如图6所示。

图 62.1.2 进入配置模式Switch#configure terminal如图7所示。

hou图7进入配置模式后就可以开始划分vlan了(关于“模式”的解释请查阅4.2)。

2.2 划分vlan2.2.1 配置交换机的名称Switch(config)#hostname switch1如图8所示。

图82.2.2 划分3个vlanswitch1(config)#vlan 10 !全局配置模式下进入vlan模式并创建vlan10 switch1(config-vlan)#name commmaster !把vlan10命名为commmasterswitch1(config-vlan)#vlan 20 !vlan模式下创建vlan20switch1(config-vlan)#name commbak !把vlan20命名为commbakswitch1(config-vlan)#vlan 30 !vlan模式下创建vlan30switch1(config-vlan)# name server !把vlan30命名为serverswitch1naswitch1(config)#如图9所示。

图92.2.3 分配端口3560端口1的名称是g0/1,3750堆叠后交换机1的端口1名称是Gi1/0/1。

交换机端口的名字是什么可在特权模式(即switch1#)下用sh vlan brief查看。

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

首先开机,使用串口线连接交换机。

输入用户名cisco密码cisco然后设定新的密码为3tcloud。

调整交换机到三层模式。

按照说明书设置,连接到交换机,设定本机IP:192.168.1.2 ,访问http:
//192.168.1.254 登录界面如下:
使用用户名cisco密码cisco登录,然后修改新密码为:3tcloud
点击进入Create VLAN菜单
依次添加VLAN
进入Port to VLAN 菜单将网口配置到相关的vlan里
现在的分配情况如下
行政:1~5号市场:5~10号研发(内):11~15号研发(外):16~20号测试1:21~25号
测试2:26~30号产品:31~35号实施:36~40号无线:41~45号主网段:46~52号
进入下一个界面
添加各个网段所使用的虚拟静态IP地址,现在所使用的IP如下:
设置默认VLAN为100VLAN
然后保存相关的配置,重启交换机。

相关文档
最新文档