路由与VLAN

本文详细介绍了VLAN的概念、优势以及不同类型的VLAN,包括静态和动态VLAN的配置方法。通过故障排除和分层检查,展示了VLAN在分割广播域、增强网络安全性、简化管理中的作用。此外,还探讨了Trunk在交换网络中的应用,以及802.1q标准在VLAN标识中的应用。通过实例展示了如何配置VLAN和Trunk,确保了不同VLAN间的数据通信。
摘要由CSDN通过智能技术生成

故障排除

分层检查

从物理检查,查看端口状态来排除接口线缆等问题
查看ip地址和路由等的配置是否正确

分段检查

VLAN 概述与优势

(VLAN:虚拟从局域)
分割广播域、物理分割、逻辑分割

VLAN的优势

分割广播、增强网络安全性、简化网络管理

VLAN的种类

静态VLAN

静态VLAN也称基础端口的VLAN,是目前最常见的VLAN实现方式。

动态VLAN

基于Mac地址划分动态VLAN

静态VLAN的配置

VLAN的范围:华为 1-4094
##在交换机上配置静态VLAN的步骤
创建VLAN
将交换机的端口加入到相应的VLAN中
验证VLAN的配置
VLAN10/20:命令
dis vlan:查看VLAN信息
vlan batch 30/40:同时创建30和40
vlan batch 11to15:创建1-15个
port link-thpe access:连接主机和路由器用access
poyt default vlan:把1接口设置vldn
display port vlan:查看所有接口的模式和对应vlan
port-group caiwu:将接口组起名为caiwu也可以是1-32的数字
group-membere0/0/1 e0/0/3:将e0/0/1和e0/0/3加入caiwu组
dot1q terminationvlan10 :在vlan10打个标识
arp broadcast enable:开广播

Trunk的作用

如何实现交换机之间的vlan通信
为每一个vlan提供
只使用一条线路实现

交换网络中的链路

接入链路:通常属于一个vlan
中继链路:可以承载多个vlan

VLAN的标识

802.1q规定了公有的标记方法,其他厂商的产品也支持这种标记方法。链路双方的设备使用相同的标记方法。

IEEE802.1q

作业

1

在这里插入图片描述
r1
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn r1
[r1]int loop
[r1]int LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 32
[r1-LoopBack0]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.10.1 24
Apr 6 2021 20:07:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.20.1 24
Apr 6 2021 20:07:48-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]q
[r1]ip ro
[r1]ip route
[r1]ip route-static 3.3.3.3 32 192.168.10.2
[r1]ip ro
[r1]ip route
[r1]ip route-static 2.2.2.2 32 192.168.20.2
[r1]
[r1]
[r1]ping 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=20 ms

— 3.3.3.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/30/70 ms

[r1]ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=10 ms

— 2.2.2.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/30/70 ms

[r1]
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int loo
[r1]int LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 32
[r1-LoopBack0]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.10.1 24
Apr 6 2021 20:38:08-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.20.1 24
Apr 6 2021 20:38:34-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sys
Enter system view, return user view with Ctrl+Z.
[r1]ip ro
[r1]ip route-s
[r1]ip route-static 2.2.2.2 32 192.168.20.2
[r1]ip ro
[r1]ip route
[r1]ip route-static 3.3.3.3 32 192.168.10.2
[r1]
[r1]
[r1]ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=10 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms

— 2.2.2.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/20/30 ms

[r1]ping 3.3.3.3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=10 ms

— 3.3.3.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/20/30 ms
[r2]
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int loo
[r2]int LoopBack 0
[r2-LoopBack0]ip add 2.2.2.2 32
[r2-LoopBack0]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.30.1
^
Error:Incomplete command found at ‘^’ position.
[r2-GigabitEthernet0/0/0]ip.add 192.168.30.1 24
^
Error: Unrecognized command found at ‘^’ position.
[r2-GigabitEthernet0/0/0]ip add 192.168.30.1 24
Apr 6 2021 20:41:33-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.20.2
^
Error:Incomplete command found at ‘^’ position.
[r2-GigabitEthernet0/0/1]ip add 192.168.20.2 24
Apr 6 2021 20:42:24-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface Gi

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值