基本配置:
R1的配置
en
conf ter
host R1
interf f0/1
ip add 10.0.0.1 255.255.255.0
no shut
interf f0/0
ip add 10.0.1.1 255.255.255.0
no shut
do w
IP DHCP POOL LAN1
netw 10.0.0.0 255.255.255.0
default-router 10.0.0.1
dns-server 202.102.134.68
ROUTER RIP
NETW 10.0.0.0
NO AUT
VERSION 2
DO W
R2的配置:
en
conf ter
host Boder
interf f0/0
ip add 10.0.1.2 255.255.255.0
no shut
interf f0/1
ip add 100.100.100.1 255.255.255.252
no shut
do w
静态路由:
ip route 0.0.0.0 0.0.0.0 100.100.100.2
动态路由:
router rip
VERSION 2
NETW 10.0.0.0
NO AU
default-infor o
ISP的配置:
en
conf ter
host ISP
interf f0/1
ip add 100.100.100.2 255.255.255.252
no shut
interf f0/0
ip add 100.100.100.5 255.255.255.252
no shut
ip route 100.100.100.100 255.255.255.255 f0/1
do w
各种NAT实例:
动态NAT:
access-list 1 permit 10.0.0.0 0.0.0.255
access-list 1 permit 10.0.1.0 0.0.0.255
ip nat pool byx 100.100.100.1 100.100.100.1 netmask 255.255.255.252
ip nat inside source list 1 pool byx overload
interf f0/0
ip nat inside
interf f0/1
ip nat outside
do w
接口超载(PAT):
access-list 1 permit 10.0.0.0 0.0.0.255
access-list 1 permit 10.10.1.0 0.0.0.255
ip nat inside source list 1 interf f0/1 overload
interf f0/0
ip nat inside
interf f0/1
ip nat outside
以上小实验,仅是个人学习回顾,如有错误,烦扰指正!