CISCO路由器虚拟局域网(VLAN)路由实例

合集下载

思科路由器如何配置VLAN的IP

思科路由器如何配置VLAN的IP

思科路由器如何配置VLAN的IP我们的思科路由器如何配置VLAN的IP呢?想必很多网络技术的新手都不清楚,所以小编这里就推荐下配置VLAN的IP方法和介绍VLAN给你们认识认识。

VLAN:英文全称为Virtual Local Area Network,中文称虚拟局域网,VLAN其实就相当于一个小型网络的统称,如校园网内有三个不同网段,分别为10.0.0.0、172.16.1.0和192.168.1.0,我们可以分别将这三个网段划分为三个不同的VLAN,以便于管理。

举个例子,只允许10.0.0.0网段访问172.16.1.0网段,不能访问192.168.1.0网段,此时VLAN的好处显露无疑。

今天笔者同大家分享思科路由器如何配置VLAN的IP。

1、启动计算机并连接到思科路由器,进入VLAN配置模式。

在命令行提示符下键入以下命令,然后按ENTER键host1(config)#interface fastEthernet 4/0请注意,在这个例子中,我们指定的VLAN使用的是快速以太网连接,标有“快速以太网”。

2、对VLAN进行封装,输入以下命令:host1(config-if)#encapsulation vlan3、创建一个子接口的VLAN,这将主机的IP,通过添加一个子识别号码。

键入以下命令,然后按ENTER键。

host1(config-if)#interface fastEthernet 4/0.354、指定的VLAN ID,通过键入以下命令Read more: How to Configure a VLAN IP | "host1(config-if)#vlan id 333",5、分配给VLAN的IP地址,在命令提示符下键入以下命令,然后按回车键。

host1(config-if)#IP address 192.168.1.13 255.255.255.0通过这5个命令,你就成功在路由器上的VLAN配置了IP地址了,是不是很简单呢。

cisco3560三层交换机vlan间路由配置实例

cisco3560三层交换机vlan间路由配置实例

interface vlan 4 //同上
ip address 172.16.4.252 255.255.255.0
no shutdown
standby 4 ip 172.16.4.254
standby 4 priority 110 preempt
ip access-group 101 in
switchport mode trunk
switchprot trunk allowed vlan all
interface gigbitethernet 0/7 //进入模块0上的吉比特以太口7
Switchport mode access //定义这个接口的工作模式为访问模式
interface vlan 5
ip address 172.16.5.252 255.255.255.0
no shutdown
standby 5 ip 172.16.5.254
standby 5 priority 110 preempt
ip access-group 101 in
interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11
switchport trunk encapsulation dotlq //给这个接口封装为802.1Q
switchport mode trunk //定义这个接口的工作模式为trunk
Enable //进入私有模式
Configure terminal //进入全局模式
service password-encryption //对密码进行加密
hostname Catalyst 3550-12T1 //给三层交换机定义名称

局域网实现VLAN实例

局域网实现VLAN实例

局域网实现VLAN实例在局域网中实现虚拟局域网(VLAN)可以提供更好的网络管理和安全性。

VLAN是将一个物理局域网划分为逻辑上独立的多个虚拟局域网的技术。

通过VLAN可以实现不同的用户组之间的隔离和安全访问控制,提高网络的性能和灵活性。

下面将介绍一个局域网实现VLAN的实例。

假设有一家公司拥有一个局域网,包括不同部门和工作组的计算机,其中有人力资源部(HR)、财务部(FIN)、技术部(TECH)和市场部(MARK)等。

现在,公司希望将这些部门和工作组分别划分为不同的虚拟局域网,以实现隔离和安全控制。

首先,我们需要一台支持VLAN功能的交换机。

这样的交换机可以根据不同的标识(如端口号、MAC地址等)将不同的数据包划分到不同的虚拟局域网中。

我们选择一台24端口的交换机,并将其连接到公司的核心路由器。

接下来,我们需要配置交换机的VLAN设置。

假设我们要创建四个VLAN,分别代表不同的部门和工作组。

1. 首先,登录到交换机的管理界面,通常通过Web浏览器或者命令行界面(CLI)可以进行配置。

2.创建虚拟局域网(VLAN):在交换机的界面中找到VLAN配置选项,创建四个VLAN分别为HR、FIN、TECH和MARK。

3.将端口划分到不同的VLAN:将交换机的端口划分到不同的VLAN,以实现不同部门的隔离。

例如,将与人力资源部相关的端口划分到HRVLAN中,将与财务部相关的端口划分到FINVLAN中,以此类推。

4.配置VLAN间的路由:默认情况下,不同VLAN之间的通信是被禁止的。

如果需要允许不同VLAN之间的通信,需要配置交换机的路由功能。

这要求交换机支持层3路由功能,或者可以将交换机连接到外部路由器。

配置完成后,每个部门和工作组的计算机将被划分到不同的VLAN中。

不同VLAN之间的通信将受到限制,从而增强了网络的安全性。

除了隔离和安全控制外,VLAN还可以提高网络的性能和灵活性。

通过将不同的用户组划分到不同的VLAN中,可以减少广播流量,提高网络的性能。

NA实验VLAN间路由配置实例

NA实验VLAN间路由配置实例

下面是实验拓扑图:
相关说明:VLAN中文叫做虚拟局域网,它的作用就是将物理上互连的网络在逻辑上划分为多个互不相干的网络,这些网络之间是无法通讯的,就好像互相之间没有连接一样,因此广播也就隔离开了。

本次实验用于实现vlan间的路由。

实验过程:
I:配置个模拟主机PC-1 PC-2 PC-3的IP。

II:在交换机KC-S上创vlan.建
III:在交换机上将相应vlan接口上应用vl an.
IV:PC-1不能ping通PC-2或PC-3,但PC-2和PC-3可以互通,可见vlan将主机阻隔
V:将KC-S的f1/1设定为trunk模式
VI:在路由器KC-R上设置支持trunk通信,采用子接口模式。

VII:测试。

利用vlan虚接口作为路由接口的配置方法

利用vlan虚接口作为路由接口的配置方法

利用vlan虚接口作为路由接口的配置方法vlan虚接口是一种基于虚拟局域网技术的接口,可以将一个物理接口划分为多个逻辑接口,从而实现多个虚拟网络的隔离和管理。

在路由器中,可以利用vlan虚接口作为路由接口进行网络配置和管理。

一、vlan虚接口的配置方法1. 首先需要在路由器上创建vlan虚拟局域网,可以使用命令行或者web界面进行配置。

例如使用命令行配置vlan10:Switch(config)#vlan 102. 接着需要将vlan虚拟局域网分配给物理接口或者子接口,使得vlan虚接口可以实现与其他网络的通信。

例如将vlan10分配给GigabitEthernet0/0接口:Switch(config-if)#switchport access vlan 103. 最后需要在路由器上配置vlan虚接口,将其作为路由器的接口,实现不同网络的互通。

例如配置vlan10的虚接口:Switch(config)# interface vlan 10Switch(config-if)# ip address 10.0.0.1 255.255.255.0Switch(config-if)# no shutdown二、vlan虚接口作为路由接口的优势1. 实现不同网络之间的互通。

通过vlan虚接口作为路由接口,可以实现不同网络之间的互通,从而实现网络的隔离和管理。

2. 可以提高网络的安全性。

利用vlan虚接口作为路由接口,可以实现不同网络的隔离,从而提高网络的安全性,防止网络攻击和信息泄露。

3. 可以提高网络的灵活性。

通过vlan虚接口作为路由接口,可以实现网络的灵活配置和管理,从而满足不同网络的需求和应用。

4. 可以提高网络的可靠性。

利用vlan虚接口作为路由接口,可以实现网络的冗余和备份,从而提高网络的可靠性和稳定性,防止网络故障和中断。

三、vlan虚接口作为路由接口的应用场景1. 多个vlan虚拟局域网之间的互通。

思科Vlan配置实例

思科Vlan配置实例

