路由器连接两个二层交换机4PC

in 瞎折腾儿 with 0 commentand 13 read

04.png
四台PC属于四个不同的vlan并且属于不同的网段,使四台PC可以互相通信。
PC1属于vlan10 192.168.1.1
PC2属于vlan20 192.168.2.1
PC3属于vlan30 192.168.3.1
PC4属于vlan40 192.168.4.1
实现PC1与PC2与PC3与PC4互通


Route
#
interface Ethernet0/0/0.1
 dot1q termination vid 10
 ip address 192.168.1.254 255.255.255.0
 arp broadcast enable
#
interface Ethernet0/0/0.2
 dot1q termination vid 20
 ip address 192.168.2.254 255.255.255.0
 arp broadcast enable
#
interface Ethernet0/0/1
#
interface Ethernet0/0/1.1
 dot1q termination vid 30
 ip address 192.168.3.254 255.255.255.0
 arp broadcast enable
#
interface Ethernet0/0/1.2
 dot1q termination vid 40
 ip address 192.168.4.254 255.255.255.0
 arp broadcast enable
#
lsw1
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 20
#
lsw2
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 30
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 40
#

Comments are closed.