
1. Cấu hình địa chỉ IP cho các thiết bị
PCs:
- PC1: IP 172.16.0.5/16, Gateway: 172.16.0.1
- PC2: IP 172.17.0.5/16, Gateway: 172.17.0.1
- PC3: IP 192.168.1.1/24, Gateway: 192.168.1.254
Router 1:
interface FastEthernet0/0
ip address 172.16.0.1 255.255.0.0
no shutdown
interface FastEthernet1/0
ip address 172.17.0.1 255.255.0.0
no shutdown
interface Serial2/0
ip address 210.16.1.1 255.255.255.0
clock rate 64000
no shutdown
Router 2:
interface Serial2/0
ip address 210.16.1.2 255.255.255.0
no shutdown
interface FastEthernet0/0
ip address 192.168.1.254 255.255.255.0
no shutdown
2. Cấu hình định tuyến tĩnh
Trên Router 1:
ip route 192.168.1.0 255.255.255.0 210.16.1.2
Trên Router 2:
ip route 210.16.1.0 255.255.255.0 210.16.1.1
ip route 172.16.0.0 255.255.0.0 210.16.1.1
ip route 172.17.0.0 255.255.0.0 210.16.1.1
3. Cấu hình NAT ( NAT Dynamic)
Trên Router 1:
3.1Gán vai trò cho các cổng:
interface FastEthernet0/0
ip nat inside
interface FastEthernet1/0
ip nat inside
interface Serial2/0
ip nat outside
3.2 Tạo pool IP công khai:
ip nat pool NAT-POOL 210.16.1.100 210.16.1.110 netmask 255.255.255.0
3.3 Tạo ACL để chọn IP cần NAT:
access-list 1 permit 172.16.0.0 0.0.255.255
3.4 Liên kết ACL với pool NAT:
ip nat inside source list 1 pool NAT-POOL
Xem: show ip nat translations (Cần phải Ping ra ngoài mới coi dc)
4. Kiểm tra kết nối
- Từ PC3 (192.168.1.1), ping các địa chỉ sau:
- ping 210.16.1.10 ; đại diện cho PC1
- ping 210.16.1.20 ; đại diện cho PC2