vlan实验

vlan2:192.168.1.0/24

vlan3:192.168.2.0/24

使用DHCP,实现全网可达。

第一步、创建vlan

[LSW1]vlan batch 2 to 3
Info: This operation may take a few seconds. Please wait for a moment...done.

[LSW2]vlan batch 2 to 3
Info: This operation may take a few seconds. Please wait for a moment...done.

第二步、划分接口到vlan

[LSW1]interface e0/0/1
[LSW1-Ethernet0/0/1]port link-type access 
[LSW1-Ethernet0/0/1]port default vlan 2

[LSW1]interface e0/0/2
[LSW1-Ethernet0/0/2]port link-type access 
[LSW1-Ethernet0/0/2]port default vlan 2

[LSW1]interface e0/0/3
[LSW1-Ethernet0/0/3]port link-type access 
[LSW1-Ethernet0/0/3]port default vlan 3

[LSW1]interface e0/0/4
[LSW1-Ethernet0/0/4]port link-type access 
[LSW1-Ethernet0/0/4]port default vlan 3
[LSW2]interface e0/0/1
[LSW2-Ethernet0/0/1]port link-type access 
[LSW2-Ethernet0/0/1]port default vlan 2

[LSW2]interface e0/0/2
[LSW2-Ethernet0/0/2]port link-type access 
[LSW2-Ethernet0/0/2]port default vlan 2

[LSW2]interface e0/0/3
[LSW2-Ethernet0/0/3]port link-type access 
[LSW2-Ethernet0/0/3]port default vlan 3

[LSW2]interface e0/0/4
[LSW2-Ethernet0/0/4]port link-type access 
[LSW2-Ethernet0/0/4]port default vlan 3

第三步、修改trunk干道

[LSW1]interface e0/0/5
[LSW1-Ethernet0/0/5]port link-type trunk 
[LSW1-Ethernet0/0/5]port trunk allow-pass vlan all

[LSW2]interface e0/0/5
[LSW2-Ethernet0/0/5]port link-type trunk      
[LSW2-Ethernet0/0/5]port trunk allow-pass vlan all

第四步、修改路由器和交换机之间的接口

[LSW1]interface e0/0/6
[LSW1-Ethernet0/0/6]port link-type trunk 
[LSW1-Ethernet0/0/6]port trunk allow-pass vlan all 

[AR1]interface g0/0/0.1
[AR1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[AR1-GigabitEthernet0/0/0.1]ip address 192.168.1.254 24
[AR1-GigabitEthernet0/0/0.1]arp broadcast enable
[AR1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[AR1]ip pool a
[AR1-ip-pool-a]network 192.168.1.0 mask 24
[AR1-ip-pool-a]gateway-list 192.168.1.254
[AR1-ip-pool-a]q
[AR1]interface g0/0/0.1
[AR1-GigabitEthernet0/0/0.1]dhcp select global

[AR1]interface g0/0/0.2
[AR1-GigabitEthernet0/0/0.2]dot1q termination vid 3
[AR1-GigabitEthernet0/0/0.2]ip address 192.168.2.254 24
[AR1-GigabitEthernet0/0/0.2]arp broadcast enable
[AR1]ip pool b
Info: It's successful to create an IP address pool.
[AR1-ip-pool-b]network 192.168.2.0 mask 24
[AR1-ip-pool-b]gateway-list 192.168.2.254
[AR1-ip-pool-b]q
[AR1]interface g0/0/0.2
[AR1-GigabitEthernet0/0/0.2]dhcp select global

实验完成

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-10 04:44:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-10 04:44:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-10 04:44:02       82 阅读
  4. Python语言-面向对象

    2024-04-10 04:44:02       91 阅读

热门阅读

  1. [C++/Linux] UDP编程

    2024-04-10 04:44:02       34 阅读
  2. 【LeetCode热题100】【二叉树】二叉树的层序遍历

    2024-04-10 04:44:02       42 阅读
  3. 经典面试排序题(快排堆排)

    2024-04-10 04:44:02       33 阅读
  4. SVN(Subversion)代码版本管理

    2024-04-10 04:44:02       34 阅读
  5. linux查看用户登录情况

    2024-04-10 04:44:02       30 阅读
  6. python | ttkbootstrap,一个神奇的 Python 库!

    2024-04-10 04:44:02       34 阅读
  7. Macbook M1版安装安卓模拟器

    2024-04-10 04:44:02       34 阅读
  8. PDF格式解析:Contents stream绘制指令解析

    2024-04-10 04:44:02       37 阅读
  9. 达梦数据库如何开启数据库审计

    2024-04-10 04:44:02       24 阅读