一台路由器三个交换机8PC

in 瞎折腾儿 with 0 commentand 118 read

05.png


路由器:
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.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
#
#
interface GigabitEthernet0/0/0.1
 dot1q termination vid 10
 ip address 192.168.5.254 255.255.255.0
 arp broadcast enable
#
interface GigabitEthernet0/0/0.2
 dot1q termination vid 20
 ip address 192.168.6.254 255.255.255.0
 arp broadcast enable
#
interface GigabitEthernet0/0/0.3
 dot1q termination vid 30
 ip address 192.168.7.254 255.255.255.0
 arp broadcast enable
#
interface GigabitEthernet0/0/0.4
 dot1q termination vid 40
 ip address 192.168.8.254 255.255.255.0
 arp broadcast enable
#
交换机:
每一个交换机都需要创建vlan 10 20 30 40
vlan batch 10 20 30 40
然后:
lsw1
#
interface Vlanif1
#
interface MEth0/0/1
#
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 10
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 20
#
lsw3
#
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
#
lsw4
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
lsw5
#
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
#
lsw6
#
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.