Skip to content

通过知识获得解放,通过技术获得自由

Menu
  • 专题目录
  • 液压相关
    • 液压技术
    • 液压相邻技术
    • 液压应用
  • 计算机相关
    • 计算机和软件
    • 网络和网站技术
  • 哲学
  • 关于本站
Menu

网管型交换机的使用[0]

Posted on 2023年11月14日 by

网管型交换机的设置,需要理解交换机的几个核心概念。

由于交换机工作在OSI的第二层(互联网OSI7层模型和TCP/IP五层模型),因此对于工作在第三层的IPv4和IPv6而言都支持。

基本概念:

1)vlan:在软件层面定义的数据链路,相同的vlanID数据是互通的,不同的vlan彼此隔离

2)TAG与UNTAG是指在数据中添加标签与否,用于交换机与外部设备的通讯隔离

3)Truck:指在一个口上复用多个vlanid的网口,能够通过外接设备实现数据的转换

以下设置以水星SG108 Pro 二层管理型交换机为例说明,默认的管理ip=192.168.0.1。

以下分类按照应用场景

  • 用于扩展现有网络的端口数量

此类要求,对于交换机默认的设置即可实现,需要关注的是管理口所在的ip与现有网段的ip兼容,避免冲突即可。

若只是此应用建议直接使用非网管型交换机即可。

  • 通过vlan用于实现不同的网络的隔离

1)进入下数据TAG状态

详细说明见:openwrt的vlan设置和实践

对于进入的数据已经有vlanID且TAG,要求交换机的数据入口需要设置相同的vlanID并且将数据TAG,对于后端设备无需vlan也能够联网的情况,需要在交换机中设置相同的vlanID口上untag数据才可实现。

举例如下:上级路由器openwrt,vlanid=10,数据已经tag,ip网段10.10.50.1/24,通过交换机实现数据的untag供后端的wifi使用(wifi路由器不支持vlan)

设置交换机的管理口原ip=192.168.0.1需要设置成10.10.50.10与上级ip兼容,win10本地的ip=192.168.0.2,网线直接连接

此处会断开原先的网络连接。

win10的网卡设置vlanID=10后,访问http://10.10.50.10能够打开管理界面。

在3-8号口上直接接入wifi无线路由器即可实现此路由器上网,也能直接访问http://10.10.50.10管理界面

 

2)进入的数据UNTAG状态

对于进入数据为UNTAG,只是需要将多个不同的网络的设备在同一个交换机上实现共同的网口扩展,即独立网络公用交换机扩展各自的网口。

 

 

  • 通过vlan实现端口复用

详细说明见:基于树莓派4B的openwrt单臂软路由,此处2号口上有vlan10和vlan20,由于树莓派只有一个有线网口,因此需要在单口上实现数据转换。

 

 

欢迎回来

希望本站对你有所帮助!

如有疑问请联系info@fanlog.org
2023 年 11 月
一二三四五六日
 12345
6789101112
13141516171819
20212223242526
27282930 
« 6 月    

AI辅助 (17)

© 2025 | Powered by Superbs Personal Blog theme
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT