NAT+VLAN+CHAP实验配置(二)

7.    Nat的配置

进入fa0/0.7子接口

Router(config)#int fa0/0.7

定义接口为 NAT 的本地内部接口

Router(config-if)#ip nat inside

进入fa0/0.8子接口

Router(config-if)#int fa0/0.8

定义接口为 NAT 的本地内部接口

Router(config-if)#ip nat inside

进入fa0/0.9子接口

Router(config-if)#int fa0/0.9

定义接口为 NAT 的本地内部接口

Router(config-if)#ip nat inside

进入S1/0子接口

Router(config-if)#int s1/0

定义接口为 NAT 的本地全局接口

Router(config-if)#ip nat outside

定义nat的本地全局地址

Router(config)#ip nat pool vlan 202.102.192.100 202.102.192.100 netmask 255.255.255.0

定义ACL控制列表

Router(config)#access-list 1 permit any

本地全局地址和ACL的绑定

Router(config)#ip nat inside source list 1 pool vlan overload

8.    静态路由的配置实现routerISP的通信

    Router(confing)#ip route 0.0.0.0 0.0.0.0 202.102.192.200

9.    查看router

Router#sh ip route

C    192.168.1.0/24 is directly connected, FastEthernet0/0.7

C    192.168.2.0/24 is directly connected, FastEthernet0/0.8

C    192.168.3.0/24 is directly connected, FastEthernet0/0.9

C    202.102.192.0/24 is directly connected, Serial1/0

S*   0.0.0.0/0 [1/0] via 202.102.192.200

10.    检测内部网络是否可以和外部网络的通信

PC>ping 202.102.192.200

Pinging 202.102.192.200 with 32 bytes of data:

Reply from 202.102.192.200: bytes=32 time=16ms TTL=254

Reply from 202.102.192.200: bytes=32 time=14ms TTL=254

Reply from 202.102.192.200: bytes=32 time=16ms TTL=254

Reply from 202.102.192.200: bytes=32 time=14ms TTL=254

Ping statistics for 202.102.192.200:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 14ms, Maximum = 16ms, Average = 15ms

11.    CHAP的配置

定义router的名字

Router(config)#hostname vlan

建立CHAP用户和密码

Vlan(config)#username isp password cicso

进入S1/0接口

Vlan(config)#int s1/0

封装ppp协议

Vlan(config-if)#encapsulation ppp

定义CHAP验证

Vlan(config-if)#ppp auth chap

12.    Isp 的配置

Router(config)#hostname isp

Router(config)#username  vlan password cicso

Router(config-if)#encapsulation ppp

Router(config-if)#ppp auth chap

13.    检测相同用户名是否可以通信,不同用户名是否可以通信。

   相同的用户名

vlan#ping 202.102.192.200

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 202.102.192.200, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 3/4/7 ms

   不同的用户名

 

四:实验总结

1.        通过vlan的划分可以实现不同部门之间的隔离,防止网络内部广播风暴。

2.        通过router的功能可以实现内部不同vlan的之间的通信。

3.        通过NAT技术可以实现私有地址可以访问外网。节约ip地址和降低成本。

4.        通过CHAP技术可以保证router的安全防止外部网络的恶意***。





 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章