본문 바로가기

InterVLAN 설정 (L3 switching)

액트 2019. 5. 28.
반응형

 

!-------- preconfig
ena
conf t
ena sec cisco
no ip domain-lookup
line console 0
password cisco
login
exec-time 0 0
logg sync
exi
username CCNP password itbank321
line vty 0 4
login local
exi
host 



!-------- ASW1
int range fa 0/1 - 24
shut

vlan 10
name Sales
vlan 99
name Native

int vlan 1
ip add 1.1.1.1 255.255.255.0
no shut

int fa 0/8
no shut
sw mode acc
sw acc vlan 10
exi

int fa 0/1
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,10
no shut

int fa 0/5
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,10
no shut
end



!-------- ASW2
int range fa 0/1 - 24
shut

vlan 20
name Project
vlan 99
name Native


int vlan 1
ip add 1.1.1.2 255.255.255.0
no shut


int fa 0/8
no shut
sw mode acc
sw acc vlan 20
exi

int fa 0/1
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,20
no shut

int fa 0/5
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,20
no shut
end


!-------- DSW1
int range fa 0/1 - 24
shut
int range giga 0/1 - 2
shut 

vlan 10
name Sales
vlan 20
name Project
vlan 99
name Native

int vlan 1
ip add 1.1.1.11 255.255.255.0
no shut


int fa 0/1
sw trunk encap dot1q
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,10
no shut


int fa 0/10
sw trunk encap dot1q
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,20
no shut


int range fa 0/19 - 20
sw trunk encap dot1q
sw mode trunk
sw none
sw trunk allowed vlan 1,10,20
sw trunk native vlan 99
duplex full
speed 100
channel-protocol lacp
channel-group 1 mode active
no shut
exi

int port-channel 1
sw trunk native vlan 99
no shut
exi


spanning-tree vlan 10 priority 0
spanning-tree vlan 20 priority 4096 


ip routing

int vlan 10
ip add 192.168.1.254 255.255.255.0
no shut

int vlan 20
ip add 192.168.2.254 255.255.255.0
no shut
exi


int fa 0/2
no shut
no switchport
ip add 172.16.13.1 255.255.255.0


int fa 0/11
no shut
no switchport
ip add 172.16.14.1 255.255.255.0
exi



ip routing
router ospf 1
net 172.16.0.0 0.0.255.255 area 1
net 1.1.1.0 0.0.0.255 area 1
net 192.168.0.0 0.0.255.255 area 1
passive-interface default
no passive-interface fa 0/2
no passive-interface fa 0/11
exi

end



!-------- DSW2
int range fa 0/1 - 24
shut
int range giga 0/1 - 2
shut 

vlan 10
name Sales
vlan 20
name Project
vlan 99
name Native

int vlan 1
ip add 1.1.1.12 255.255.255.0
no shut

int fa 0/1
sw trunk encap dot1q
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,20
no shut


int fa 0/10
sw trunk encap dot1q
sw mode trunk
sw none
sw trunk native vlan 99
sw trunk allowed vlan 1,10
no shut


int range fa 0/19 - 20
sw trunk encap dot1q
sw mode trunk
sw none
sw trunk allowed vlan 1,10,20
sw trunk native vlan 99
duplex full
speed 100
channel-protocol lacp
channel-group 1 mode active
no shut
exi


int port-channel 1
sw trunk native vlan 99
exi

spanning-tree vlan 20 priority 0
spanning-tree vlan 10 priority 4096 


ip routing

int vlan 10
ip add 192.168.1.254 255.255.255.0
no shut


int vlan 20
ip add 192.168.2.254 255.255.255.0
no shut
exi


int fa 0/11
no shut
no switchport
ip add 172.16.23.1 255.255.255.0



int fa 0/2
no shut
no switchport
ip add 172.16.24.1 255.255.255.0
exi


ip routing
router ospf 1
net 172.16.0.0 0.0.255.255 area 1
net 1.1.1.0 0.0.0.255 area 1
net 192.168.0.0 0.0.255.255 area 1
passive-interface default
no passive-interface fa 0/2
no passive-interface fa 0/11
exi
end




!-------- BBSW3
int fa 0/2
no switchport
ip add 172.16.13.2 255.255.255.0


int fa 0/5
no switchport
ip add 172.16.23.2 255.255.255.0


int fa 0/8
no switchport
ip add 10.10.10.254 255.255.255.0


ip routing
router ospf 1
network 172.16.0.0 0.0.255.255 area 1
network 10.10.10.0 0.0.0.255 area 1
passive-interface default
no passive-interface fa 0/2
no passive-interface fa 0/5
exi
end



!-------- BBSW4
int fa 0/2
no switchport
ip add 172.16.24.2 255.255.255.0


int fa 0/5
no switchport
ip add 172.16.14.2 255.255.255.0


int fa 0/8
no switchport
ip add 20.20.20.254 255.255.255.0



ip routing
router ospf 1
network 172.16.0.0 0.0.255.255 area 1
network 20.20.20.0 0.0.0.255 area 1
passive-interface default
no passive-interface fa 0/2
no passive-interface fa 0/5
exi
end








반응형

'IT > 하드웨어' 카테고리의 다른 글

DHCP (Dynamic Host Configuration Protocol) Service  (0) 2019.05.28
InterVLAN3 실습  (0) 2019.05.28
Inter-VLAN Routing (switch 이용)  (0) 2019.05.28
Inter-VLAN Routing (Router 이용)  (0) 2019.05.28
EtherChannel - 이더 채널 구성  (0) 2019.05.28

댓글