如何配置思科第3层交换机- InterVLAN路由_心灵的触动_百度空间

在一个第三层功能的交换机的端口接口作为第二层访问默认端口的工作,但你也可以设定为路由端口是作为他们正常的路由器接口。 That is, you can assign an IP address directly on the routed port.也就是说,您可以分配一个IP地址的路由端口直接。 Moreover, you can configure also a Switch Vlan Interface ( SVI ) with the “interface vlan” command which acts as a virtual layer 3 interface on the Layer3 switch.此外,你还可以配置交换机VLAN接口接口的VLAN”命令,它作为一个虚拟的第3层的第三层交换机的界面。

On this post I will describe a scenario with a Layer3 switch acting as “Inter Vlan Routing” device together with two Layer2 switches acting as closet access switches.对这个职位,我会介绍了第三层作为VLAN的路由设备与2 2层一起切换开关有秘密情况下接入交换机代理。 See the diagram below:看下面的图:


Interface Fa0/48 of the Layer3 switch is configured as a Routed Port with IP address 10.0.0.1.接口的第三层交换机Fa0/48配置为路由端口与IP地址10.0.0.1Two Vlans are configured on the L3 switch, Vlan10 and Vlan20.两个VLAN的配置在三层交换机,Vlan10Vlan20For Vlan10 we will create an SVI with IP address 10.10.10.10 and for Vlan20 an SVI with IP address 10.20.20.20.对于Vlan10我们将创建与IP地址10.10.10.10Vlan20一个与IP地址10.20.20.20夜蛾的夜蛾。 These two IP addresses will be the default gateway addresses for hosts belonging to Vlan10 and Vlan20 on the Layer2 switches respectively.这两个IP地址将是属于在2层的Vlan10Vlan20主机的默认网关地址分别开关。 That is, hosts connected on Vlan10 on the closet L2 switches will have as default gateway the IP address 10.10.10.10.也就是说,主机连接的壁橱二级交换机将作为默认网关的IP地址10.10.10.10Vlan10Similarly, hosts connected on Vlan20 on the closet switches will have address 10.20.20.20 as their default gateway.同样,主机连接交换机的壁橱地址10.20.20.20将在Vlan20作为它们的默认网关。 Traffic between Vlan10 and Vlan20 will be routed by the L3 Switch (InterVlan Routing). Vlan10Vlan20之间的车辆将被路由的三层交换机(InterVlan路由)。 Also, all interfaces connecting the three switches must be configured as Trunk Ports in order to allow Vlan10 and Vlan20 tagged frames to pass between switches.此外,所有接口连接三个开关必须作为中继端口配置,以便Vlan10Vlan20标记帧交换机之间传递。 Let's see a configuration snapshot for all switches below:让我们看到了下面的所有交换机配置的快照:

Cisco L2 Switch (same configuration for both switches) 思科二级交换机(相同的配置为开关)

!  Create VLANs 10 and 20 in the switch database 创建数据库中的交换机的VLAN 1020
Layer2-Switch# configure terminal  //2
层交换机#配置终端
Layer2-Switch(config)# vlan 10
   //2层交换机(配置)#VLAN10
Layer2-Switch(config-vlan)# end
  //2
层交换机(配置VLAN的)#结束

Layer2-Switch(config)# vlan 20   //2 层交换机(配置)#VLAN20
Layer2-Switch(config-vlan)# end
   //2
层交换机(配置VLAN的)#结束

 

!  Assign Port Fe0/1 in VLAN 10 零价铁分配端口/VLAN 10 1
Layer2-Switch(config)# interface fastethernet0/1   // 2
层交换机(配置)#接口fastethernet0 / 1
Layer2-Switch(config-if)# switchport mode access
   //2
层交换机(配置,如果)#switchport模式访问
Layer2-Switch(config-if)# switchport access vlan 10
   //2层交换机(配置,如果)#switchport访问的VLAN 10
Layer2-Switch(config-if)# end
      //2
层交换机(配置,如果)#结束

 

!  Assign Port Fe0/2 in VLAN 20 零价铁分配端口/VLAN 20 2
Layer2-Switch(config)# interface fastethernet0/2   //2
层交换机(配置)#接口fastethernet0 / 2
Layer2-Switch(config-if)# switchport mode access
   //2
层交换机(配置,如果)#switchport模式访问
Layer2-Switch(config-if)# switchport access vlan 20
   //2层交换机(配置,如果)#switchport访问的VLAN 20
Layer2-Switch(config-if)# end
     //2
层交换机(配置,如果)#结束

!  Create Trunk Port Fe0/24 创建干线港口Fe0/24
Layer2-Switch(config)# interface fastethernet0/24   //2
层交换机(配置)#接口fastethernet0/24
Layer2-Switch(config-if)# switchport mode trunk
   //2
层交换机(配置,如果)#switchport模式主干
Layer2-Switch(config-if)# switchport trunk encapsulation dot1q
   //2层交换机(配置,如果)#switchport主干封装dot1q
Layer2-Switch(config-if)# end
   //2
层交换机(配置,如果)#结束

 

Cisco Layer 3 Switch 思科三层交换机

! Enable Layer 3 routing 使第3层路由
Layer3-Switch(config) # ip routing   //
第三层交换机(配置)#IP路由

 

!  Create VLANs 10 and 20 in the switch database 创建数据库中的交换机的VLAN 1020
Layer3-Switch# configure terminal   //
第三层交换机#配置终端
Layer3-Switch(config)# vlan 10
   //第三层交换机(配置)#VLAN10
Layer3-Switch(config-vlan)# end
   //
第三层交换机(配置VLAN的)#结束

Layer3-Switch(config)# vlan 20 第三层交换机(配置)#VLAN20
Layer3-Switch(config-vlan)# end
第三层交换机(配置VLAN的)#结束

!  Configure a Routed Port for connecting to the ASA firewall 配置连接到在ASA防火墙路由端口
Layer3-Switch(config)# interface FastEthernet0/48   //
第三层交换机(配置)#接口FastEthernet0/48
Layer3-Switch(config-if)# description To Internet Firewall
第三层交换机(配置,如果)#描述Internet防火墙
Layer3-Switch(config-if)# no switchport
第三层交换机(配置,如果)#没有switchport
Layer3-Switch(config-if)# ip address 10.0.0.1 255.255.255.252   //
第三层交换机(配置,如果)#IP地址10.0.0.1 255.255.255.252

!  Create Trunk Ports Fe0/47 Fe0/46 创建中继端口Fe0/47 Fe0/46
Layer3-Switch(config)# interface fastethernet0/47   // 
第三层交换机(配置)#接口fastethernet0/47
Layer3-Switch(config-if)# switchport mode trunk    //
 
第三层交换机(配置,如果)#switchport模式主干
Layer3-Switch(config-if)# switchport trunk encapsulation dot1q
    //第三层交换机(配置,如果)#switchport主干封装dot1q
Layer3-Switch(config-if)# end   //
 
第三层交换机(配置,如果)#结束

 

Layer3-Switch(config)# interface fastethernet0/46    //第三层交换机(配置)#接口fastethernet0/46
Layer3-Switch(config-if)# switchport mode trunk
    //
第三层交换机(配置,如果)#switchport模式主干
Layer3-Switch(config-if)# switchport trunk encapsulation dot1q
   //第三层交换机(配置,如果)#switchport主干封装dot1q
Layer3-Switch(config-if)# end
第三层交换机(配置,如果)#结束

 

!  Configure Switch Vlan Interfaces (SVI) 配置交换机VLAN接口()
Layer3-Switch(config)# interface vlan10   //
第三层交换机(配置)#接口vlan10
Layer3-Switch(config-if)# ip address 10.10.10.10 255.255.255.0  // 
第三层交换机(配置,如果)#IP地址10.10.10.10 255.255.255.0
Layer3-Switch(config-if)# no shut   //
第三层交换机(配置,如果)#没有关闭

Layer3-Switch(config)# interface vlan20 第三层交换机(配置)#接口vlan20
Layer3-Switch(config-if)# ip address 10.20.20.20 255.255.255.0   //
第三层交换机(配置,如果)#IP地址10.20.20.20 255.255.255.0
Layer3-Switch(config-if)# no shut    //
第三层交换机(配置,如果)#没有关闭

 

 

!  Configure default route towards ASA firewall 对抗坏血酸的防火墙配置的默认路由
Layer3-Switch(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2    //
第三层交换机(配置)#IP路由0.0.0.0 0.0.0.0 10.0.0.2

 



郑重声明:资讯 【如何配置思科第3层交换机- InterVLAN路由_心灵的触动_百度空间】由 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库qiyeku.com)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或【在线投诉】,我们审核后将会尽快处理。
—— 相关资讯 ——