#공통 설정
En
Conf t
No ip domain lookup
Line c 0
Logg syn
Exec-timeout 0
Exit
Hostname
# IP 설정
ISP]
Conf t
Int f0/0
No shut
Ip add 24.24.10.254 255.255.255.0
Exit
Int f0/1
No shut
Ip add 1.1.12.9 255.255.255.252
Exit
Int f1/0
Mac-address ffff.ffff.ffff =>혹시 모르니 맥주소를 바꿔 줬다.
No shut
Ip add DHCP => DHCP 받음과 동시에 0.0.0.0 0.0.0.0 10.0.0.1 이더넷 출구의 디폴트 라우팅이 테이블에 저장됨.
Exit
R2]
Conf t
Int f0/0
No shut
Ip add 1.1.30.254 255.255.255.0
Int f0/1
No hsut
Ip add 1.1.12.10 255.255.255.0
End
Ping 1.1.12.9 =>nexthop ping test
ISP]
Conf t
Ip route 0.0.0.0 0.0.0.0 f1/0 10.0.0.1
Ip route 1.1.30.0 255.255.255.0 f0/1 1.1.12.10
R2]
Conf t
Ip route 0.0.0.0 0.0.0.0 f0/1 1.1.12.9 =>Ethernet 쪽으로 향하기 때문에 디폴트라우팅.
End
Ping 24.24.10.254
ISP]
Conf t
Ip access-list standard BIBI
Permit 24.24.10.0 0.0.0.255
Permit 1.1.30.0 0.0.0.255
Exit
Ip nat inside source list BIBI int f1/0 overload
Int f0/0
Ip nat inside
Exit
Int f0/1
Ip nat inside
Exit
Int f1/0
Ip nat outside
ISP]
Conf t
ip dhcp pool NET10
network 24.24.10.0 /24
default-router 24.24.10.254
dns-server 168.126.63.1 8.8.8.8
lease 8
class NETCLASS10
add range 24.24.10.1 24.24.10.253
exit
int f0/0
ip dhcp client class-id NETCLASS10
exit
!
ip dhcp pool NET30
network 1.1.30.0 /24
default-router 1.1.30.254
dns-server 168.126.63.1 8.8.8.8
lease 8
class NETCLASS30
add range 1.1.30.1 1.1.30.253
exit
int f0/1
ip dhcp client class-id NETCLASS30
R2]
conf t
int f0/0
ip helper-address 1.1.12.9 =>Broadcast를 unicast로 지정.
#PC 설정
Pc1]
Conf t
Ip default-gateway 24.24.10.254
Int f0/0
No shut
Ip add DHCP
Pc2]
Conf t
Ip default-gateway 1.1.30.254
Int f0/0
No shut
Ip add DHCP
댓글남기기