当前位置:网站首页>VLAN experiment
VLAN experiment
2022-07-05 06:26:00 【Lucky_ Lu0】
One 、 The experimental requirements

Two 、 The topology

3、 ... and 、 Experimental configuration
1. To configure sw1
It can be seen from the picture that pc1,pc3 stay vlan2 And the interface mode is access Interface
take sw1 Upper 0/0/2 The interface is divided into vlan2
[sw1]vlan batch 2
[sw1]int e 0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 2
because pc2/4/5/6 In the same segment , And pc2 Access to 456,4 and 5 Cannot access 6,0/0/3 The interface is divided into vlan3, allow vlan3/4/5 Get into
[sw1] vlan batch 3 to 5
[sw1-Ethernet0/0/4]int e 0/0/3
[sw1-Ethernet0/0/3]port hybrid pvid vlan 3
[sw1-Ethernet0/0/3]port hybrid untagged vlan 3 to 5
because pc1/3 And 2/4/5/6 Not in the same network segment , And all pc All equipment must pass dhcp obtain ip, therefore 0/0/4 The interface to vlan2 Put a label on it ,vlan3/4/5 Without a label
[sw1]int e 0/0/4
[sw1-Ethernet0/0/4]port hybrid tagged vlan 2
[sw1-Ethernet0/0/4]port hybrid untagged vlan 3 to 5
e0/0/5 Interface for trunk Plank road
[sw1-Ethernet0/0/3]int e 0/0/5
[sw1-Ethernet0/0/5]port link-type trunk
[sw1-Ethernet0/0/5]port trunk allow-pass vlan 2 to 5
2. To configure sw2
e0/0/1 by trhunk Plank road , Use hybrid mode
[sw2]vlan batch 3 to 5
[sw2]int e 0/0/1
[sw2-Ethernet0/0/1]port hybrid tagged vlan 2 to 5
e0/0/3 Interface for access The interface is divided into vlan2, because pc2 Access to pc456, So allow vlan3/4/5 Get into
[sw2]vlan 2
[sw2-vlan2]int e 0/0/3
[sw2-Ethernet0/0/3]port link-type access
[sw2]vlan batch 3 to 5
e0/0/4 into vlan4, because pc4 and pc5 Cannot access 6, therefore pc4 and pc5 into vlan4, And allow vlan3/4 Get into , Don't allow vlan5 Get into
[sw2-Ethernet0/0/1]int e 0/0/4
[sw2-Ethernet0/0/4]port hybrid pvid vlan 4
[sw2-Ethernet0/0/4]port hybrid untagged vlan 3 to 4
e0/0/2 by trunk Plank road
[sw2-Ethernet0/0/4]int e 0/0/2
[sw2-Ethernet0/0/2]port link-type trunk
[sw2-Ethernet0/0/2]port trunk allow-pass vlan 2 to 5
3. To configure sw3
e0/0/1 For hybrid mode ,trunk Plank road
[sw3] vlan batch 2 to 5
[sw3]int e 0/0/1
[sw3-Ethernet0/0/1]port hybrid tagged vlan 2 to 5
e0/0/2 into vlan4, allow vlan3/4 Get into , Don't allow vlan5 Get into
[sw3-Ethernet0/0/1]int e 0/0/2
[sw3-Ethernet0/0/2]port hybrid pvid vlan 4
[sw3-Ethernet0/0/2]port hybrid untagged vlan 3 to 4
because pc4pc5 Cannot access pc6, therefore e0/0/3 into vlan5, allow vlan3/5 Get into
[sw3-Ethernet0/0/2]int e 0/0/3
[sw3-Ethernet0/0/3]port hybrid pvid vlan 5
[sw3-Ethernet0/0/3]port hybrid untagged vlan 3 5
4. Configure router
because vlan3/4/5 No label , So the vlan3/4/5 Transfer in g0/0/0 Physical interface , hold vlan2 Transfer in g0/0/0.1 A subinterface
To configure g0/0/0 Interface ip
[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.254 24
Transfer in sub interface
[Huawei]int g 0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]dot1q termination vid 2
[Huawei-GigabitEthernet0/0/0.1]arp broadcast enable
Turn on dhcp Division of services dhcpIP pond
vlan2
[Huawei]dhcp enable
[Huawei]ip pool vlan2
[Huawei-ip-pool-vlan2]network 192.168.1.0 mas
[Huawei-ip-pool-vlan2]network 192.168.1.0 mask 24
[Huawei-ip-pool-vlan2]gateway-list 192.168.1.254
[Huawei-ip-pool-vlan2]dns-list 114.114.114.114
vlan345
[Huawei]ip pool vlan345
[Huawei-ip-pool-vlan345]network 192.168.2.0 mask 24
[Huawei-ip-pool-vlan345]gateway-list 192.168.2.254
[Huawei-ip-pool-vlan345]dns-list 114.114.114.114
take vlan2dhcp Ponds are used in g0/0/0.1 Interface
[Huawei-GigabitEthernet0/0/0]int g 0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]dhcp select globaltake vlan345 Apply to g0/0/0 Interface
[Huawei-ip-pool-vlan345]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
stay pc1 Check out ip Acquisition

To be successful
pc2

To be successful
边栏推荐
- Leetcode dynamic programming
- 高斯消元 AcWing 884. 高斯消元解异或线性方程组
- Game theory acwing 892 Steps Nim game
- MQClientException: No route info of this topic: type_ topic
- Currently clicked button and current mouse coordinates in QT judgment interface
- 阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长
- Leetcode backtracking method
- Stack acwing 3302 Expression evaluation
- 1.14 - assembly line
- How to generate an image from text on fly at runtime
猜你喜欢

Alibaba's new member "Lingyang" officially appeared, led by Peng Xinyu, Alibaba's vice president, and assembled a number of core department technical teams

2021apmcm post game Summary - edge detection

P2575 master fight
![[moviepy] unable to find a solution for exe](/img/0a/4841f53cedc1333654b9443e406f4c.jpg)
[moviepy] unable to find a solution for exe

Design specification for mobile folding screen

Quickly use Amazon memorydb and build your own redis memory database
![[wustctf2020] plain_ WP](/img/66/fdf7649359f36444703ff2279562e6.jpg)
[wustctf2020] plain_ WP

Install opencv -- CONDA to establish a virtual environment and add the kernel of this environment in jupyter

Stack acwing 3302 Expression evaluation

博弈论 AcWing 892. 台阶-Nim游戏
随机推荐
Traversal of leetcode tree
MySQL advanced part 1: index
Game theory acwing 891 Nim games
Niu Mei's math problems
Usage scenarios of golang context
[BMZCTF-pwn] ectf-2014 seddit
容斥原理 AcWing 890. 能被整除的数
[rust notes] 16 input and output (Part 2)
[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
NotImplementedError: Cannot convert a symbolic Tensor (yolo_boxes_0/meshgrid/Size_1:0) to a numpy ar
2021apmcm post game Summary - edge detection
Sword finger offer II 058: schedule
栈 AcWing 3302. 表达式求值
Leetcode-3: Longest substring without repeated characters
5. Oracle TABLESPACE
Paper reading report
RecyclerView的应用
MySQL advanced part 2: optimizing SQL steps
MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理
P2575 master fight