kjh00n의 기록저장소
실습1 본문
PC1
ip 192.168.10.1 255.255.255.0 192.168.10.254
PC2
ip 192.168.20.1 255.255.255.0 192.168.20.254
ASW1
conf t
vlan 10
name v10
vlan 20
name v20
exit
int fa 3/0
switchport mode access
switchport access vlan 10
int fa 3/1
switchport mode access
switchport access vlan 20
int fa 3/15
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20,1002-1005
R1
conf t
int fa 0/0
no shu
int fa 0/0.10
encapsulation dot1q 10
ip addr 192.168.10.254 255.255.255.0
ip nat inside
int fa 0/0.20
encapsulation dot1q 20
ip addr 192.168.20.254 255.255.255.0
ip nat inside
int fa 0/1
ip addr 100.100.100.1 255.255.255.0
no shu
ip nat outside
router ospf 1
network 100.100.100.0 0.0.0.255 area 1
access-list 1 permit 192.168.10.0 0.0.0.255
access-list 1 permit 192.168.20.0 0.0.0.255
ip nat inside source list 1 int fa 0/1
※int fa 0/0에 ip nat inside를 하는게 아닌 int fa 0/0.10과 int fa 0/0.20에 ip nat inside를 해줘야한다.
R2
conf t
int fa 0/0
ip addr 100.100.100.2 255.255.255.0
no shu
int fa 0/1
ip addr 200.200.200.2 255.255.255.0
no shu
int fa 1/0
ip addr 150.150.150.2 255.255.255.0
no shu
router ospf 1
network 100.100.100.0 0.0.0.255 area 1
network 150.150.150.0 0.0.0.255 area 1
network 200.200.200.0 0.0.0.255 area 1
R3
conf t
int fa 0/0
ip addr 192.168.20.254 255.255.255.0
no shu
ip nat inside
int fa 1/0
ip addr 150.150.150.3 255.255.255.0
no shu
ip nat outside
router ospf 1
network 150.150.150.0 0.0.0.255 area 1
ip nat inside source static 192.168.20.1 150.150.150.3
R4
conf t
int fa 0/0
ip addr 192.168.10.254 255.255.255.0
no shu
ip nat inside
int fa 0/1
ip addr 200.200.200.4 255.255.255.0
no shu
ip nat outside
router ospf 1
network 200.200.200.0 0.0.0.255 area 1
ip nat inside source static 192.168.10.1 200.200.200.4
Server1
vim /etc/sysconfig/network-scripts/ifcfg-ens160
IPADDR=192.168.10.1
GATEWAY=192.168.10.254
:wq!
systemctl restart NetworkManager
ifconfig ens160 down
ifconfig ens160 up
player -> manage -> virtual machine settings
vmnet1 변경
Server2
vim /etc/sysconfig/network-scripts/ifcfg-ens160
IPADDR=192.168.20.1
GATEWAY=192.168.20.254
:wq!
systemctl restart NetworkManager
ifconfig ens160 down
ifconfig ens160 up
player -> manage -> virtual machine settings
vmnet2 변경
통신 테스트
server1,server2와 연결된 구간을 wireshark 확인
PC1
ping 200.200.200.4
ping 150.150.150.3
PC
ping 200.200.200.4
ping 150.150.150.3
'Network' 카테고리의 다른 글
실습4 (0) | 2024.10.24 |
---|---|
(실습3) 공인 ip가 2개 필요할 때 (0) | 2024.10.21 |
실습2 (0) | 2024.10.21 |
다른 네트워크끼리의 통신하는 법 (0) | 2024.10.21 |
Inter Vlan,Multi Layer Switch 설정방법 (0) | 2024.10.17 |