按照下图来组网,采用比较流行的华为交换机和路由器来架设一个VLAN,通过子接口来进行连接。下面是拓扑图和配置命令行:
路由器的配置:
interface Ethernet0/0/0
undo shutdown
#
interface Ethernet0/0/0.1
vlan-type dot1q 2
ip address 192.168.2.1 255.255.255.0
#
interface Ethernet0/0/0.2
vlan-type dot1q 3
ip address 192.168.3.1 255.255.255.0
交换机的配置:
vlan batch 2 to 3
interface Ethernet0/0/1
port link-type access
port default vlan 2
#
interface Ethernet0/0/2
port link-type access
port default vlan 3
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094 |
不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流
GMT+8, 2025-12-20 21:33 , Processed in 0.027396 second(s), 15 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.