4switch.net 으로 바꾼다.
<SW1>
en
conf t
no ip domain loo
lin con 0
exec-time 0 0
logging syn
exit
ho SW1
vlan 10
name A
vlan 20
name B
vlan 30
name C
exit
int range fa 1/0 - 15
shut
!
int fa 1/1
no shut
sw mo acc
sw acc vlan 10
spanning-tree portfast
!
int fa 1/2
no shut
sw mo acc
sw acc vlan 20
spanning-tree portfast
!
int fa 1/3
no shut
sw mo acc
sw acc vlan 30
spanning-tree portfast
!
int range fa 1/14 - 15
no shut
sw trunk encapsulation dot1q
sw mo trunk
channel-group 1 mode on
!
<SW2>
en
conf t
no ip domain loo
lin con 0
exec-time 0 0
logging syn
exit
ho SW2
int range fa 1/0 - 15
shut
!
vlan 10
name A
vlan 20
name B
vlan 30
name C
exit
int range fa 1/14 - 15
no shut
sw trunk encapsulation dot1q
sw mo trunk
channel-group 1 mode on
!
int fa 1/10
no shut
no switchport
ip add 192.168.1.1 255.255.255.0
!
int vlan 10
ip add 192.168.10.254 255.255.255.0
ip helper-address 192.168.1.2
!
int vlan 20
ip add 192.168.20.254 255.255.255.0
ip helper-address 192.168.1.2
!
int vlan 30
ip add 192.168.30.254 255.255.255.0
ip helper-address 192.168.1.2
!
ip routing
router ospf 1
net 192.168.10.254 0.0.0.0 area 0
net 192.168.20.254 0.0.0.0 area 0
net 192.168.30.254 0.0.0.0 area 0
net 192.168.1.1 0.0.0.0 area 0
!
<SW3>
en
conf t
no ip domain loo
lin con 0
exec-time 0 0
logging syn
exit
ho SW3
int range fa 1/0 - 15
shut
!
int fa 1/12
no shut
no switchport
ip add 192.168.1.2 255.255.255.0
!
router ospf 1
net 192.168.1.2 0.0.0.0 area 0
!
ip dhcp pool VLAN_10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.254
dns-server 168.126.63.1
lease infinite
!
ip dhcp pool VLAN_20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.254
dns-server 168.126.63.1
lease infinite
!
ip dhcp pool VLAN_30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.254
dns-server 168.126.63.1
lease 10 5 5
!
ip dhcp excluded-address 192.168.10.254
ip dhcp excluded-address 192.168.20.254
ip dhcp excluded-address 192.168.30.254
<R1>
en
conf t
no ip domain loo
lin con 0
exec-time 0 0
logging syn
exit
ho PC_1
int fa 0/0
no shut
speed 100
duplex full
!
<R2>
en
conf t
no ip domain loo
lin con 0
exec-time 0 0
logging syn
exit
ho PC_2
int fa 0/0
no shut
speed 100
duplex full
!
<R3>
en
conf t
no ip domain loo
lin con 0
exec-time 0 0
logging syn
exit
ho PC_3
int fa 0/0
no shut
speed 100
duplex full
!