HCIP second day

HCIP second day

VLAN experiment (Huawei ensp)

1. Experimental topology and requirements

Insert picture description here

2. Experimental analysis

1. PC1 and PC3 are access interfaces, and they are both in VLAN 2. Therefore, if the remaining hosts are not in the same network segment, they are implemented through sub-interfaces.
2. PC2/4/5/6 are all in the same network segment and have permission settings, the interface type can be implemented in mixed mode.
3. All traffic between switches needs to pass, so set its interface type to trunk mode to allow all VLANs to pass.
4. On the interface of the router connected to SW1, tag the VLAN2 traffic, and redirect the traffic to the sub-interface. The remaining traffic is set to go to the physical interface without being tagged.

Three, the main configuration ideas of the experiment

1. Add vlan, add vlan to the corresponding interface, modify the allowable list and PVID.
Note: Because pc1 and 3 are in the same network segment and are also in access mode, they need to rely on routers to access other network segments, pc2, 4, and 5 , 6 are the same; but pc2 can access 4, 5, 6, and 4 can access 5, but not 6 (here, 4 and 5 can not access 6, so you can add pc1 and 3 to vlan2; pc2 vlan3; pc4, 5 are assigned to vlan4; pc6 is assigned to vlan5. Or if 4 cannot access 6, but 5 can access 6, then 4 and 5 should be divided into different vlans, that is, pc2, 4, 5, and 6 belong to one each vlan (vlan3, 4, 5, 6));

2. When vlan3, 4, and 5 go to the router through sw1, because the physical interface of the router does not distinguish vlan, so the interface of sw1 to the router should remove the labels from vlan3, 4, and 5, and converge into one at a time. It will be gathered to the physical interface, and then when going out from the physical interface, it will have the label of vlan1, and vlan1 is the vlan allowed by all road sections and can reach all hosts. When vlan2 goes to the router through sw1, it needs to be distinguished from the former. Therefore, the interface of the outgoing router of sw1 carries the traffic of vlan2 with a label and aggregates it to the router sub-interface that identifies the vlan. Then it comes out of the router and also carries vlan2 label

3. Configure dhcp on the router to allow all hosts to obtain corresponding addresses

Four, verification

① The addresses of pc6, 5, 4, and 2 are respectively 192.168.1.251 252 253 254, as shown in the figure below
(this host is pc2)
Insert picture description here
②pc6 can not ping pc4, 5 (this host is pc6)
Insert picture description here
③The addresses of pc3 and 1 are 192.168.2.253 192.168.2.254 respectively ; (If you want to ping pc2, 4, 5, 6, because you need to pass the router, so the ttl value is 127) The verification is as follows: (here, pc6 is selected to represent ping pc3, 1)
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45050702/article/details/112689811