IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> VLAN虚拟局域网配置 -> 正文阅读

[系统运维]VLAN虚拟局域网配置

?第一步

?

交换机上先创建VLAN

[sw1]vlan batch 2 to 10

[sw1]display? vlan 查看vlan

然后交换机上各个接口划分到对应的VLAN中

[sw1]interface Eth0/0/1

[sw1-Ethernet0/0/1]port link-type access??

[sw1-Ethernet0/0/1]port default vlan 2? ?

如图为sw1:

[sw1]port-group group-member Ethernet 0/0/1 to eth	
[sw1]port-group group-member Ethernet 0/0/1 to Ethernet 0/0/2
[sw1-port-group]por
Dec 22 2021 21:58:35-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.
[sw1-Ethernet0/0/1]por
Error: The interface is already a L2 interface.
[sw1-Ethernet0/0/2]por
Error: The interface is already a L2 interface.
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]port link	
[sw1-port-group]port link-	
[sw1-port-group]port link-flap	
[sw1-port-group]port link-type	
[sw1-port-group]port link-flap	
[sw1-port-group]port link-type acc	
[sw1-port-group]port link-type access 
[sw1-Ethernet0/0/1]port link-type access 
[sw1-Ethernet0/0/2]port link-type access 
[sw1-port-group]
Dec 22 2021 21:58:55-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 9, the c
hange loop count is 0, and the maximum number of records is 4095.
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]por	
[sw1-port-group]port	
[sw1-port-group]portswitch	
[sw1-port-group]port-auto-sleep	
[sw1-port-group]port-security	
[sw1-port-group]port-isolate	
[sw1-port-group]port-mirroring	
[sw1-port-group]port de	
[sw1-port-group]port default vlan2
                             ^
Error: Unrecognized command found at '^' position.
[sw1-port-group]port default vlan 2
[sw1-Ethernet0/0/1]port default vlan 2
[sw1-Ethernet0/0/2]port default vlan 2
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]
Dec 22 2021 21:59:25-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 11, the 
change loop count is 0, and the maximum number of records is 4095.
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]q
[sw1]port	
[sw1]portswitch	
[sw1]portal	
[sw1]port-isolate	
[sw1]port-mirroring	
[sw1]port-group grou	
[sw1]port-group group-member eth	
[sw1]port-group group-member Ethernet 0/0/3 to eth	
[sw1]port-group group-member Ethernet 0/0/3 to Ethernet 0/0/4
[sw1-port-group]
Dec 22 2021 22:00:25-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 12, the 
change loop count is 0, and the maximum number of records is 4095.port
                     ^
Error:Incomplete command found at '^' position.
[sw1-port-group]
[sw1-port-group]
[sw1-port-group]port link	
[sw1-port-group]port link-	
[sw1-port-group]port link-flap	
[sw1-port-group]port link-type acc	
[sw1-port-group]port link-type access 
[sw1-Ethernet0/0/3]port link-type access 
[sw1-Ethernet0/0/4]port link-type access 
[sw1-port-group]por	
[sw1-port-group]port de	
[sw1-port-group]port default 
Dec 22 2021 22:00:45-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 14, the 
change loop count is 0, and the maximum number of records is 4095.
                             ^
Error:Incomplete command found at '^' position.
[sw1-port-group]port default vlan 3
[sw1-Ethernet0/0/3]port default vlan 3
[sw1-Ethernet0/0/4]port default vlan 3
[sw1-port-group]
Dec 22 2021 22:00:55-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 16, the 
change loop count is 0, and the maximum number of records is 4095.

如图为sw2:

[sw2]int Eth 0/0/1
[sw2-Ethernet0/0/1]port lin	
[sw2-Ethernet0/0/1]port link-	
[sw2-Ethernet0/0/1]port link-flap	
[sw2-Ethernet0/0/1]port link-type acc	
[sw2-Ethernet0/0/1]port link-type access 	
[sw2-Ethernet0/0/1]port link-type access 
[sw2-Ethernet0/0/1]port de	
[sw2-Ethernet0/0/1]port default 
Dec 22 2021 22:02:00-08:00 sw2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.vl
                                   ^
Error:Incomplete command found at '^' position.
[sw2-Ethernet0/0/1]
[sw2-Ethernet0/0/1]port default vlan 2
[sw2-Ethernet0/0/1]
Dec 22 2021 22:02:10-08:00 sw2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 8, the c
hange loop count is 0, and the maximum number of records is 4095.
[sw2-Ethernet0/0/1]
[sw2-Ethernet0/0/1]
[sw2-Ethernet0/0/1]
[sw2-Ethernet0/0/1]q
[sw2]int eth	
[sw2]int Ethernet 0/0/1
[sw2-Ethernet0/0/1]q
[sw2]int	
[sw2]interface et	
[sw2]interface Eth 0/0/2
[sw2-Ethernet0/0/2]port	
[sw2-Ethernet0/0/2]port lin	
[sw2-Ethernet0/0/2]port link-	
[sw2-Ethernet0/0/2]port link-flap	
[sw2-Ethernet0/0/2]port link-type acc	
[sw2-Ethernet0/0/2]port link-type access 
[sw2-Ethernet0/0/2]port de	
[sw2-Ethernet0/0/2]port default vl	
[sw2-Ethernet0/0/2]port default vlan 3
[sw2-Ethernet0/0/2]
Dec 22 2021 22:02:51-08:00 sw2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 10, the 
change loop count is 0, and the maximum number of records is 4095.
[sw2-Ethernet0/0/2]
[sw2-Ethernet0/0/2]
[sw2-Ethernet0/0/2]

第二步

trunk干道需要VLAN2和VLAN3之间流量互通? 不然传不过去

与路由器之间也要trunk干道

[sw1]interface eth	
[sw1]interface Eth 0/0/6
[sw1-Ethernet0/0/6]por	
[sw1-Ethernet0/0/6]port link	
[sw1-Ethernet0/0/6]port link-	
[sw1-Ethernet0/0/6]port link-flap	
[sw1-Ethernet0/0/6]port link-type trunk
[sw1-Ethernet0/0/6]
Dec 22 2021 22:08:05-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 17, the 
change loop count is 0, and the maximum number of records is 4095.
[sw1-Ethernet0/0/6]
[sw1-Ethernet0/0/6]po	
[sw1-Ethernet0/0/6]port tr	
[sw1-Ethernet0/0/6]port trunk all	
[sw1-Ethernet0/0/6]port trunk allow-pass vlan 2 to 3
[sw1-Ethernet0/0/6]
Dec 22 2021 22:08:25-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 18, the 
change loop count is 0, and the maximum number of records is 4095.
[sw1-Ethernet0/0/6]
[sw1-Ethernet0/0/6]q
[sw1]int	
[sw1]interface eth	
[sw1]interface Eth0/0/5
[sw1-Ethernet0/0/5]por	
[sw1-Ethernet0/0/5]port link	
[sw1-Ethernet0/0/5]port link-	
[sw1-Ethernet0/0/5]port link-flap	
[sw1-Ethernet0/0/5]port link-type tr	
[sw1-Ethernet0/0/5]port link-type trunk 
[sw1-Ethernet0/0/5]por	
[sw1-Ethernet0/0/5]port
Dec 22 2021 22:09:05-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 19, the 
change loop count is 0, and the maximum number of records is 4095.
                        ^
Error:Incomplete command found at '^' position.
[sw1-Ethernet0/0/5]
[sw1-Ethernet0/0/5]por	
[sw1-Ethernet0/0/5]port t	
[sw1-Ethernet0/0/5]port trunk all	
[sw1-Ethernet0/0/5]port trunk allow-pass vlan 2 to 3
[sw1-Ethernet0/0/5]
Dec 22 2021 22:09:15-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 20, the 
change loop count is 0, and the maximum number of records is 4095.

第三步

单臂路由--路由器子接口:

route]interface g0/0/0.1
[route-GigabitEthernet0/0/0.1]dot	
[route-GigabitEthernet0/0/0.1]dot1q ter	
[route-GigabitEthernet0/0/0.1]dot1q termination v	
[route-GigabitEthernet0/0/0.1]dot1q termination vid 
                                                    ^
Error:Incomplete command found at '^' position.
[route-GigabitEthernet0/0/0.1]dot1q termination vid 2
[route-GigabitEthernet0/0/0.1]ip add 192.168.1.254 24
Dec 22 2021 22:20:24-08:00 route %%01IFNET/4/LINK_STATE(l)[0]:The line protocol 
IP on the interface GigabitEthernet0/0/0.1 has entered the UP state. 
[route-GigabitEthernet0/0/0.1]
[route-GigabitEthernet0/0/0.1]
[route-GigabitEthernet0/0/0.1]
[route-GigabitEthernet0/0/0.1]a	
[route-GigabitEthernet0/0/0.1]arp br	
[route-GigabitEthernet0/0/0.1]arp broadcast en	
[route-GigabitEthernet0/0/0.1]arp broadcast enable 
[route-GigabitEthernet0/0/0.1]
[route-GigabitEthernet0/0/0.1]q
[route]int	
[route]interface g	
[route]interface GigabitEthernet 0/0/0.2
[route-GigabitEthernet0/0/0.2]
[route-GigabitEthernet0/0/0.2]
[route-GigabitEthernet0/0/0.2]dot	
[route-GigabitEthernet0/0/0.2]dot1q te	
[route-GigabitEthernet0/0/0.2]dot1q termination v	
[route-GigabitEthernet0/0/0.2]dot1q termination vid 3
[route-GigabitEthernet0/0/0.2]
[route-GigabitEthernet0/0/0.2]ip add 192.168.2.254 24
Dec 22 2021 22:21:15-08:00 route %%01IFNET/4/LINK_STATE(l)[1]:The line protocol 
IP on the interface GigabitEthernet0/0/0.2 has entered the UP state. 
[route-GigabitEthernet0/0/0.2]
[route-GigabitEthernet0/0/0.2]ar	
[route-GigabitEthernet0/0/0.2]arp b	
[route-GigabitEthernet0/0/0.2]arp broadcast en	
[route-GigabitEthernet0/0/0.2]arp broadcast enable 
[route-GigabitEthernet0/0/0.2]

dhcp如下:

[route]ip pool a
Info: It's successful to create an IP address pool.
[route-ip-pool-a]
[route-ip-pool-a]
[route-ip-pool-a]network	
[route-ip-pool-a]network 192.168.1.0 ma	
[route-ip-pool-a]network 192.168.1.0 mask 255.255.255.0
[route-ip-pool-a]
[route-ip-pool-a]gat	
[route-ip-pool-a]gateway-list 192.168.1.1
[route-ip-pool-a]dns	
[route-ip-pool-a]dns-list 192.168.2.20 114.114.114.114
[route-ip-pool-a]q
[route]ip poo	
[route]ip pool b
Info: It's successful to create an IP address pool.
[route-ip-pool-b]net	
[route-ip-pool-b]netbios-type
[route-ip-pool-b]network 192.168.2.0 m 24
[route-ip-pool-b]gat	
[route-ip-pool-b]gateway-list 192.168.2.254
[route-ip-pool-b]dns
                     ^
Error:Incomplete command found at '^' position.
[route-ip-pool-b]dns	
[route-ip-pool-b]dns-list 114.114.114.114
[route-ip-pool-b]q
[route]ip po	
[route]ip policy-based-route
[route]ip pool a
[route-ip-pool-a]undo dns	
[route-ip-pool-a]undo dns-list 192.168.2.20 114.114.114.114
                                            ^
Error:Too many parameters found at '^' position.
[route-ip-pool-a]undo dns	
[route-ip-pool-a]undo dns-list 
                               ^
Error:Incomplete command found at '^' position.
[route-ip-pool-a]undo dns	
[route-ip-pool-a]undo dns-list 192.168.2.20
[route-ip-pool-a]
[route-ip-pool-a]q
[route]int g0/0/0.0
           ^
Error: Wrong parameter found at '^' position.
[route]int g0/0/0.1
[route-GigabitEthernet0/0/0.1]dhc	
[route-GigabitEthernet0/0/0.1]dhcp se	
[route-GigabitEthernet0/0/0.1]dhcp select g	
[route-GigabitEthernet0/0/0.1]dhcp select global 
[route-GigabitEthernet0/0/0.1]q
[route]int g0/0/0.2
[route-GigabitEthernet0/0/0.2]dhc	
[route-GigabitEthernet0/0/0.2]dhcp se	
[route-GigabitEthernet0/0/0.2]dhcp select gl	
[route-GigabitEthernet0/0/0.2]dhcp select global 

结果如图:

PC>ping 192.168.2.253

Ping 192.168.2.253: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.253: bytes=32 seq=2 ttl=127 time=63 ms
From 192.168.2.253: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.2.253: bytes=32 seq=4 ttl=127 time=78 ms
From 192.168.2.253: bytes=32 seq=5 ttl=127 time=63 ms

--- 192.168.2.253 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/70/78 ms

PC>ping 192.168.2.252

Ping 192.168.2.252: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.252: bytes=32 seq=2 ttl=127 time=78 ms
From 192.168.2.252: bytes=32 seq=3 ttl=127 time=63 ms
From 192.168.2.252: bytes=32 seq=4 ttl=127 time=78 ms
From 192.168.2.252: bytes=32 seq=5 ttl=127 time=63 ms

--- 192.168.2.252 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/70/78 ms

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2021-12-23 16:04:59  更:2021-12-23 16:05:32 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/16 5:22:17-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码