思科Vlan配置实例实验配置:SW-2L1、创建VLAN,并将相应端口加入VLANSW-2L#vlan databaseSW-2L(vlan)#vlan 10SW-2L(vlan)#vlan 20SW-2L(vlan)#vlan 30SW-2L(config)#interface f0/1SW-2L(config-if)#switch access vlan 10SW-2L(config)#interface f0/2SW-2L(config-if)#switch access vlan 20SW-2L(config)#interface f0/3SW-2L(config-if)#switch access vlan 302、创建TRUNKSW-2L(config)#interface f0/24SW-2L(config-if)switch mode trunkSW-3L1、创建VLANSW-3L#vlan databaseSW-3L(vlan)#vlan 10SW-3L(vlan)#vlan 20SW-3L(vlan)#vlan30用show vlan-switch查看2、创建TRUNKSW-3L(config)#interface f0/24SW-3L(config-if)#switch mode trunk3、开启三层交换路由功能SW-3L(conifg)#ip routing4、配置VLAN的IPSW-3L(config)#interface vlan 10SW-3L(config-if)#ip address 192.168.10.254 255.255.255.0 SW-3L(config-if)#no shutdownSW-3L(config)#interface vlan 20SW-3L(config-if)#ip address 192.168.20.254 255.255.255.0 SW-3L(config-if)#no shutdownSW-3L(conifg)#interface vlan30SW-3L(config-if)#ip address 192.168.30.254 255.255.255.0 SW-3L(config-if)#no shutdown5、配置三层交换路由接口SW-3L(config)#interface f0/23SW-3L(config-if)#no switchportSW-3L(config-if)#ip address 10.1.1.1 255.255.255.0SW-3L(config-if)#no shutdown6、配置RIP路由SW-3L(config)#router ripSW-3L(config-router)#no auto-summarySW-3L(config-router)#network 192.168.10.0SW-3L(config-router)#network 192.168.20.0SW-3L(config-router)#network 192.168.30.0SW-3L(conifg-router)#network 10.1.1.0RA1、配置端口IPRA(config)#interface f0/0RA(config-if)#ip address 10.1.1.2 255.255.255.0RA(config-if)#no shutdownRA(config)#interface f0/1RA(config-if)#ip address 172.16.1.1 255.255.255.0RA(config-if)#no shutdown用show run interfere vlan vlan-id查看,或者show interfere vlan vlan-id查看2、配置RIP路由RA(config)#router ripRA(config-router)#no auto-summaryRA(config-router)#network 10.1.1.0RA(config-router)#network 172.16.1.0RB1、配置端口IPRB(config)#interface f0/0RB(config-if)#ip address 172.16.1.2 255.255.255.0RB(config-if)#no shutdown2、配置RIP路由RB(config)#router ripRB(config-router)#no auto-summaryRB(config-router)#network 172.16.1.0端口里面配VLAN,VLAN里面配IP如有侵权请联系告知删除,感谢你们的配合!如有侵权请联系告知删除,感谢你们的配合!。

使用Cisco 2610和Cisco 2950配置虚拟局域网(VLAN)之间的路由方法(单臂路由)

使用Cisco 2610和Cisco 2950配置虚拟局域网(VLAN)之间的路由方法(单臂路由)

使用Cisco 2610和Cisco 2950配置虚拟局域网(VLAN)之间的路由方法网络拓扑如下图:VLAN 192表示192.168.1.0/24网段的电脑,VLAN 172表示172.16.20.0/24网段电脑。

VLAN之间的路由可以有多种方法;A.使用多以太端口路由器,每个VLAN占用一个端口。

B.使用三层交换机。

C.使用单以太端口路由器。

方法C即所谓的单臂路由,它表达得很形象,不象一般的路由,一边进,另一边出,而是哪里进就哪里出。

在C方法下,分述配置步骤:1.在Cisco 2950交换机上配置端口1至8为VLAN 编号172的成员;端口9至16为VLAN编号192的成员;端口24为干道(Trunk),用网线与路由器以太口相连。

Switch#conf tSwitch(config)# int range fastEthernet 0/1 – 8Switch(config-if-range)#switchport mode accessSwitch(config-if-range)#switchport access vlan 172Switch(config-if-range)#exitSwitch(config)# int range fastEthernet 0/9 – 16Switch(config-if-range)#switchport mode accessSwitch(config-if-range)#switchport access vlan 192Switch(config-if-range)#exitSwitch(config)# int fastEthernet 0/24Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#exitSwitch#sh run查看一下V ALN端口和Trunk端口:Switch#sh vlan查看一下V ALN:2.在Cisco 2610路由器上配置以太端口的子接口,这时需要用CONSOLE线,因为以太端口没有IP地址,无法telnet上去。

CCNA实验-VLAN,TRUNK,VTP和VLAN间路由的使用和配置-带步骤

CCNA实验-VLAN,TRUNK,VTP和VLAN间路由的使用和配置-带步骤

VLAN、TRUNK、VTP和VLAN间路由的使用和配置实验目的:熟练掌握VLAN,TRUNK,VTP和VLAN间路由的使用和配置实验内容:在1900系列和2900系列交换机上VLAN的配置在1900系列和2900系列交换机上TRUNK的配置在1900系列和2900系列交换机上VTP的配置在1900系列和2900系列交换机以及2600系列路由器上VLAN间路由的配置实验条件:2900系列交换机两台,1900系列交换一台和2600系列路由器各一台一.VLAN的配置本实验需要2900交换机一台,PC机两台,console线一条Step 1 配置交换机Switch>Switch>enableSwitch#configure terminalSwitch(config)#hostname Switch_ASwitch_A(config)#enable secret classSwitch_A(config)#enable password ciscoSwitch_A(config)#line con 0Switch_A(config-line)#password ciscoSwitch_A(config-line)#loginSwitch_A(config-line)#line vty 0 15Switch_A(config-line)#password ciscoSwitch_A(config-line)#loginSwitch_A(config-line)#exitSwitch_A(config)#interface Vlan1Switch_A(config-if)#ip address 192.168.1.2 255.255.255.0Switch_A(config-if)#no shutdownSwitch_A(config-if)#exitSwitch_A(config)#ip default-gateway 192.168.1.1Switch_A(config)#endStep 2 为PC配置正确的IP地址,子网掩码和缺省网关Step 3 检测连通性由switch ping两台PC机,检测连通性Step 4 显示VLAN的接口信息2900:Switch_A#show vlan1900:Switch_A#show vlan-membershipStep 5 创建,命名VLAN2900:Switch_A#vlan databaseSwitch_A(vlan)#vlan 2 name VLAN2Switch_A(vlan)#vlan 3 name VLAN3Switch_A(vlan)#exit1900:Switch_A#configure terminalSwitch_A(config)#vlan 2 name VLAN2Switch_A(config)#vlan 3 name VLAN3Step 6 安排4,5,6端口到VLAN 22900:Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/4 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 2 Switch_A(config-if)#interface fastethernet 0/5 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 2 Switch_A(config-if)#interface fastethernet 0/6 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 2 Switch_A(config-if)#end1900:Switch_A#configure terminalSwitch_A(config)#interface Ethernet 0/4Switch_A(config-if)#vlan static 2Switch_A(config-if)#interface Ethernet 0/5 Switch_A(config-if)#vlan static 2Switch_A(config-if)#interface Ethernet 0/6 Switch_A(config-if)#vlan static 2Switch_A(config)#endStep 7 显示VLAN的接口信息2900:Switch_A#show vlan1900:Switch_A#show vlan-membershipStep 8 安排7,8,9端口到VLAN 3Switch_A#configure terminalSwitch_A(config-if)#interface fastethernet 0/7 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 3 Switch_A(config-if)#interface fastethernet 0/8 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 3 Switch_A(config-if)#interface fastethernet 0/9 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 3 Switch_A(config-if)#endStep 9 显示VLAN的接口信息2900:Switch_A#show vlan1900:Switch_A#show vlan-membershipStep 10 测试VLANsStep 11 解除VLAN与端口的绑定2900:Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/4 Switch_A(config-if)#no switchport access vlan 2 1900:Switch_A#configure terminalSwitch_A(config)#interface Ethernet 0/4Switch_A(config-if)#no vlan-membership 2Switch_A(config-if)#endStep 12 显示VLAN的接口信息2900:Switch_A#show vlan1900:Switch_A#show vlan-membershipStep 13 删除VLAN2900:Switch_A#vlan databaseSwitch_A(vlan)#no vlan 3Deleting VLAN 3Switch_A(vlan)#exit1900:Switch_A#configure terminalSwitch_A(config)#interface ethernet 0/7Switch_A(config-if)#no vlan 3Switch_A(config-if)#exitStep 14 显示VLAN的接口信息2900:Switch_A#show vlan1900:Switch_A#show vlan-membership二.VLAN的TRUNK配置本实验需要2900交换机两台,PC机两台,console线一条(一)ISLStep 1 配置交换机的基本参数参考上面的实验Step 2 为PC配置正确的IP地址,子网掩码和缺省网关Step 3 检测连通性由switch ping两台PC机,检测连通性Step 4 显示VLAN的接口信息Switch_A#show vlanStep 5 在Switch_A上创建,命名VLANSwitch_A#vlan databaseSwitch_A(vlan)#vlan 10 name AccountingSwitch_A(vlan)#vlan 20 name MarketingSwitch_A(vlan)#vlan 30 name EngineeringSwitch_A(vlan)#exitStep 6 安排4,5,6端口到VLAN 10Switch_A(config)#interface fastethernet 0/4Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet 0/5Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet 0/6Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#endStep 7 安排端口7,8,9到VLAN 20Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/7Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet 0/8Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet 0/9Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#endStep 8 安排端口10,11,12到VLAN 30Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/10Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#interface fastethernet 0/11Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#interface fastethernet 0/12Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#endStep 9 在Switch_B上创建,命名VLAN重复5-8步,在Switch_B创建,命名VLANStep 10 显示VLAN的接口信息Switch_A#show vlanStep 11 测试VLANsStep 12 创建ISL trunkSwitch_A(config)#interface fastethernet 0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#switchport trunk encapsulation islSwitch_A(config-if)#endSwitch_B(config)#interface fastethernet 0/1Switch_B(config-if)#switchport mode trunkSwitch_B(config-if)#switchport trunk encapsulation isl Switch_B(config-if)#endStep 13 测试ISL trunk(二)dot1qStep 1 配置交换机的基本参数参考上面的实验Step 2 为PC配置正确的IP地址,子网掩码和缺省网关Step 3 检测连通性由switch ping两台PC机,检测连通性Step 4 显示VLAN的接口信息Switch_A#show vlanStep 5 在Switch_A上创建,命名VLANSwitch_A#vlan databaseSwitch_A(vlan)#vlan 10 name AccountingSwitch_A(vlan)#vlan 20 name MarketingSwitch_A(vlan)#vlan 30 name EngineeringSwitch_A(vlan)#exitStep 6 安排4,5,6端口到VLAN 10Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet 0/5Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet 0/6Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#endStep 7 安排端口7,8,9到VLAN 20Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/7Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet 0/8Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet 0/9Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#endStep 8 安排端口10,11,12到VLAN 30Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/10Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#interface fastethernet 0/11Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#interface fastethernet 0/12Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#endStep 9 在Switch_B上创建,命名VLAN重复5-8步,在Switch_B创建,命名VLANStep 10 显示VLAN的接口信息Switch_A#show vlanStep 11 测试VLANsStep 12 创建dot1q trunkSwitch_A(config)#interface fastethernet 0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#switchport trunk encapsulation dot1q Switch_A(config-if)#endSwitch_B(config-if)#switchport mode trunkSwitch_B(config-if)#switchport trunk encapsulation dot1q Switch_B(config-if)#endStep 13 测试dot1q trunk三.VLAN的VTP配置本实验需要2900交换机两台,PC机两台,console线一条Step 1 配置交换机参考上面的实验Step 2 为PC配置正确的IP地址,子网掩码和缺省网关Step 3 测试连接性由switch ping两台PC机,检测连通性Step 4 显示VLAN接口信息Switch_A#show vlanStep 5 配置VTP服务器端Switch_A#vlan databaseSwitch_A(vlan)#vtp serverSwitch_A(vlan)#vtp domain group1Switch_A(vlan)#exitStep 6 创建,命名VLANsSwitch_A#vlan databaseSwitch_A(vlan)#vlan 10 name AccountingSwitch_A(vlan)#vlan 20 name MarketingSwitch_A(vlan)#vlan 30 name EngineeringSwitch_A(vlan)#exitStep 7 安排端口4,5,6到VLAN 10Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/4Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet 0/5Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet 0/6Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#endStep 8 安排端口7,8,9到VLAN 20Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/7Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet 0/8Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet 0/9Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#endStep 9 安排端口10,11,12到VLAN 30Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/10Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#interface fastethernet 0/11Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#interface fastethernet 0/12Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 30Switch_A(config-if)#endStep 10 显示VLAN接口信息Switch_A#show vlanStep 11 配置VTP客户端Enter the following commands to configure Switch_B to be a VTP client: Switch_B#vlan databaseSwitch_B(vlan)#vtp clientSwitch_B(vlan)#vtp domain group1Switch_B(vlan)#exitStep 12 创建trunkSwitch_A(config)#interface fastethernet 0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#endSwitch_B(config)#interface fastethernet 0/1Switch_B(config-if)#switchport mode trunkSwitch_B(config-if)#end2900:Note that it is necessary to specify the encapsulation on a 2924XL, since it supports 802.1Qand ISL.Switch_A(config)#interface fastethernet0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#switchport trunk encapsulation dot1qSwitch_A(config-if)#endSwitch_B(config)#interface fastethernet0/1Switch_B(config-if)#switchport mode trunkSwitch_B(config-if)#switchport trunk encapsulation dot1qSwitch_B(config-if)#endStep 13 测试trunkshow interface fastethernet 0/1 switchportStep 14 显示VLAN接口信息Switch_B#show vlanStep 15 安排端口4,5,6到VLAN 10Switch_B#configure terminalSwitch_B(config)#interface fastethernet 0/4Switch_B(config-if)#switchport mode accessSwitch_B(config-if)#switchport access vlan 10Switch_B(config-if)#interface fastethernet 0/5Switch_B(config-if)#switchport mode accessSwitch_B(config-if)#switchport access vlan 10Switch_B(config-if)#interface fastethernet 0/6Switch_B(config-if)#switchport mode accessSwitch_B(config-if)#switchport access vlan 10Switch_B(config-if)#endStep 16 Assign ports to VLAN 20Switch_B#configure terminalSwitch_B(config)#interface fastethernet 0/7Switch_B(config-if)#switchport mode accessSwitch_B(config-if)#switchport access vlan 20Switch_B(config-if)#interface fastethernet 0/8Switch_B(config-if)#switchport mode accessSwitch_B(config-if)#switchport access vlan 20Switch_B(config-if)#interface fastethernet 0/9 Switch_B(config-if)#switchport mode access Switch_B(config-if)#switchport access vlan 20 Switch_B(config-if)#endStep 17 Assign ports to VLAN 30Switch_B#configure terminalSwitch_B(config)#interface fastethernet 0/10 Switch_B(config-if)#switchport mode access Switch_B(config-if)#switchport access vlan 30 Switch_B(config-if)#interface fastethernet 0/11 Switch_B(config-if)#switchport mode access Switch_B(config-if)#switchport access vlan 30 Switch_B(config-if)#interface fastethernet 0/12 Switch_B(config-if)#switchport mode access Switch_B(config-if)#switchport access vlan 30 Switch_B(config-if)#endStep 18 显示VLAN接口信息Switch_A#show vlan四.VLAN间路由的配置本实验需要2621路由器一台,2900交换机一台,PC机两台,console线一条Step 1 配置交换机参考上面的实验Step 2 配置连接到交换机上的主机a. 连接到port 0/5上的PC:IP address 192.168.5.2Subnet mask 255.255.255.0Default gateway 192.168.5.1b. 连接到port 0/9上的PC:IP address 192.168.7.2Subnet mask 255.255.255.0Default gateway 192.168.7.1Step 3 测试连通性Step 4 创建,命名两个VLANs2900:Switch_A#vlan databaseSwitch_A(vlan)#vlan 10 name SalesSwitch_A(vlan)#vlan 20 name SupportSwitch_A(vlan)#exit1900:Switch_A#config terminalSwitch_A(config)#vlan 10 name SalesSwitch_A(config)#vlan 20 name SupportSwitch_A(config)#exitStep 5 安排端口5,6,7,8到VLAN 102900:Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/5 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 10 Switch_A(config-if)#interface fastethernet 0/6 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 10 Switch_A(config-if)#interface fastethernet 0/7 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 10 Switch_A(config-if)#interface fastethernet 0/8 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 10 Switch_A(config-if)#end1900:Switch_A#configure terminalSwitch_A(config)#interface ethernet 0/5Switch_A(config-if)vlan static 10Switch_A(config-if)#interface ethernet 0/6 Switch_A(config-if)vlan static 10Switch_A(config-if)#interface ethernet 0/7 Switch_A(config-if)vlan static 10Switch_A(config-if)#interface ethernet 0/8 Switch_A(config-if)vlan static 10Switch_A(config-if)#endStep 6 安排端口910,11,12到VLAN 202900:Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/9 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 20 Switch_A(config-if)#interface fastethernet 0/10 Switch_A(config-if)#switchport mode access Switch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet 0/11Switch_A(config-if)#switchport mode acce ssSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet0/12Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#end1900:Switch_A#configure terminalSwitch_A(config)#interface ethernet 0/9Switch_A(config-if)vlan static 20Switch_A(config-if)#interface ethernet 0/10Switch_A(config-if)vlan static 20Switch_A(config-if)#interface ethernet 0/11Switch_A(config-if)vlan static 20Switch_A(config-if)#interface ethernet 0/12Switch_A(config-if)vlan static 20Switch_A(config-if)#endStep 7 显示VLAN接口信息Switch_A#show vlanStep 8 创建trunk2900:Switch_A(config)#interface fastethernet0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#switchport trunk encapsulation dot1qSwitch_A(config-if)#end1900: Note the 1900 switch will only support ISL trunking, not dot1q. Switch_A#configure terminalSwitch_A(config)#interface fastethernet0/26Switch_A(config-if)#trunk onStep 9 配置路由器a. Configure the router with the following data. Note that in order to Router_A(config)#interface fastethernet 0/0Router_A(config-if)#no shutdownRouter_A(config-if)#interface fastethernet 0/0.1Router_A(config-subif)#encapsulation dot1q 1Router_A(config-subif)#ip address 192.168.1.1 255.255.255.0Router_A(config-if)#interface fastethernet 0/0.2Router_A(config-subif)#encapsulation dot1q 10Router_A(config-subif)#ip address 192.168.5.1 255.255.255.0Router_A(config-if)#interface fastethernet 0/0.3Router_A(config-subif)#encapsulation dot1q 20Router_A(config-subif)#ip address 192.168.7.1 255.255.255.0Router_A(config-subif)#endStep 10 保存路由器的配置文件Step 11 显示路由器的路由表Step 12 测试VLANS 和the trunkSwitch>enableSwitch#configure terminalSwitch(config)#hostname Switch_ASwitch_A(config)#enable secret classSwitch_A(config)#line con 0Switch_A(config-line)#password ciscoSwitch_A(config-line)#loginSwitch_A(config-line)#line vty 0 15Switch_A(config-line)#password ciscoSwitch_A(config-line)#loginSwitch_A(config-line)#exitSwitch_A(config)#interface Vlan1Switch_A(config-if)#ip address 192.168.1.2 255.255.255.0 Switch_A(config-if)#no shutdownSwitch_A(config-if)#exitSwitch_A(config)#ip default-gateway 192.168.1.1Switch_A(config)#endSwitch_A#vlan databSwitch_A#vlan databaseSwitch_A(vlan)#vlan 10 name Sal esVLAN 10 added:Name: SalesSwitch_A(vlan)#vlan 20 name SupportVLAN 20 added:Name: SupportSwitch_A(vlan)#exitAPPLY completed.Exiting....Switch_A#configure terminalSwitch_A(config)#interface fastethernet0/5Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet0/6Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet0/7Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#interface fastethernet0/8Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 10Switch_A(config-if)#endSwitch_A#configure terminalSwitch_A(config)#interface fastethernet0/9Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet0/10Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet0/11Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#interface fastethernet0/12Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 20Switch_A(config-if)#endSwitch_A#show vlanVLAN Name Status Ports---- --------------------------- --------1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4,Fa0/13, Fa0/14, Fa0/15, Fa0/16,Fa0/17, Fa0/18, Fa0/19, Fa0/20,Fa0/21, Fa0/22, Fa0/23, Fa0/2410 Sales active Fa0/5, Fa0/6, Fa0/7, Fa0/820 Support active Fa0/9, Fa0/10, Fa0/11, Fa0/121002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default activeVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ------ ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 0 010 enet 100010 1500 - - - - - 0 020 enet 100020 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - - 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0Switch_A#configure terminalSwitch_A(config)#interface fastethernet0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#endRouter>enableRouter#configure terminalRouter(config)#hostname Router_ARouter_A(config)#enable secret classRouter_A(config)#line con 0Router_A(config-line)#password ciscoRouter_A(config-line)#loginRouter_A(config-line)#line vty 0 4Router_A(config-line)#password ciscoRouter_A(config-line)#loginRouter_A(config-line)#exitRouter_A(config)#interface fastethernet 0/0Router_A(config-if)#no shutdownRouter_A(config-if)#interface fastethernet 0/0.1Router_A(config-subif)#encapsulation dot1q 1Router_A(config-subif)#ip address 192.168.1.1 255.255.255.0Router_A(config-subif)#interface fastethernet 0/0.2Router_A(config-subif)#encapsulation dot1q 10Router_A(config-subif)#ip address 192.168.5.1 255.255.255.0Router_A(config-subif)#interface fastethernet 0/0.3Router_A(config-subif)#encapsulation dot1q 20Router_A(config-subif)#ip address 192.168.7.1 255.255.255.0Router_A(config-subif)#endRouter_A#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - 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.5.0/24 is directly connected, FastEthernet0/0.2C 192.168.7.0/24 is directly connected, FastEthernet0/0.3C 192.168.1.0/24 is directly connected, FastEthernet0/0.1Router_A#C:\>ping 192.168.5.2Pinging 192.168.5.2 with 32 bytes of data:Reply from 192.168.5.2: bytes=32 time<10ms TTL=127Reply from 192.168.5.2: bytes=32 time<10ms TTL=127Reply from 192.168.5.2: bytes=32 time<10ms TTL=127Reply from 192.168.5.2: bytes=32 time<10ms TTL=127Ping statistics for 192.168.5.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0msC:\>ping 192.168.1.2Pinging 192.168.1.2 with 32 bytes of data:Reply from 192.168.1.2: bytes=32 time<10ms TTL=254 Reply from 192.168.1.2: bytes=32 time=40ms TTL=254 Reply from 192.168.1.2: bytes=32 time=20ms TTL=254 Reply from 192.168.1.2: bytes=32 time<10ms TTL=254 Ping statistics for 192.168.1.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 40ms, Average = 15ms。

CiscoPacketTracer建立管理虚拟局域网

CiscoPacketTracer建立管理虚拟局域网

Cisco Packet Tracer建立管理虚拟局域网依据IP资源分配情况,为该单位的部门分配IP,各个部门的IP地址均为DHCP动态获得。

若该单位分为若干业务部门(假设有业务部门A和B)和财务部门,其中财务部门不允许上网浏览Internet信息,业务部门允许上网。

下面是店铺收集整理的Cisco Packet Tracer建立管理虚拟局域网,希望对大家有帮助~~Cisco Packet Tracer建立管理虚拟局域网工具/原料内网设备:2台交换机,一台路由器方法/步骤192.168..32,0 用来当业务部门A192.168.64.0 用来当业务部门B192.168.160.0 用来当财务部门的子网S2是一台Multilayer Switch,主机名M_Switch,也就是具有三层路由的交换机,S_switch是普通的二层交换机。

Local(LocalRoute)是局域网的边界路由器,ISP是外部的路由器,连接ISP当做互联网。

如图所示,配置计算机先配置两个交换机之间的数据交换模式为chunk。

Tip:设置和配置chunk 在两个交换机之间选择all 我第二次配置VTP 的时候,就因为没有配置chunk,client的vlan 配置没有和service的vlan配置同步.Chunk我利用它自带的软件界面配置,没用命令行。

这是配置完chunk后显示的状态。

Switch#show interface fa3/1 switchporName: Fa3/1Switchport: EnabledAdministrative Mode: trunkOperational Mode: trunkAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulation: dot1qNegotiation of Trunking: OnAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Voice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk private VLANs: noneOperational private-vlan: noneTrunking VLANs Enabled: ALLPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: false其次连接建立VTP ,实现了核心交换机统一配置两个交换机的效果这个是配置核心交换机S2的M_Switch(config)#vtp mode serverDevice mode already VTP SERVER. //设为VTP serverM_Switch(config)#domain ZRJM_Switch(config)#vtp domain ZRJChanging VTP domain name from NULL to ZRJ //把VTP domain设为ZRJM_Switch(config)#password ssM_Switch(config)#vtp password ssSetting device VLAN database password to ss这个是配置分区交换机S1的Setting device to VTP CLIENT mode. //设置VTP 模式为client S_Switch(config)#vtp domain ZRJChanging VTP domain name from NULL to ZRJ //把VTP domain设为ZRJS_Switch(config)#vtp password s1Setting device VLAN database password to ssS_Switch(config)#end3.建立Vlan后来查资料才知道 1002开始是不能随便改的,只有2-1001可以自由分配,在这个上面竟然花了很多时间还想不明白。

VLAN间路由配置实例分享

VLAN间路由配置实例分享

VLAN间路由配置实例分享在网络中,VLAN(Virtual LAN)是一种将局域网划分为多个虚拟局域网的技术。

不同的VLAN之间通常是隔离的,为了使不同的VLAN之间能够互相通信,需要进行VLAN间路由配置。

本文将分享一个VLAN间路由配置的实例,帮助读者理解如何正确配置VLAN间路由。

首先,我们需要明确一些概念。

在VLAN间路由配置中,我们需要有一个具备路由功能的设备,比如路由器或三层交换机。

此外,我们还需要划分不同的VLAN,并为每个VLAN分配一个IP地址段。

接下来,我们将以一个企业网络为例,展示如何配置VLAN间路由。

假设我们有以下几个要求:1. 划分三个VLAN,分别用于管理、销售和研发部门。

2. 每个VLAN分配一个IP地址段。

3. 不同VLAN之间需要互相通信。

首先,我们需要在路由器或三层交换机上创建三个VLAN,并为每个VLAN分配一个唯一的VLAN ID。

假设我们将管理部门的VLAN ID设置为10,销售部门的VLAN ID设置为20,研发部门的VLAN ID 设置为30。

接下来,我们需要在交换机上将各个端口划分到相应的VLAN中。

比如,将管理部门的端口划分到VLAN 10,销售部门的端口划分到VLAN 20,研发部门的端口划分到VLAN 30。

然后,我们需要为每个VLAN配置IP地址段。

假设管理部门的IP 地址段为192.168.10.0/24,销售部门的IP地址段为192.168.20.0/24,研发部门的IP地址段为192.168.30.0/24。

我们需要将这些IP地址段分别分配给相应的VLAN。

此时,不同的VLAN已经配置完成,但它们之间还无法通信。

接下来,我们需要在路由器或三层交换机上配置VLAN间路由。

首先,我们需要将交换机的某个接口配置为Trunk口,用于连接到路由器或三层交换机的接口。

Trunk口上会承载多个VLAN的数据流量。

然后,我们需要在路由器或三层交换机上配置子接口。

Cisco3560三层交换机VLAN的配置案例文档资料

Cisco3560三层交换机VLAN的配置案例文档资料

段的服务器。
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
3560(config)#access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.7.0 0.0.0.255 3560(config)#access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.10.0 0.0.0.255 3560(config)#access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.11.0 0.0.0.255 3560(config)#access-list 102 permit ip any any 3560(config)#access-list 103 deny ip 192.168.10.0 0.0.0.255 192.168.7.0 0.0.0.255 3560(config)#access-list 103 deny ip 192.168.10.0 0.0.0.255 192.168.8.0 0.0.0.255 3560(config)#access-list 103 deny ip 192.168.10.0 0.0.0.255 192.168.11.0 0.0.0.255 3560(config)#access-list 103 permit ip any any 3560(config)#access-list 104 deny ip 192.168.11.0 0.0.0.255 192.168.7.0 0.0.0.255 3560(config)#access-list 104 deny ip 192.168.11.0 0.0.0.255 192.168.8.0 0.0.0.255 3560(config)#access-list 104 deny ip 192.168.11.0 0.0.0.255 192.168.10.0 0.0.0.255 3560(config)#access-list 104 permit ip any any

配置虚拟局域网(VLAN)

配置虚拟局域网(VLAN)
VXLAN技术
VXLAN技术是一种用于构建 大规模虚拟化网络的协议, 可以解决传统VLAN的限制, 支持更大规模的虚拟化网络

智能化管理
随着AI技术的发展,VLAN的 智能化管理将成为未来的发 展趋势,可以自动识别用户 需求并进行VLAN配置。
VLAN配置在实际应用中的挑战与解决方案
01
兼容性问题
校园网VLAN配置实例
总结词:安全控制
详细描述:校园网VLAN配置需加强网络安 全控制,通过VLAN隔离减少广播风暴和
ARP攻击等网络安全风险。同时,需对校园 网内部用户进行访问控制和流量监控,保障
网络安全和稳定。
校园网VLAN配置实例
总结词:灵活接入
详细描述:校园网用户数量众多,VLAN配置需支持 灵活的接入方式,满足学生和教职工在不同场所的网 络接入需求。可以通过无线局域网和有线局域网等多 种方式接入,提高网络覆盖范围和使用便捷性。
三层交换技术允许交换机在数据链路层处理 IP数据包,从而实现不同VLAN之间的通信 。通过配置三层交换机的VLAN间路由功能 ,可以实现高效且灵活的VLAN间通信。
05
VLAN配置总结
VLAN配置的意义与价值
提高网络安全性
通过将不同的用户或设备划分到 不同的VLAN,可以限制不同用户 之间的访问权限,提高网络安全 性。
园区网VLAN配置实例
总结词:高效互通
详细描述:园区网VLAN配置需确保各部门间的高效互 通,满足园区内各企业、机构间的通信需求。可以通过 合理规划VLAN数量和IP地址范围,优化网络结构和路 由策略,提高网络通信效率和可靠性。
园区网VLAN配置实例
总结词:安全隔离
详细描述:园区网VLAN配置需实现各部门间的安全隔离,降低网络安全风险。可以通过VLAN隔离和访问控制列表等技术手 段,限制不同部门间的通信和访问权限,提高网络安全性和保密性。

Cisco路由器配置实例(经典)

Cisco路由器配置实例(经典)

实训报告实训一路由基本配置1、实验目的:路由器基本配置及ip设置2、拓扑结构图Router0 fa0/0: 192.168.11.1Fa0/1:192.168.1.1Router1 fa0/0: 192.168.11.2Fa0/1:192.168.2.1Znn1:192.168.1.2Znn2:192.168.2.23、实验步骤Router1Router>en 用户模式进入特权模式Router#conf t 特权模式进入全局模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn1 改名字为rznn1rznn1(config)#int fa0/0 进入fa0/0端口rznn1(config-if)#ip add 192.168.11.1 255.255.255.0 设置ip地址rznn1(config-if)#no sh 激活rznn1(config)#int fa0/1rznn1(config-if)#ip add 192.168.1.1 255.255.255.0rznn1(config-if)#no shrznn1(config-if)#exitrznn1(config)#exitrznn1#copy running-config startup-config 保存Destination filename [startup-config]? startup-configrznn1#conf trznn1(config)#enable secret password 222 设置密文rznn1#show ip interface b 显示Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down downrouter 2outer>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host rznn2rznn2(config)#int fa0/0rznn2(config-if)#ip add 192.168.11.2 255.255.255.0rznn2(config-if)#no shrznn2(config)#int fa0/1rznn2(config-if)#ip add 192.168.2.1 255.255.255.0rznn2(config-if)#no shRznn2#copy running-config startup-config 保存Destination filename [startup-config]? startup-configrznn2(config-if)#exitrznn2(config)#exitrznn2#conf trznn2(config)#enable secret 222rznn2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up up FastEthernet0/1 192.168.2.1 YES manual up upVlan1 unassigned YES manual administratively down down实训二1、远程登录、密码设置及验证为路由器开设telnet端口,PC机可以远程登陆到Rznn3(Router 1)拓扑结构图Router0:192.168.1.1Pc:192.168.1.2步骤rznn3>rznn3>enrznn3#conf tEnter configuration commands, one per line. End with CNTL/Z.rznn3(config)#no ip domain lookuprznn3(config)#line cons 0rznn3(config-line)#password znnrznn3(config-line)#loginrznn3(config-line)#no exec-trznn3(config-line)#logg syncrznn3(config-line)#exitrznn3(config)#int fa0/0rznn3(config-if)#ip add 192.168.1.1 255.255.255.0rznn3(config-if)#no shrznn3(config-if)#exitrznn3(config)#line vty 0 4 打通五个端口rznn3(config-line)#password cisco 设置密码rznn3(config-line)#login 保存rznn3(config-line)#exit4、测试:实训三命令组1、目的:八条命令(no ip domain lookup\line cons 0\password\login\no exec-t\logg sync\show version\reload\copy running-config startup-config)\show cdp neighbors)2、拓扑结构图Router0 fa0/0: 192.168.11.1Router1 fa0/0: 192.168.11.23、步骤rznn1#conf tEnter configuration commands, one per line. End with CNTL/Z.1、rznn1(config)#no ip domain lookup 取消域名查找转换2、rznn1(config)#line cons 0 打开cons 0端口3、rznn1(config-line)#password znn 设置密码为znnrznn1(config-line)#login 保存rznn1(config-line)#no exec-t 设置永不超时4、rznn1(config-line)#logg sync 产生日志5、rznn1#show version 显示思科路由系统版本信息Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)Technical Support: /techsupportCopyright (c) 1986-2007 by Cisco Systems, Inc.Compiled Wed 18-Jul-07 06:21 by pt_rel_team6、rznn1#show cdp neighbors 查看路由器连接的相邻路由器的相关信息Capability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDrznn2 Fas 0/0 139 R C2800 Fas 0/07、rznn1#copy running-config startup-config 保存刚才指令Destination filename [startup-config]? startup-configBuilding configuration...[OK]8、rznn1#reload 重启路由器Proceed with reload? [confirm]System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)Copyright (c) 2000 by cisco Systems, Inc.cisco 2811 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memorySelf decompressing the image :########################################################################## [OK] Restricted Rights Legendrznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up upVlan1 unassigned YES manual administratively down down9、rznn1(config-if)#ip add 192.168.3.1 255.255.255.0 重置ip地址rznn1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.3.1 YES manual up up FastEthernet0/1 192.168.1.1 YES manual up up Vlan1 unassigned YES manual administratively down down实训四发现协议1、实训目的通过发现协议显示路由器相邻路由的端口信息2、拓扑结构Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、步骤R1路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#r1(config-if)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.1 YES manual up down FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downR2 路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#conf tEnter configuration commands, one per line. End with CNTL/Z.r2(config)#int fa0/0r2(config-if)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to upr2(config-if)#exitr2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoler2#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.11.2 YES manual up upFastEthernet0/1 192.168.12.1 YES manual up down Vlan1 unassigned YES manual administratively down downR3路由器Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downR1发现邻居r1#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 165 R C2800 Fas 0/0R2发现邻居r2#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr1 Fas 0/0 176 R C1841 Fas 0/0r3 Fas 0/1 130 R C1841 Fas 0/0R3发现邻居r3#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDr2 Fas 0/0 166 R C2800 Fas 0/14、总结show 命令(1)show ip interface b (显示端口ip信息)(2)show version (显示ios版本信息)(3)show running-config (显示刚才使用的命令配置信息)(4)show cdp neighbors (显示发现邻居直连设备信息)(5)show interface (显示所有端口详细信息)实训五静态路由1、实验目的:将不同网段的网络配通(ip route)Ip route语法:ip route 目标地址子网掩码相邻路由器接口地址Show ip route2、试验拓扑:Router0:192.168.11.1Router1:fa0/0 192.168.11.2Fa0/1 192.168.12.1Router2:192.168.12.23、实验步骤:Router1Router>enRouter#conf tRouter(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upr1(config-if)#exitr1(config)#exitr1#show ip interface bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 192.168.11.1 YES manual up downFastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr1#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:.....Success rate is 0 percent (0/5)r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 192.168.12.0 255.255.255.0 192.168.11.2r1(config)#exitr1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:.....Success rate is 0 percent (0/5)r1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 47/62/78 msr1#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.11.0/24 is directly connected, FastEthernet0/0S 192.168.12.0/24 [1/0] via 192.168.11.2Router3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no sh%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up r3(config-if)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#show ip interface bInterface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.12.2 YES manual up up FastEthernet0/1 unassigned YES manual administratively down downVlan1 unassigned YES manual administratively down downr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 192.168.11.0 255.255.255.0 192.168.12.1r3(config)#exitr3#ping 192.168.11.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.2, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msr3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msr3#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 2i - 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 setS 192.168.11.0/24 [1/0] via 192.168.12.1C 192.168.12.0/24 is directly connected, FastEthernet0/04、默认路由Route 1r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#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.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#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 2i - 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 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r1#ping 192.168.12.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/31 msr1#ping 192.168.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 msRoute 3r1>enr1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#no ip route 192.168.12.0 255.255.255.0 192.168.11.2%No matching route to deleter1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#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.11.0/24 is directly connected, FastEthernet0/0r1#conf tEnter configuration commands, one per line. End with CNTL/Z.r1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2r1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoler1#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 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2r3#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms实训六动态路由RIP 协议1、实验目的使用配置动态路由启动Rip协议使用到的命令(router rip/network/show ip protocols/show ip route)2、实验拓扑R1 fa0/0 192.168.11.1R2 fa0/0 192.168.11.2fa0/1 192.168.12.1R3 fa0/0 192.168.12.23、实验步骤R1Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#router ripr1(config-router)#network 192.168.11.0r1(config-router)#exitr1(config)#exitr1#%SYS-5-CONFIG_I: Configured from console by consoleR2Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r2r2(config)#int fa0/0r2(config-if)#ip add 192.168.11.2 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#int fa0/1r2(config-if)#ip add 192.168.12.1 255.255.255.0r2(config-if)#no shr2(config-if)#exitr2(config)#router ripr2(config-router)#network 192.168.11.0r2(config-router)#network 192.168.12.0r2(config-router)#exitr2(config)#exitr2#R3Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host r3r3(config)#int fa0/0r3(config-if)#ip add 192.168.12.2 255.255.255.0r3(config-if)#no shr3(config-if)#exitr3(config)#router ripr3(config-router)#network 192.168.12.0r3(config-router)#exitr3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by console4、实验测试R1r1#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 10 secondsInvalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not set Redistributing: ripDefault version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r1#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.11.0/24 is directly connected, FastEthernet0/0R 192.168.12.0/24 [120/1] via 192.168.11.2, 00:00:24, FastEthernet0/0 r1#ping 192.168.12.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msR2r2#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 21 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1FastEthernet0/1 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.11.0192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r2#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.11.0/24 is directly connected, FastEthernet0/0C 192.168.12.0/24 is directly connected, FastEthernet0/1R3r3#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 15 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:192.168.12.0Passive Interface(s):Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)r3#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 setR 192.168.11.0/24 [120/1] via 192.168.12.1, 00:00:04, FastEthernet0/0 C 192.168.12.0/24 is directly connected, FastEthernet0/0r3#ping 192.168.11.0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.0, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms实训七负载平衡试训目的实现负载平衡实训拓扑R1 fa0/0 192.168.11.1R2 eth0/0/0 192.168.11.2Fa0/0 192.168.12.1Fa0/0 192.168.13.1R3 fa0/0 192.168.12.2Fa0/1 192.168.14.1R4 fa0/0 192.168.13.2Fa0/1 192.168.15.1R5 fa0/0 192.168.14.2Fa0/1 192.168.15.2实训步骤(R1 )r1>enR1#conf tR1(config)#ip route 0.0.0.0 0.0.0.0 192.168.11.2R1(config)#exitr1#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 192.168.11.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 192.168.11.2(R2)r2>enr2(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2r2(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.2r2(config)#exitr2#%SYS-5-CONFIG_I: Configured from console by consoles% Ambiguous command: "s"r2#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 192.168.12.2 to network 0.0.0.0C 192.168.11.0/24 is directly connected, Ethernet0/0/0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.13.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.2[1/0] via 192.168.13.2(R3)r3>enr3#conf tEnter configuration commands, one per line. End with CNTL/Z.r3(config)#ip route 0.0.0.0 0.0.0.0 192.168.12.1r3(config)#exitr3#%SYS-5-CONFIG_I: Configured from console by consoler3#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 192.168.12.1 to network 0.0.0.0C 192.168.12.0/24 is directly connected, FastEthernet0/0C 192.168.14.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.12.1(R4)r4>enr4#conf tEnter configuration commands, one per line. End with CNTL/Z.r4(config)#ip route 0.0.0.0 0.0.0.0 192.168.13.1r4(config)#exitr4#%SYS-5-CONFIG_I: Configured from console by consoler4#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 192.168.13.1 to network 0.0.0.0C 192.168.13.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.13.1(R5)r5>enr5#conf tEnter configuration commands, one per line. End with CNTL/Z.r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.14.1r5(config)#ip route 0.0.0.0 0.0.0.0 192.168.15.1r5(config)#exitr5#%SYS-5-CONFIG_I: Configured from console by consoler5#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 192.168.14.1 to network 0.0.0.0C 192.168.14.0/24 is directly connected, FastEthernet0/0C 192.168.15.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 [1/0] via 192.168.14.1[1/0] via 192.168.15.1实训测试(R1)r1#ping 192.168.14.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.14.1, timeout is 2 seconds:Success rate is 100 percent (5/5), round-trip min/avg/max = 62/84/94 ms (R5)r5#ping 192.168.11.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds: Success rate is 100 percent (5/5), round-trip min/avg/max = 79/91/94 ms实训八DHCP 协议配置实训目的全网配通实训拓扑Fa0/0 192.168.11.1Fa0/1 192.168.12.1实训步骤Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host r1r1(config)#int fa0/0r1(config-if)#ip add 192.168.11.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#int fa0/1r1(config-if)#ip add 192.168.12.1 255.255.255.0r1(config-if)#no shr1(config-if)#exitr1(config)#ip dhcp pool znn //配置一个根地址池znnr1(dhcp-config)#network 192.168.11.0 255.255.255.0 //为所有客户机动态分配的地址段r1(dhcp-config)#default-router 192.168.11.1 //为客户机配置默认的网关r1(dhcp-config)#dns-server 192.168.11.1 //为客户机配置DNS服务器r1(dhcp-config)#exitr1(config)#ip dhcp pool znn1r1(dhcp-config)#network 192.168.12.0 255.255.255.0r1(dhcp-config)#default-router 192.168.12.1r1(dhcp-config)#dns-server 192.168.12.1r1(dhcp-config)#exit。

实现不同vlan间的通信实验总结

实现不同vlan间的通信实验总结

实现不同vlan间的通信实验总结实现不同VLAN间的通信实验总结VLAN(Virtual Local Area Network)是一种虚拟局域网技术,可以将一个物理局域网划分成多个逻辑上的子网,不同的VLAN之间可以实现隔离和互通。

在实际网络中,VLAN的应用非常广泛,可以提高网络的安全性和灵活性。

本文将介绍如何实现不同VLAN间的通信实验,并总结实验过程中的注意事项和经验。

实验环境:1. 三台交换机(Cisco Catalyst 2960)2. 一台路由器(Cisco 2811)3. 三台PC机实验步骤:1. 配置交换机的VLAN在交换机上创建两个VLAN,分别为VLAN10和VLAN20。

将端口1-4划分到VLAN10,端口5-8划分到VLAN20。

2. 配置路由器的接口在路由器上配置两个子接口,分别为FastEthernet0/0.10和FastEthernet0/0.20。

将FastEthernet0/0.10绑定到VLAN10,将FastEthernet0/0.20绑定到VLAN20。

3. 配置PC机的IP地址将PC1和PC2的IP地址设置为同一网段,如192.168.10.1和192.168.10.2,子网掩码为255.255.255.0。

将PC3的IP地址设置为另一个网段,如192.168.20.1,子网掩码为255.255.255.0。

4. 测试不同VLAN间的通信在PC1上ping PC2的IP地址,可以发现ping通。

在PC1上ping PC3的IP地址,无法ping通。

这说明VLAN10和VLAN20之间是隔离的,PC1只能与同一VLAN内的PC通信。

5. 配置路由器的静态路由在路由器上配置静态路由,将PC1和PC2所在的网段和PC3所在的网段互相路由。

这样就可以实现不同VLAN间的通信。

注意事项:1. 在配置交换机的VLAN时,要确保端口的划分正确,否则会导致通信失败。

2. 在配置路由器的接口时,要确保子接口的VLAN绑定正确,否则会导致通信失败。

VLAN配置基础及实例

VLAN配置基础及实例

3. 增加网络的安全性因为一个VLAN就是一个单独的广播域,VLAN之间相互隔离,这大大提高了网络的利用率,确保了网络的安全保密性。人们在LAN上经常传送一些保密的、关键性的数据。保密的数据应提供访问控制等安全手段。一个有效和容易实现的方法是将网络分段成几个不同的广播组,网络管理员限制了VLAN中用户的数量,禁止未经允许而访问VLAN 中的应用。交换端口可以基于应用类型和访问特权来进行分组,被限制的应用程序和资源一般置于安全性VLAN中。
所连的用户主要分布于四个部分,即:生产部、财务部、信息中心和人事部。主要对这四个部分用户单独划分VLAN,以确保相应部门网络资源不被盗用或破坏。
现为了公司相应部分网络资源的安全性需要,特别是对于像财务部、人事部这样的敏感部门,其网络上的信息不想让太多人可以随便进出,于是公司采用了 VLAN的方法来解决以上问题。
5. 按策略划分VLAN
基于策略组成的VLAN能实现多种分配方法,包括VLAN交换机端口、MAC地址、IP地址、网络层协议等。网络管理人员可根据自己的管理模式和本单位的需求来决定选择哪种类型的VLAN 。
6. 按用户定义、非用户授权划分VLAN
基于用户定义、非用户授权来划分VLAN,是指为了适应特别的VLAN网络,根据具体的网络用户的特别要求来定义和设计VLAN,而且可以让非VLAN群体用户访问VLAN,但是需要提供用户密码,在得到VLAN管理的认证后才可以加入一个VLAN。
一、VLAN基础
VLAN(Virtual Local Area Network)的中文名为"虚拟局域网",注意不是"VPN"(虚拟专用网)。VLAN是一种将局域网设备从逻辑上划分(注意,不是从物理上划分)成一个个网段,从而实现虚拟工作组的新兴数据交换技术。这一新兴技术主要应用于交换机和路由器中,但主流应用还是在交换机之中。但又不是所有交换机都具有此功能,只有VLAN协议的第三层以上交换机才具有此功能,这一点可以查看相应交换机的说明书即可得知。

思科模拟器虚拟局域网(VLAN)配置

思科模拟器虚拟局域网(VLAN)配置

例:某公司建有一个局域网,使用192.168.1.0这个C类地址,公司有财务部、市场部等部门,每个部门有若干台电脑,使用两台交换机连接在一起,其中财务部有两台计算机,分别接在交换机1、交换机2上;市场部有3台计算机,有1台接在交换机1上,有两台接在交换机2上。

根据上面提示,请完成如下实验内容:1.在cisco packet tracer上搭建上述描述的环境。

2.在交换机建立两个vlan,分别命名为finance、market,将财务部的电脑加入finance,将市场部的电脑加入market。

3.测试财务部电脑之间的联通,测试市场部电脑之间的联通,测试财务部机子和市场部机子的连通性。

1、启动cisco packet tracer模拟软件,并按题意布置如下网络拓朴图;2、配置各电脑IP如下,子网掩码均为(255.255.255.0),两交换机均用接Fa0/4端口连接;PC0:192.168.1.1 接Fa0/1 PC1:192.168.1.2 接Fa0/1PC2:192.168.1.11接Fa0/2 PC3:192.168.1.1接Fa0/2 PC4:192.168.1.1接Fa0/3 3、在每个交换机上建立两个VLAN,并分别命名为finance 、market,如下:(1)先给交换机Switch0命名为switch0;先进入特权模式>enable ,再进入全局设置模式>configure terminalSwitch(config)#hostname switch0(2) 在switch0里创建两个VLAN,VLAN 2命名为finance VLAN 3 命名为marketSwitch0(config)#vlan 2Switch0(config-vlan)#name financeSwitch0(config-vlan)#exitSwitch0(config)#vlan 3Switch0(config-vlan)#name marketSwitch0(config-vlan)#exit(3) 将端口加入到VLAN中:Switch0(config)#interface fastEthernet 0/1Switch0(config-if)#switchport access vlan 2Switch0(config-if)#exitSwitch0(config)#interface fastEthernet 0/2Switch0(config-if)#switchport access vlan 3Switch0(config-if)#exit(4) 配置交换机与交换机接口处端口Fa 0/4Switch0(config)#interface fastEthernet 0/4Switch0(config-if)#switchport mode trunkSwitch0(config-if)#exitSwitch0(config)#exitSwitch0#write(5)同理,参照(1)(2)(3)(4)步骤就可配置好另一个交换机;结果:测试财务部电脑之间是联通的,测试市场部电脑之间也是联通的,测试财务部机子和市场部机子是不联通的。

思科路由器配置命令详解及实例

思科路由器配置命令详解及实例

CISCO路由器配置命令详解及实例目录CISCO路由器配置命令详解及实例 (1)第一章:路由器配置基础 (2)一、基本设置方式 (2)二、命令状态 (2)三、设置对话过程 (3)四、常用命令 (5)五、配置IP寻址 (6)六、配置静态路由 (8)第二章:广域网协议设置 (8)一、HDLC (8)二、PPP (11)三、x.25 (12)四、Frame Relay (15)五. Cisco765M通过ISDN拨号上263 (18)六、PSTN (19)第三章:路由协议设置 (30)一、RIP协议 (30)三、OSPF协议 (31)四、重新分配路由 (34)五、IPX协议设置 (36)第四章:服务质量及访问控制 (37)一、协议优先级设置 (37)二、队列定制 (38)三、访问控制 (38)第五章:虚拟局域网(VLAN)路由 (39)一、虚拟局域网(VLAN) (39)二、交换机间链路(ISL)协议 (39)三、虚拟局域网(VLAN)路由实例 (39)第六章:知识参考 (44)一、路由器初始化 (44)二、IP分配 (45)第一章:路由器配置基础一、基本设置方式一般来说,可以用5种方式来设置路由器:1.Console口接终端或运行终端仿真软件的微机;2.AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;3.通过Ethernet上的TFTP服务器;4.通过Ethernet上的TELNET程序;5.通过Ethernet上的SNMP网管工作站。

但路由器的第一次设置必须通过第一种方式进行,此时终端的硬件设置如下:波特率:9600数据位:8停止位:1奇偶校验: 无二、命令状态1. router>路由器处于用户命令状态,这时用户可以看路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。

2. router#在router>提示符下键入enable,路由器进入特权命令状态router#,这时不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。

如何设置电脑的虚拟局域网(VLAN)间路由

如何设置电脑的虚拟局域网(VLAN)间路由

如何设置电脑的虚拟局域网(VLAN)间路由随着网络规模的扩大和复杂性的增加,网络管理员面临着越来越多的挑战。

虚拟局域网(VLAN)技术为网络管理员提供了一种灵活的方式来划分网络,并实现更好的网络管理和资源隔离。

