DDN配置实例

来源:互联网 发布:java pow方法 编辑:程序博客网 时间:2024/05/01 03:04
对于一个局域网的外连,有很多种方式DDN专线就是其中的一种 (具体外连方式请见网络基础部分).在下面的实例中介绍了蓝色家园内部局域网接入当地ISP的配置.

        蓝色家园内部局域网:10.1.8.0/24

        蓝色家园路由器的Ethernet 0:10.1.8.1/24

                                            Serial 0: 192.168.0.1/30

            ISP路由器            Serial 0: 192.168.0.2/30

具体拓扑图如下:


 

      也许Cisco操作系统的玄虚性以及其在市场中的占有率,决定了人们对其技术的一种仰慕,甚至想把自己的技术奋斗目标与 Cisco 绑定.但是,技术总归是技术,一切都是从头开始的.

    下面给出蓝色家园路由器的基本配置

      1.route>en 进入特权状态

      2.route#config t 通过端口进行配置

      3.在配置状态下

           给出E0/S0的IP地址

         #int e0/0

                  #ip add 10.1.8.1 255.255.255.0

                  #no shut

                  #int s0/0

                  #ip add 192.168.0.1 255.255.255.252

                  #en ppp (允许在专线上发送ppp包,如果不写,对于两端都是Cisco路由器是没问题的,会默认为Cisco 自己的打包方式)

                  # no shut

            4.给出蓝色家园到ISP的路由,因为蓝色家园只有一个出路,所以给出静态路由

                  #ip route 0.0.0.0 0.0.0.0 192.168.0.2

                  或者

                  #ip route 0.0.0.0 0.0.0.0 serial 0

            5.为了保证远程管理的Telnet 必须给出登陆用户

                  #line vty 0 4

                  #password bluegarden     

      6.Ctrl+Z退出特权配置状态 wr将配置写入路由器即可

      当然以上只是一个基本配置,能够保证数据通道的畅通.但是并没有充分利用路由器的功能,例如:NAT、安全等等。

      下面给出一个完整的配置 with NAT(为了明确例子,广域网连接中的子网变成192.168.1.0/24)

 

        hostname bluegarden

        !

        enable password bluegarden

        !

        no ip name-server

        !

        ip subnet-zero

        no ip domain-lookup

        ip routing

        !

        interface Ethernet 0

        no shutdown

        ip address 10.1.8.1   255.255.255.0

        ip address 192.16.1.1 255.255.255.0

        ip nat inside

        !

        interface Serial 0

        no shutdown

        ip address 192.168.1.2 255.255.255.0

        ip nat outside

        encapsulation hdlc

        ip nat pool bluegarden 192.16.1.10 192.168.50 prefix-length 24

        ip nat inside source list 1 pool bluegarden

        router rip

        version 2

        network 10.1.8.0 255.255.255.0

        passive-interface Serial 0

        access-list 1 permit 10.1.8.0 0.0.0.255

        !

        ip classless

        !

        ip route 0.0.0.0 0.0.0.0 Serial 0

        no ip http server

        snmp-server community public RO

        no snmp-server location

        no snmp-server contact

        !

        line console 0

        password bluegarden

        login

        !

        line vty 0 4

        password bluegarden

        login

        !

        end

        >Ctrl Z

        #wr

 

无忧网客联盟专业讨论 网络技术,CCNA CCNP CCIE CCSP

文章转载至http://bbs.net527.cn  无忧网客联盟

无忧linux时代
原创粉丝点击