以前学NA的时候不用过它。今天又拿起它来做一下无线实验,感觉还真不错呢?
拓扑图如下:
在ISP背后接了一台DNS服务器与一个WWW服务器,现在Router1模拟公司的路由器,在公司的路由器背后接了一台t300n的无线路由器,下面4台PC,通过添加了无线网卡,连接到无线路由器上,然后通过公司内部的路由器访问外面的WWW服务器。
那么我们现在来看看如何实现呢?
先把isp与Router1的配置好!
Server端的配置:
Router>en
Router#conf t
nter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain-lookup
Router(config)#host Server
Server(config)#line con 0
Server(config-line)#logg syn
Server (config-line)#exec-timeout 0 0
Server (config-line)#exit
Server (config)#int s0/0/0
Server (config-if)#ip add 202.1.1.1 255.255.255.0
Server(config-if)#ip nat outside
Server (config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Server (config-if)#int fa0/0
Server (config-if)#ip add 192.16.1.1 255.255.255.0
Server(config-if)#ip nat inside
Server (config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Server (config-if)#exit
Server(config)#access-list 1 permit 192.168.1.0 0.0.0.255
Server(config)#ip nat inside source list 1 interface s0/0/0 overload
Server (config)#ip route 0.0.0.0 0.0.0.0 s0/0/0
Server (config)#exit
Server#
ISP端的配置:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host ISP
ISP(config)#no ip domain-lookup
ISP(config)#line con 0
ISP(config-line)#logg syn
ISP(config-line)#exec-timeout 0 0
ISP(config-line)#exit
ISP(config)#int s0/0/0
ISP(config-if)#ip add 202.1.1.2 255.255.255.0
ISP(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
ISP(config-if)#clock rate 64000
ISP(config-if)#exit
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
ISP(config)#int fa0/0
ISP(config-if)#ip add 202.2.2.2 255.255.255.0
ISP(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
ISP(config-if)#int fa0/1
ISP(config-if)#ip add 202.3.3.3 255.255.255.0
ISP(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
ISP(config-if)#exit
ISP(config)#
现在我们将DNS服务器配置起来:
在这里做一个域名解析,以便我们等一会我们公司内部那4台PC通过这个域名去访问我们的WWW服务器。
配置WWW服务器: