2010年9月15日星期三

配置网络地址转换

西安交通大学实验报告

课程:网络技术实验
完成时间:2010年5月19日
实验名称:配置网络地址转换

实验内容

    使用Boson NetSim软件模拟出路由器的环境,并配置网络地址转换。

(#后为注释,下同)

# 静态NAT
# 打开Router2的telnet服务:
enable
conf t
line vty 0 4
login
password xq
exit

# 在Router1上通过telnet服务访问Router2:
telnet 192.16.10.1
enable

# Router3
conf t
ip nat inside source static 192.200.10.1 202.117.35.1
interface s0
ip nat inside
exit
interface s1
ip nat outside
exit

# Router1
show interfaces # 查看IP地址
telnet 192.16.10.1 # Router2
show users # 使用了外网IP
# Router3
show ip nat translations # 查看转换表

(完)
笔记:
# 静态NAT
# 打开Router2的telnet服务:
enable
conf t
line vty 0 4
login
password xq
exit

# 在Router1上通过telnet服务访问Router2:
telnet 192.16.10.1
enable

# Router3
conf t
ip nat inside source static 192.200.10.1 202.117.35.1
interface s0
ip nat inside
exit
interface s1
ip nat outside
exit

# Router1
show interfaces # 查看IP地址
telnet 192.16.10.1 # Router2
show users # 使用了外网IP

# Router3
show ip nat translations # 查看转换表


# 动态NAT
# Router3
ip nat pool pool1 202.117.58.50 202.117.58.100 netmask 255.255.255.0
ip nat inside source list 1 pool pool1
access-list 1 permit 192.200.10.0 0.0.0.255
interface s0
ip nat inside
exit
interface s1
ip nat outside
exit

# Router1
telnet 192.16.10.1 # Router2
show users

没有评论:

发表评论