首页 技术 正文
技术 2022年11月17日
0 收藏 924 点赞 3,031 浏览 1360 个字

单臂路由实现不同vlan间通信

拓扑图

PC配置

PC1 :192.168.1.1vlan10 192.168.1.254
PC2 :192.168.2.1vlan20 192.168.2.254

交换机配置

<Huawei>system-view
[Huawei]vlan 10
[Huawei]vlan 20
[Huawei]interface Eth 0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 10
[Huawei-Ethernet0/0/2]quit[Huawei]interface Eth 0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 20
[Huawei-Ethernet0/0/3]quit[Huawei]interface Eth 0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all
[Huawei-Ethernet0/0/1]quit

路由器配置

<Huawei>system-view
[Huawei]interface Eth 0/0/0.10
[Huawei-Ethernet0/0/0.10]dot1q termination vid 10
[Huawei-Ethernet0/0/0.10]ip add 192.168.1.254 24
[Huawei-Ethernet0/0/0.10]arp broadcast enable
[Huawei-Ethernet0/0/0.10]quit[Huawei]interface Eth 0/0/0.20
[Huawei-Ethernet0/0/0.20]dot1q termination vid 20
[Huawei-Ethernet0/0/0.20]ip add 192.168.2.254 24
[Huawei-Ethernet0/0/0.20]arp broadcast enable
[Huawei-Ethernet0/0/0.20]quit

测试

PC>ping 192.168.2.1Ping 192.168.2.1: 32 data bytes, Press Ctrl_C to break
From 192.168.2.1: bytes=32 seq=1 ttl=127 time=172 ms
From 192.168.2.1: bytes=32 seq=2 ttl=127 time=93 ms
From 192.168.2.1: bytes=32 seq=3 ttl=127 time=94 ms
From 192.168.2.1: bytes=32 seq=4 ttl=127 time=78 ms
From 192.168.2.1: bytes=32 seq=5 ttl=127 time=78 ms--- 192.168.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 78/103/172 ms
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,103
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,579
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,427
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,199
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,834
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,917