在一个拥有多个VLAN的网络中,如何设置VLAN间的路由是一个重要的问题。

本文将介绍如何设置电脑的虚拟局域网(VLAN)间路由。

一、VLAN基础知识在开始介绍如何设置VLAN间路由之前,我们首先来了解一些VLAN的基础知识。

1. VLAN的定义虚拟局域网(Virtual Local Area Network,VLAN)是指通过逻辑手段将一个局域网(LAN)划分为多个虚拟的独立子网,每个子网之间逻辑上互不相通。

它可以将不同的用户或设备分组到不同的虚拟子网中,实现不同子网间的隔离和安全性。

2. VLAN的优势使用VLAN技术可以带来以下优势:- 灵活性:可以根据需要随时对网络进行重新划分,而无需进行物理线缆的更改。

- 安全性:通过VLAN的划分,可以将不同安全级别的设备和用户隔离开来,提高网络的安全性。

- 性能优化:VLAN可以降低广播和碰撞的数量,提高网络的性能和可靠性。

- 简化管理:将网络划分为多个VLAN后,可以更方便地管理网络设备和服务。

二、设置VLAN间路由的方法在设置VLAN间路由之前,需要确保网络设备(如交换机)支持VLAN功能,并已正确配置。

1. 配置交换机第一步是通过交换机来实现VLAN的划分和路由功能。

具体步骤如下:a. 登录到交换机的管理界面。

b. 创建VLAN:在交换机上创建需要的VLAN,并配置每个VLAN 的接口成员。

可以根据需求将不同接口划分到不同的VLAN中。

c. 配置VLAN间路由:在交换机上启用VLAN间路由功能,允许不同VLAN之间的通信。

配置交换机的IP地址和默认网关,确保不同VLAN能够相互访问。

2. 配置路由器第二步是配置路由器,使其能够实现不同VLAN之间的通信。

思科VTP配置和VLAN间路由

思科VTP配置和VLAN间路由
4、在交换机上生成VLAN 10,VLAN 20,把F0/5划入VLAN 10,把F0/10划入VLAN 20。
5、按照图示配置路由器的F0/0、F0/1的IP地址,并启用这两个端口
6、想一想交换机与路由器相连的两个端口应该怎么设置?为什么?
7、要让PCA和PCB通信,必须分别把PCA,PCB的网关设为什么?
网络拓扑图如下:
1、按上图连好线。(假设PCA接入交换机的F0/5,PCB接入交换机的F0/10,路由器的F0/0接入交换机的F0/1,设备原有的配置。
3、设置PCA的IP为192.168.1.5/24;设置PCB的IP为192.168.2.5/24
2、清空交机上的配置。
3、相看交换机的初始VTP状态:
域名为空,模式为服务器。
4、设置SWA为VTP SERVER模式,域名为ABC,密码为123。
5、在SWA上配置VLAN 10,20
6、设置SWB的VTP模式为CLIENT,域名为ABC,密码为123。
7、查看SWB上的VLAN
可以看到在SWA上生成的VLAN 10,20已经传播到SWB上。
封装dot1q vlan 10
[Router-Ethernet0.1]vlan-type dot1q vid 10
其余命令类同思科。
在交换机上生成VLAN 10,VLAN 20,把F0/5划入VLAN 10,把F0/10划入VLAN 20。
下面重点讲解路由器子接口的配置
4、在路由器上的物理接口F0/0上生成子接口F0/0.1
Router(config)#interface f0/0.1
在f0/0/.1上封装VLAN 10
Router(config-subif)#encapsulation dot1q 10
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CISCO路由器虚拟局域网(VLAN)路由实例3.1. 例一:设备选用Catalyst5500交换机1台,安装WS-X5530-E3管理引擎,多块WS-X5225R及WS-X5302路由交换模块,WS-X5302被直接插入交换机,通过二个通道与系统背板上的VLAN 相连,从用户角度看认为它是1个1接口的模块,此接口支持ISL。

在交换机内划有3个虚拟网,分别名为default、qbw、rgw,通过WS-X5302实现虚拟网间路由。

以下加重下横线部分,如set system name 5500C为需设置的命令。

设置如下:Catalyst 5500配置:beginset password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70set prompt Console>set length 24 defaultset logout 20set banner motd ^C^C!#systemset system baud 9600set system modem disableset system name 5500Cset system locationset system contact!#ipset interface sc0 1 10.230.4.240 255.255.255.0 10.230.4.255 set interface sc0 upset interface sl0 0.0.0.0 0.0.0.0set interface sl0 upset arp agingtime 1200set ip redirect enableset ip unreachable enableset ip fragmentation enableset ip route 0.0.0.0 10.230.4.15 1set ip alias default 0.0.0.0!#Command alias!#vtpset vtp domain hneset vtp mode serverset vtp v2 disableset vtp pruning disableset vtp pruneeligible 2-1000clear vtp pruneeligible 1001-1005set vlan 1 name default type ethernet mtu 1500 said 100001 state activeset vlan 777 name rgw type ethernet mtu 1500 said 100777 state activeset vlan 888 name qbw type ethernet mtu 1500 said 100888 state activeset vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state activeset vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active bridge 0x0 stp ieeeset vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active bridge 0x0 stp ibmset vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state active parent 0 ring 0x0 mode srb aremaxhop 7 stemaxhop 7!#set boot commandset boot config-register 0x102set boot system flash bootflash:cat5000-sup3.4-3-1a.bin!#module 1 : 2-port 1000BaseLX Supervisorset module name 1set vlan 1 1/1-2set port enable 1/1-2!#module 2 : empty!#module 3 : 24-port 10/100BaseTX Ethernet set module name 3set module enable 3set vlan 1 3/1-22set vlan 777 3/23set vlan 888 3/24set trunk 3/1 on isl 1-1005#module 4 empty!#module 5 empty!#module 6 : 1-port Route Switchset module name 6set port level 6/1 normalset port trap 6/1 disableset port name 6/1set cdp enable 6/1set cdp interval 6/1 60set trunk 6/1 on isl 1-1005!#module 7 : 24-port 10/100BaseTX Ethernet set module name 7set module enable 7set vlan 1 7/1-22set vlan 888 7/23-24set trunk 7/1 on isl 1-1005set trunk 7/2 on isl 1-1005!#module 8 empty!#module 9 empty!#module 10 : 12-port 100BaseFX MM Ethernet set module name 10set module enable 10set vlan 1 10/1-12set port channel 10/1-4 offset port channel 10/5-8 offset port channel 10/9-12 offset port channel 10/1-2 onset port channel 10/3-4 onset port channel 10/5-6 onset port channel 10/7-8 onset port channel 10/9-10 onset port channel 10/11-12 on#module 11 empty!#module 12 empty!#module 13 empty!#switch port analyzer!set span 1 1/1 both inpkts disableset span disable!#camset cam agingtime 1-2,777,888,1003,1005 300 end5500C> (enable)WS-X5302路由模块设置:Router#wri tBuilding configuration...Current configuration:!version 11.2no service password-encryptionno service udp-small-serversno service tcp-small-servers!hostname Router!enable secret 5 $1$w1kK$AJK69fGOD7BqKhKcSNBf6. !ip subnet-zero!interface Vlan1ip address 10.230.2.56 255.255.255.0!interface Vlan777ip address 10.230.3.56 255.255.255.0!interface Vlan888ip address 10.230.4.56 255.255.255.0!no ip classless!line con 0line aux 0line vty 0 4password routerlogin!endRouter#3.1. 例二:交换设备仍选用Catalyst5500交换机1台,安装WS-X5530-E3管理引擎,多块WS-X5225R在交换机内划有3个虚拟网,分别名为default、qbw、rgw,通过Cisco3640路由器实现虚拟网间路由。

交换机设置与例一类似。

路由器Cisco3640,配有一块NM-1FE-TX模块,此模块带有一个快速以太网接口可以支持ISL。

Cisco3640快速以太网接口与交换机上的某一支持ISL的端口实现连接,如交换机第3槽第1个接口(3/1口)。

Router#wri tBuilding configuration...Current configuration:!version 11.2no service password-encryptionno service udp-small-serversno service tcp-small-servers!hostname Router!enable secret 5 $1$w1kK$AJK69fGOD7BqKhKcSNBf6.!ip subnet-zero!interface FastEthernet1/0!interface FastEthernet1/0.1encapsulation isl 1ip address 10.230.2.56 255.255.255.0 !interface FastEthernet1/0.2 encapsulation isl 777ip address 10.230.3.56 255.255.255.0 !interface FastEthernet1/0.3encapsulation isl 888ip address 10.230.4.56 255.255.255.0 !no ip classless!line con 0line aux 0line vty 0 4password routerlogin!endRouter#。

相关文档
最新文档