3일차
EtherSwitch router
##vlan 만들기
config t
vlan 2
name VLAN2
exit
exit
##vlan 설정하기
config t
interface fastethernet 1/2
switchport access VLAN 2 (access모드 설정 핵심)
exit
- 트렁크: EtherSwitch router와 라우터를 연결하는 케이블, 서로 다른 vlan과 연결이 가능하다
##트렁크 설정하기
config t
interface fastethernet 1/0
switch trunk allowed vlan 1-2
switchport mode trunk
exit
exit
## 트렁크 확인하기
show interface trunk
[스위치 한방설정]
config t
vlan 2
name VLAN2
exit
interface fastethernet1/2
switchport mode access
switchport access VLAN 2
exit
interface fastethernet1/0
switchport mode trunk
exit
exit
show interface trunk
R1 라우터
[라우터 한방설정]
config t
hostname jjcom
interface fastethernet0/0
ip address 192.168.0.254 255.255.255.0
no shutdown
exit
interface fastethernet 0/0.2
encapsulation dot1q 2native
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
[칼리 리눅스 설정]
AccessList 설정하기
라우터의 텔넷 활성화
jjcom>_사용자모드 jjcom#_ 관리자모드
config t
enable secret 123456
config t
line vty 0 4
password 123456
login
exit
config t
ip domain-name st.kr
crypto key generate rsa
2048
ip ssh version 2
line vty 0 4
transport input ssh
show crypto key mypubkey rsa
config t
line con 0
exec-time 0 0
표준 ACL 과 확장 ACL
표준 ACL : 출발지 IP주소만 참조하여 패킷을 필터링 함
확장 ACL : 출발지 및 목적지 ip주소와 TCP,UDP,포트 번호를 참조하여 패킷을 필터링 함
차단하기
access-list 1 deny 192.168.0.2 0.0.0.0
access-list 1 permit any
interface fastethernet0/0
ip access-group 1 in
exit