3일차

vlan 만들기
스위치설정
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 fastethernet0/0.2
encapsulation dot1q 2
ip address 192.168.1.254 255.255.255.0
no shutdown
exit

네트워크가 NAT로 되어있어서 10.0.2.15로 나온다
네트워크에서 어댑터에 브리지로 바꾸면 ip가 192.168.0.xxx로바뀐다

nmap한테 대역대를 줘서 스캔하라는명령어
nmap -v -sS -O 192.168.1.0/24 > result.txt
ip(254)+port(65536개 : 0~65535)

AccessList 설정하기
라우터의 털넷 활성화
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(1-99) : 출발지 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