案例分析:当一个公司有两个子公司需要经过ISP相互通信,但是又不想在ISP哪里做配置。因为要在哪做配置需要缴纳一定数目的费用。那么作为网络工程师,我们应该怎么做呢?
实验拓扑:
实验说明:
        在配置之前,ISP上只有两条直连的路由。整个实验我们都不能在ISP上做任何配置。拓扑中的PC是用PC上装的SDM(如果在主机上装SDM有任何问题可以在我的博客留言)对路由器进行配置。PC必须和E1/0接口在同一网段。并且要在PC做相应的配置才能登陆。我们可以使用隧道技术虚拟一条连接site1 和seit2的链路。怎样确定数据传输的安全呢?我们可以同时使用IPSEC技术确保数据的安全传输。
实验过程
       预配置
site1# configure terminal
site1(config)# interface ethernet 0/0
site1(config-if)# ip address 200.1.1.1 255.255.255.0
site1(config-if)# no shutdown
ISP(config)# interface ethernet 0/0
ISP(config-if)# ip address 200.1.1.2 255.255.255.0
ISP(config-if)# no shutdown
ISP(config-if)# interface ethernet 2/0
ISP(config-if)# ip address 200.2.2.3 255.255.255.0
ISP(config-if)# no shutdown
site2# configure terminal
site2(config)# interface ethernet 2/0
site2(config-if)# ip address 200.2.2.2 255.255.255.0
site2(config-if)# no shutdown
配置PC的IP地址为172.16.0.3  255.255.0.0  关闭PC的防火墙。因为在测试时有防火墙可能ping不通主机
步骤1  在site1上做配置,让PC能登陆到site1上。
site1(config)# interface ethernet 1/0
site1(config-if)# ip address 172.16.0.1 255.255.0.0
site1(config-if)# no shutdown
site1(config-if)# duplex full
site1(config-if)# exit
site1(config)# ip http server
site1(config)# ip http secure-server
site1(config)# ip http authentication local
site1(config)# username admin privilege 15 password 123
site1(config)# line vty 0 15
site1(config-line)# login local
site1(config-line)# transport input ssh
site1(config-line)# transport output ssh
步骤2 在PC上打开SDM  对site1进行相应的配置
输入site1 的E1/0 接口的IP地址172.16.0.1
输入在site1上输入的用户名和密码
再次输入在site1 上配置的用户名和密码
进入SDM。
点击配置—>辑接口/连接—>添加—>新逻辑接口—>环回
配置环回口的IP地址为1.1.1.1
点击路由—添加 —配置一条到ISP的默认路由。
点击××× —选择子菜单站点到站点×××—在选择创建安全GRE通道—点击启动选定的任务。
选择下一步
通道来源输入site1实际与ISP相连的接口。通道目标输入与ISP相连的site2接口的IP地址。GRE通道的IP地址,是虚拟建立的隧道接口的IP地址。
配置备份GRE通道信息。这里不进行配置,点下一步。如果想配可以输入相应的信息。
选择×××验证信息的验证方式,这里选择的是预共享密钥。这里的密钥必须通site2上的密钥相同否则不能通信。
这里的配置是加强数据传输的安全性。
配置动态路由协议RIP(可以选择其他)
添加网段,10.0.0.0 和1.1.1.1
这样在sites1上的配置就完成。
步骤3  在site2进行配置,让PC登陆到site2上。
site2(config)# interface e1/0
site2(config-if)# ip address 172.16.0.2 255.255.0.0
site2(config-if)# no shutdown
site2(config-if)# duplex full
site2(config-if)# exit
site2(config)# ip http server
site2(config)# ip http secure-server
site2(config)# ip http authentication local
site2(config)# username ccnp privilege 15 password 123
site2(config)# line vty 0 15
site2(config-line)# login local
site2(config-line)# transport input ssh
site2(config-line)# transport output ssh
步骤4  在PC上通过SDM对site2进行配置。
过程与步骤2相同。但在输入正确的数据。
步骤5  测试连通性,在site1上ping2.2.2.2   在site2上ping 1.1.1.1发现能相互ping通。
步骤6  在ISP查看路由信息,发现ISP只有2条直连的路由。