同一交换机两个不同vlan 交换机配置
同一交换机两个不同vlan
交换机配置:
system-view
System View: return to User View with Ctrl+Z.
[H3C]vlan 10
[H3C-vlan10]quit
[H3C]interface Vlan-interface 10
[H3C-Vlan-interface10]ip address 192.168.1.254 24
[H3C-Vlan-interface10]undo shutdown
[H3C-Vlan-interface10]quit
[H3C]interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1]port access vlan 10
[H3C-GigabitEthernet1/0/1]%Aug 9 12:41:01:846 2018 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface10 changed to up.
%Aug 9 12:41:01:846 2018 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface10 changed to up.
[H3C-GigabitEthernet1/0/1]undo shutdown
[H3C-GigabitEthernet1/0/1]quit
[H3C]vlan 20
[H3C-vlan20]quit
[H3C]interface Vlan-interface 20
[H3C-Vlan-interface20]ip address 192.168.2.254 24
[H3C-Vlan-interface20]undo shutdown
[H3C-Vlan-interface20]quit
[H3C]interface GigabitEthernet 1/0/2
[H3C-GigabitEthernet1/0/2]port access vlan 20
[H3C-GigabitEthernet1/0/2]%Aug 9 12:42:53:909 2018 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface20 changed to up.
%Aug 9 12:42:53:910 2018 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface20 changed to up.
[H3C-GigabitEthernet1/0/2]undo shutdown
[H3C-GigabitEthernet1/0/2]quit
[H3C]
用其中一台PC ping 另一台PC:
在192.168.1.1上ping192.168.2.1 , ping的通.
trunk口用于同vlan不同交换机间通信.