Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

---------------PC1----------------

enable
Conf t
host PC1
int e0/0
ip add 172.16.1.2 255.255.255.0
no shut
exit
ip route 0.0.0.0 0.0.0.0 172.16.1.1
end
wr
----------------R1----------------
enable
Conf t
host R1
int e0/0
ip add 172.16.1.1 255.255.255.0
no shut
exit
int e0/1
ip add 10.1.2.1 255.255.255.0
no shut
exit
ip route 172.16.2.0 255.255.255.0 10.1.2.2
end
wr

----------------R2----------------
enable
Conf t
host R2
int e0/0
ip add 172.16.2.1 255.255.255.0
no shut
exit
int e0/1
ip add 10.1.2.2 255.255.255.0
no shut
exit
ip route 172.16.1.0 255.255.255.0 10.1.2.1
end
wr
---------------------SV---------------
enable
Conf t
host SV
int e0/0
ip add 172.16.2.2 255.255.255.0
no shut
exit
ip route 0.0.0.0 0.0.0.0 172.16.2.1
end
wr
----------------ACL-----------------
1.Chi ip chan cua 172.16.1.0/24
Mau 172.16.1.xxxxxxx0
Wildcard Bits 0 .0 .0.11111110

access-list 10 deny 172.16.1.4 0.0.0.0


access-list 10 permit 172.16.1.0 0.0.0.254

2 Cau hinh R2: chi cho phep ip le cua 172.16.1.0/24


Mau 172.16.1.xxxxxxx1
Wildcard Bits 0 .0 .0.11111110

access-list 10 permit 172.16.1.1 0.0.0.254

172.16.1.0/24 172.16.1.0 255.255.255.0


172.16.1.0 0.0.0.255

3.R1 e0/0 (input) khong cho phep cac ip 172.16.1.0/24 telnet SV


SV
line vty 0 4
no login
privi leve 15
trans input telnet
exit

access-list 100 deny tcp 172.16.1.1 0.0.0.254 host 172.16.2.2 eq 23


access-list 100 permit ip any any

-----------------------------NAT-------------------------------
---------------PC1----------------
enable
Conf t
host PC1
int e0/0
ip add 172.16.1.2 255.255.255.0
no shut
exit
ip route 0.0.0.0 0.0.0.0 172.16.1.1
end
wr
----------------R1----------------
enable
Conf t
host R1
int e0/0
ip add 172.16.1.1 255.255.255.0
no shut
exit
int e0/1
ip add 193.1.1.33 255.255.255.252
no shut
exit
ip route 0.0.0.0 0.0.0.0 193.1.1.34
end
wr

----------------ISP----------------
enable
Conf t
host ISP
int e0/0
ip add 194.1.1.1 255.255.255.0
no shut
exit
int e0/1
ip add 193.1.1.34 255.255.255.252
no shut
exit
end
wr
---------------------SV---------------
enable
Conf t
host SV
int e0/0
ip add 194.1.1.2 255.255.255.0
no shut
exit
ip route 0.0.0.0 0.0.0.0 194.1.1.1
line vty 0 4
no login
privi leve 15
trans input telnet
exit
end
wr
---------------NAT tren R1--------------------
Cho phep cac IP le ra internet ngoai tru 172.16.1.9

access-list 10 deny host 172.16.1.9


access-list 10 permit 172.16.1.1 0.0.0.254

int e0/0
ip nat inside
exit
int e0/1
ip nat outside
exit

ip nat inside source list 10 interface e0/1 overload

You might also like