单臂路由实现VLAN间通信

简介:

            单臂路由实现VLAN间通信

  实验要求

      vlan 10  网段 192.168.10.0

             pc0      192.168.10.2

      vlan 20  网段 192.168.20.0

             pc1      192.168.20.2

实验使用路由器实现单臂膀路由

   拓扑

    

  S交换机配置

Switch(config)#vlan 10

Switch(config-vlan)#int f0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch(config-if)#no shutdown

Switch(config)#vlan 20

Switch(config-vlan)#int f0/2

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 20

Switch(config-if)#no shutdown

Switch(config)#int f0/24

Switch(config-if)#switchport mode trunk

Switch(config-if)#no shutdown

 

R路由器配置

Router(config)#int f0/0

Router(config-if)#no shutdown

Router(config-if)#int f0/0.1

Router(config-subif)#encapsulation dot1Q 10

Router(config-subif)#ip address 192.168.10.1 255.255.255.0

Router(config-subif)#no shutdown

Router(config-subif)#int f0/0.2

Router(config-subif)#encapsulation dot1Q 20

Router(config-subif)#ip address 192.168.20.1 255.255.255.0

Router(config-subif)#no shutdown 

测试 

  把pc0IP设为 192.168.10.2

网关: 192.168.10.1

  pc1IP设为 192.168.20.2

网关: 192.168.20.1

 

  使用pc1 ping pc0

  

 

实验二  使用三层交换机实现单臂路由

拓朴图

    

三层交换机配置代码

划分VLAN

Switch(config)#vlan 10

Switch(config-vlan)#int f0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch(config-if)#exit

Switch(config)#vlan 20

Switch(config-vlan)#int f0/2

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 20

Switch(config-if)#exit

配置三层交换

 Switch(config)#ip routing  //开启路由功能

Switch(config)#int vlan 10

Switch(config-if)#no shutdown

Switch(config-if)#ip address 192.168.10.1 255.255.255.0

Switch(config-vlan)#int vlan 20

Switch(config-if)#no shutdown

Switch(config-if)#ip address 192.168.20.1 255.255.255.0

Switch(config-if)#exit

测试

 由pc1 ping pc0

 










本文转自 guodong810 51CTO博客,原文链接:http://blog.51cto.com/guodong810/1048690,如需转载请自行联系原作者
目录
相关文章
|
5月前
|
网络协议 网络虚拟化 网络架构
单臂路由实现VLAN间路由
本文介绍了单臂路由实现VLAN间路由的配置方法,包括网络设备的IP配置、交换机的VLAN划分、路由器的子接口配置以及ARP广播的设置,并通过ping测试验证了配置的正确性。
单臂路由实现VLAN间路由
|
9月前
|
安全 网络虚拟化 网络架构
vlan 单臂路由 三层交换
vlan 单臂路由 三层交换
|
8月前
|
网络协议 网络虚拟化 网络架构
实现VLAN间通信
实现VLAN间通信
|
网络虚拟化 网络架构
单臂路由和三层交换
单臂路由和三层交换
97 0
|
监控 网络虚拟化
三层交换机实现VLAN间路由通信
三层交换机实现VLAN间路由通信
175 2
|
网络协议 网络虚拟化 网络架构
单臂路由实现VLAN间相互通信
单臂路由实现VLAN间相互通信
216 0
|
网络协议 安全 网络虚拟化
[ 网络协议篇 ] vlan 详解之 单臂路由 详解
[ 网络协议篇 ] vlan 详解之 单臂路由 详解
989 0
[ 网络协议篇 ] vlan 详解之 单臂路由 详解
|
网络协议 网络虚拟化 网络架构
单臂路由
臂路由技术实现了不同vlan之间进行通信用户与服务器处于不同vlan,如何才能让用户能够访问服务器呢?方案一:使用一根网线,两端分别插在两个vlan下的接口方案二:借助路由器的路由功能实现vlan通信单臂路由:单臂路由技术能让路由器的一根物理接口对应不同vlan数据的实质是把物理接口分成若干个子接口,这些子接口通过封装802.1q标识,以识别不同vlan的TAG标识配置:1) 对交换机运行vlan和trunk配置2) 创建路由子接口: int g0/0/0.103) 给子接口配置IP地址4) 把子接口封装对应vlan的dot 1q标记:dot 1q termination 为了方便管理网络,根
|
网络协议 网络虚拟化 网络架构
单臂路由与VLAN
单臂路由与VLAN
4777 0
|
网络协议 网络虚拟化 网络架构

热门文章

最新文章