ROS軟路由vlan詳細介紹(傳不了具體操作視頻需要的關注私信)

ROS軟路由vlan詳細介紹(傳不了具體操作視頻需要的關注私信)

==========================================

ROS3.30視頻教程集萃(從入門到精通)

==========================================

(基礎篇)

【第十三課】 vlan

什麼是vlan?虛擬局域網,注意一個vlan中的所有的主機都不能與另外一個vlan中的任何主機通信,如果要進行通信,必須有路由。

Ros中vlan如何操作?

官方原話

Vlan is an implementation of the 802.1Q vlan protocol for mikrotik routeros,it allows You to have multiple virtual lans on a single Ethernet or wireless interface,giving the Ability to segregate lans efficiently it supports up to 4095 vlan interfaces,each with A unique vlan ID, per Ethernet device. Vlan priorites may also be used and manipulated. Many routers, including cisco and linux based,and many layer 2 switches use vlan to enable Multiple independent, isolated networks to exist on the same physical network.

A vlan is a logical grouping that allows end users to communicate as if they were physical Connected to a single isolated lan,independent of the physical configuration of the network。Vlan support adds a new dimension of security and cost savings permitting the sharing Of a physical network infrastructure and interfaces/ports while logicall maintaining separation among unrelated users.

實例:2個ros 通過lan接口連接,分別在2個ros上建立vlan1,vlan2 並設置好ip地址,使得他們能通信

ROS1 lan:192.168.1.251

ROS2 lan:192.168.1.252

Ros1中vlan1 id=11 ip:11.11.11.1/24

Vlan2 id=22 ip: 22.22.22.1/24

Ros2中vlan1 id=11 ip:11.11.11.2/24

Vlan2 id=22 ip: 22.22.22.2/24

2個網段可以互相ping通,說明vlan生效,這裡務必要引起注意的就是vlan的ID必須對應上

禁用ros2的一個網段ip,然後ping ros1的同個vlan的ip 不通,然後做個路由,就可以通了!


分享到:


相關文章: