中小型企业网络规划及实施方案 下载本文

version 2 //启动RIP版本2进程 network 172.16.1.0 //发布自己所关联的网络 network 100.1.1.0 //发布自己所关联的网络 ip route 0.0.0.0 0.0.0.0 172.16.1.1 //配置默认路由 ip route 0.0.0.0 0.0.0.0 100.1.1.2 username R1 password 0 123 //以对方的主机名作为用户名,密码为123 interface s0/0/0 encapsulation ppp //把该接口封装为PPP协议 ppp authentication pap // PPP启用PAP方式认证 Exit interface se 0/1/0 ip nat outside //配置为外部接口 exit interface se 0/0/0 ip nat inside //配置为内部接口 access-list 1 permit 172.16.10.0 0.0.0.255 //配置允许地址转换的内部本地地址范围 access-list 1 permit 172.16.20.0 0.0.0.255 access-list 1 permit 172.16.30.0 0.0.0.255 access-list 1 permit 172.16.40.0 0.0.0.255 access-list 1 permit 172.16.50.0 0.0.0.255 access-list 1 permit 172.16.60.0 0.0.0.255 ip nat pool hx 100.1.1.1 100.1.1.1 netmask 255.255.255.0 //定义内部网络全局地址池 ip nat inside source list 1 pool hx //配置内部本地地址与内部全局地址的映射关系 exit R3即 config t ISP路由器Hostname r3 (注:此代码interface se 0/0/1 在特权模式ip address 200.1.1.1 255.255.255.0 下输入)

no shutdown

exit interface se 0/0/0 ip address 100.1.1.2 255.255.255.0 no shutdown exit router rip //创建RIP路由进程 version 2 //启动RIP版本2进程 network 100.1.1.0 //发布自己所关联的网络 network 200.1.1.0 //发布自己所关联的网络 ip route 200.100.10.0 255.255.255.0 200.1.1.2 //配置到达非直连200.100.10.0网络的下一跳地址为200.1.1.2 ip route 172.16.1.0 255.255.255.0 100.1.1.1 config t Hostname r4 crypto isakmp policy 10 //ipsec第一阶段,定义ISAKMP策略 encr 3des //加密方法使用3des hash md5 //散列算法使用md5 authentication pre-share //认证方法使用预共享密钥 crypto isakmp key hx address 100.1.1.1//将ISAKMP预共享密钥和对等体关联,预共享密钥为“hx”。 R4(注:此代crypto ipsec transform-set tim esp-3des esp-md5-hmac //设置ipsec转换(交换)集 码在特权模crypto map tom 10 ipsec-isakmp // ipsec第二阶段,设置加密图 式下输入) set peer 100.1.1.1 //加载感兴趣流 set transform-set tim //设置对等体地址 match address 101 access-list 101 permit ip 192.168.1.0 0.0.0.255 202.100.10.0 0.0.0.255 //创建感兴趣数据流 interface se 0/0/0 ip address 200.1.1.2 255.255.255.0 clock rate 64000

no shutdown crypto map tom //在接口上应用加密图 interface FastEthernet0/0 ip address 202.100.10.1 255.255.255.0 no shutdown router rip //创建RIP路由进程 version 2 //启动RIP版本2进程 network 200.1.1.0 //发布自己所关联的网络 network 202.100.10.0 //发布自己所关联的网络 ip route 0.0.0.0 0.0.0.0 200.1.1.1 //配置默认路由 4.2 交换机配置

4.2.1划分VLAN

1.在二层交换机1,2,三层交换机3,4上创建vlan10、20、30、40、50、60, 输入设备如下图所示:

二层交换机2,代码如下:

用户模式下,三层交换机1, 输入设备如下图所示:

用户模式下,三层交换机2, 输入设备如下图所示: