【计算机网络】DHCP VLAN配置(1)

以下图为例,PC1和PC2分别属于vlan10和vlan20,通过三层交换机互联,配置交换机实现两台PC通信。

【计算机网络】DHCP VLAN配置(1)_第1张图片

sys
[Huawei]sysname sw

[sw]vlan 10
[sw-vlan10]vlan 20

[sw]dis vlan summary 
static vlan:
Total 3 static vlan.
  1 10 20 

[sw]int vlanif 10
[sw-Vlanif10]ip address 192.168.10.254 24
[sw-Vlanif10]int vlanif 20
[sw-Vlanif20]ip address 192.168.20.254 24
[sw-Vlanif20]quit

[sw]int g 0/0/1
[sw-GigabitEthernet0/0/1]port link-type access 
[sw-GigabitEthernet0/0/1]port default vlan 10
[sw-GigabitEthernet0/0/1]int g 0/0/2
[sw-GigabitEthernet0/0/2]port link-type access
[sw-GigabitEthernet0/0/2]port default vlan 20
[sw-GigabitEthernet0/0/2]quit

[sw]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 6        Routes : 6        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
   192.168.10.0/24  Direct  0    0           D   192.168.10.254  Vlanif10
 192.168.10.254/32  Direct  0    0           D   127.0.0.1       Vlanif10
   192.168.20.0/24  Direct  0    0           D   192.168.20.254  Vlanif20
 192.168.20.254/32  Direct  0    0           D   127.0.0.1       Vlanif20

 
 
 

配置PC1PC2IP

【计算机网络】DHCP VLAN配置(1)_第2张图片

【计算机网络】DHCP VLAN配置(1)_第3张图片

【计算机网络】DHCP VLAN配置(1)_第4张图片

待续。。。。。。

你可能感兴趣的:(计算机网络,网络,运维,其他)