system-view
[Huawei]sysname LSW3
[LSW3]vlan 10
[LSW3-vlan10]quit
LSW3 kommutatorida vlan 20 ni yaratish quyidagicha amalga oshiriladi.
[LSW3]vlan 20
[LSW3-vlan20]quit
Portni bog‘lanish turi sozlanadi va VLAN-larni
portlarga biriktirish
quyidagicha amalga oshiriladi.
[LSW3]interface Ethernet 0/0/1
[LSW3-Ethernet0/0/1]port link-type access
[LSW3-Ethernet0/0/1]port default vlan 10
[LSW3-Ethernet0/0/1]quit
[LSW3]interface Ethernet 0/0/2
[LSW3-Ethernet0/0/2]port link-type access
[LSW3-Ethernet0/0/2]port default vlan 20
[LSW3-Ethernet0/0/2]quit
LSW4 kommutatorda VLAN yaratish quyidagicha amalga oshiriladi.
Kommutatorga nom beriladi va vlan 10 yaratiladi.
system-view
[Huawei]sysname LSW4
[LSW4]vlan 10
[LSW4-vlan10]quit
LSW4 kommutatorida vlan 20 ni yaratish quyidagicha amalga oshiriladi.
[LSW4]vlan 20
[LSW4-vlan20]quit
Portni bog‘lanish turini sozlanadi va VLAN lar portlarga biriktiriladi.
[LSW4]interface Ethernet 0/0/2
[LSW4-Ethernet0/0/2]port link-type access
[LSW4-Ethernet0/0/2]port default vlan 10
[LSW4-Ethernet0/0/2]quit
[LSW4]interface Ethernet 0/0/3
[LSW4-Ethernet0/0/3]port link-type access
[LSW4-Ethernet0/0/3]port default vlan 20
[LSW4-Ethernet0/0/3]quit
Endi ikkala kommutator o‘rtasida portni bog‘lanish
turini va qaysi
VLAN larga ushbu magistral aloqa orqali o‘tishga
ruhsatni belgilash amalga
oshiriladi.
LSW3 ni sozlash amalga oshiriladi.
[LSW3]interface Ethernet 0/0/3
[LSW3-Ethernet0/0/3]port link-type trunk
[LSW3-Ethernet0/0/3]port trunk allow vlan 10 20
[LSW3-Ethernet0/0/3]quit
LSW4 ni sozlash amalga oshiriladi.
[LSW4]interface Ethernet 0/0/1
[LSW4-Ethernet0/0/1]port link-type trunk
[LSW4-Ethernet0/0/1]port trunk allow vlan 10 20
[LSW4-Ethernet0/0/1]quit
Vlanlar o‘rtasidagi aloqani tekshirib ko‘rish mumkin.
Buning uchun har bir
shaxsiy kompyuterga kirib 3.4- rasmda ko‘rsatilgani kabi IP manzillar biriktiriladi.
PC1 ga – 192.168.10.2 /255.255.255.0
PC2 ga – 192.168.20.2 /255.255.255.0
PC3 ga – 192.168.10.3 /255.255.255.0
PC4 ga – 192.168.20.3 /255.255.255.0
VLAN lar to‘g‘ri sozlanganligini tekshiramiz. Buning uchun PC1 (VLAN
10/192.168.10.2) dan PC3 (VLAN 10/192.168.10.3) ga ping jo‘natib tekshiriladi.
VLAN 10 lar o‘rtasidagi aloqa natijasi 3.5-rasmda keltirilgan.
3.5- rasm. VLAN 10 lar o‘rtasidagi aloqa natijasi
Natijadan ko‘rishimiz mumkin, VLAN lar to‘g‘ri sozlangan.