三层交换机原理配置脚本
R3 R4 R6配置ip
Configure terminal
No ip routing
Interface f0/0
Ip address 192.168.1.1 255.255.255.0
No shutdown
Configure terminal
No ip routing
Interface f0/0
Ip address 192.168.1.2 255.255.255.0
No shutdown
Configure terminal
No ip routing
Interface f0/0
Ip address 192.168.2.1 255.255.255.0
No shutdown
*********************************
R2配置vlan 以及svi , f1/15转成三层接口,配上ip,配置路由 Vlan database
Vlan 10
Vlan 10 name xxx
Apply
Exit
Configure terminal
Interface f1/1
Switchport mode access
Switchport access vlan 10
Exit
Interface f1/2
Switchport mode access
Switchport access vlan 10
Exit
Interface vlan10
Ip address 192.168.1.254 255.255.255.0
Exit
Interface f1/15
No switchport
Ip address 192.168.25.2 255.255.255.0
No shutdown
Exit
Ip route 192.168.2.0 255.255.255.0 192.168.25.5
Exit
**********************************
R5配置vlan 以及svi , f1/15转成三层接口,配上ip,配置路由
Vlan database
Vlan 20
Vlan 20 name yyy
Apply
Exit
Configure terminal
Interface f1/1
Switchport mode access
Switchport access vlan 20
Exit
Interface vlan20
Ip address 192.168.2.254 255.255.255.0 Exit
Interface f1/15
No switchport
Ip address 192.168.25.5 255.255.255.0 No shutdown
Exit
Ip route 192.168.1.0 255.255.255.0 192.168.25.2 Exit
三层交换机原理配置脚本
R3 R4 R6配置ip
Configure terminal
No ip routing
Interface f0/0
Ip address 192.168.1.1 255.255.255.0
No shutdown
Configure terminal
No ip routing
Interface f0/0
Ip address 192.168.1.2 255.255.255.0
No shutdown
Configure terminal
No ip routing
Interface f0/0
Ip address 192.168.2.1 255.255.255.0
No shutdown
*********************************
R2配置vlan 以及svi , f1/15转成三层接口,配上ip,配置路由 Vlan database
Vlan 10
Vlan 10 name xxx
Apply
Exit
Configure terminal
Interface f1/1
Switchport mode access
Switchport access vlan 10
Exit
Interface f1/2
Switchport mode access
Switchport access vlan 10
Exit
Interface vlan10
Ip address 192.168.1.254 255.255.255.0
Exit
Interface f1/15
No switchport
Ip address 192.168.25.2 255.255.255.0
No shutdown
Exit
Ip route 192.168.2.0 255.255.255.0 192.168.25.5
Exit
**********************************
R5配置vlan 以及svi , f1/15转成三层接口,配上ip,配置路由
Vlan database
Vlan 20
Vlan 20 name yyy
Apply
Exit
Configure terminal
Interface f1/1
Switchport mode access
Switchport access vlan 20
Exit
Interface vlan20
Ip address 192.168.2.254 255.255.255.0 Exit
Interface f1/15
No switchport
Ip address 192.168.25.5 255.255.255.0 No shutdown
Exit
Ip route 192.168.1.0 255.255.255.0 192.168.25.2 Exit