静态路由默认路由的配置

静态路由实验

负载均衡的一点是个人理解,有不正确之处欢迎批评指正。             

R1配置:

s0/0/0口:193.1.1.9/30(本地)   next-hop 193.1.1.10/30  point-to-point link
F0/0设置子接口:F0/0.1 172.17.115.1/24 VLAN1   F0/0.5 172.17.110.1/24 VLAN6
静态路由配置:
ip route 192.168.1.0 255.255.255.0  193.1.1.10
ip route 192.168.2.0 255.255.255.0  193.1.1.10
ip route 193.1.1.16 255.255.255.252  193.1.1.10
ip route 1.1.1.0 255.255.255.0  193.1.1.10
ip route 10.10.0.0 255.255.0.0  193.1.1.10

S1配置:VLAN 1   ,VLAN 6  F0/10  F0/11 
PC1:172.17.115.11/24
PC2:172.17.110.11/24

R2配置:  DCE
LOOPBACK口:192.168.1.1/24   192.168.2.1/24
s0/0/0口:193.1.1.10/30(本地)   next-hop 193.1.1.9/30  point-to-point link
s0/0/1口:193.1.1.17/30(本地)   next-hop 193.1.1.18/30  point-to-point link
静态路由配置:
ip route 172.17.115.0 255.255.255.0  193.1.1.9 1/2(管理距离,如有备用路由时)
ip route 172.17.110.0 255.255.255.0  193.1.1.9
ip route 1.1.1.0 255.255.255.0  193.1.1.18  permanent (加此参数,则为静态路由使用的接口出现故障,仍将把路由保存在跌幅表中)
ip route 10.10.2.0 255.255.0.0  193.1.1.18

R3配置:默认路由

LOOP口:1.1.1.1/24  
F0/0口:10.10.2.1/16
s0/0/1口:193.1.1.18/30(本地)   next-hop 193.1.1.17/30  point-to-point link
静态路由配置:
默认路由 ip route 0.0.0.0 0.0.0.0 193.1.1.17
SERVER:10.10.9.61

最终实现全网互联。

 

R1配置:Router>ena
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#no shu           需要先把接口启用

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#int f0/0.1               创建并进入子接口f0/0.1 

%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to up        子接口创建即启动,不需要手动配置。

Router(config-subif)#encapsulation dot1q  1      配置封装为dot1q。并与VLAN 1相关联
Router(config-subif)#ip add 172.17.115.1 255.255.255.0   配置子接口IP

Router(config-subif)#int f0/0.5

%LINK-5-CHANGED: Interface FastEthernet0/0.5, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.5, changed state to up
Router(config-subif)#encapsulation dot1q  6
Router(config-subif)#ip add 172.17.110.1 255.255.255.0
Router(config-subif)#exi
Router(config)#int s0/0/0
Router(config-if)#ip add 193.1.1.9 255.255.255.252
Router(config-if)#no shu

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Router(config-if)#exi
Router(config)#ip route 192.168.1.1 255.255.255.0 193.1.1.9
%Inconsistent address and mask     出错是因为需配置目的网段,非主机地址
Router(config)#ip route 192.168.1.0 255.255.255.0 193.1.1.10 通过下一跳IP193.1.1.10到达192.168.1.0网段的静态路由。
Router(config)#ip route 192.168.1.0 255.255.255.0 193.1.1.10     2   管理距离默认为1,设置为2即为备用路由。

Router(config)#ip route 192.168.1.0 255.255.255.0 193.1.1.10    1  管理距离默认为1,设置为1或者不设置即实现负载均衡。负载均衡这点是个人理解,静态路由基于管理距离进行路由。

Router(config)#ip route 192.168.2.0 255.255.255.0 193.1.1.10
Router(config)#ip route 193.1.1.16 255.255.255.252 193.1.1.10
Router(config)#ip route 1.1.1.0 255.255.255.0 193.1.1.10
Router(config)#ip route 10.10.2.0 255.255.255.0 193.1.1.10
Router(config)#exi

%SYS-5-CONFIG_I: Configured from console by console
Router#wr
Building configuration...
[OK]
Router#

S1配置:

Switch(config)#int vlan 1
Switch(config-if)#no shu

%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

Switch(config-if)#exi
Switch(config)#int vlan 6
Switch(config-if)#no shu
Switch(config-if)#int vlan 1
Switch(config-if)#ip default-gateway 172.17.115.1
Switch(config)#int f0/10
Switch(config-if)#switchport access vlan 6

%LINK-5-CHANGED: Interface Vlan6, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan6, changed state to up
% Access VLAN does not exist. Creating vlan 6
Switch(config-if)#int f0/11
Switch(config-if)#switchport access vlan 6
Switch(config-if)#int f0/24
Switch(config-if)#switchport mode trunk
Switch(config-if)#int f0/2
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk native vlan 6      本地管理VLAN改为VLAN 6。我并未给VLAN6配置地址。这里只是说一下有这个方法可以更改。
Switch(config-if)#exi
Switch(config)#exi

 

 

R2配置:  DCE
Router(config)#int s0/0/0
Router(config-if)#ip add 193.1.1.10 255.255.255.252
Router(config-if)#no shu

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

Router(config-if)#clock rate 64000      配置时钟速率为64000做为DCE端   
Router(config-if)#exi
Router(config)#exi

Router(config)#int s0/0/1
Router(config-if)#ip add 193.1.1.17 255.255.255.252
Router(config-if)#clock rate 64000
Router(config-if)#no shu

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Router(config-if)#exi
Router(config)#int loopback 1               创建环回接口。默认已启用

%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#int loopback 2

%LINK-5-CHANGED: Interface Loopback2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback2, changed state to up

Router(config-if)#ip add 192.168.2.1 255.255.255.0
Router(config-if)#exi
Router(config)#ip route 172.17.115.0 255.255.255.0 193.1.1.9
Router(config)#ip route 172.17.110.0 255.255.255.0 193.1.1.9
Router(config)#ip route 1.1.1.0 255.255.255.0 193.1.1.18
Router(config)#ip route 10.10.0.0 255.255.0.0 193.1.1.18
Router(config)#exi

%SYS-5-CONFIG_I: Configured from console by console
Router#wr
Building configuration...
[OK]
Router#
 

 

R3配置:默认路由

Router(config)#int loop 1

%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

Router(config-if)#ip add 1.1.1.1 255.255.255.0
Router(config-if)#int f0/0
Router(config-if)#ip add 10.10.2.1 255.255.0.0
Router(config-if)#no shu

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#int s0/0/1
Router(config-if)#ip add 193.1.1.18 255.255.255.0
Router(config-if)#no shu

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

Router(config)#ip route 0.0.0.0 0.0.0.0 193.1.1.17   默认路由:所以流量通过下一跳193.1.1.17发送
Router(config)#exi

%SYS-5-CONFIG_I: Configured from console by console
Router#wr
Building configuration...
[OK]
Router#

 

配置完毕。测试全网互联正常。

本文转自  还不算晕  51CTO博客,原文链接:http://blog.51cto.com/haibusuanyun/511035

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/279424.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

r中汇率市场_如何在Word 2013表中汇总行和列

r中汇率市场If you’re working in Word and you need to total values in a table, you can do so without having to enter the data into Excel and then copy and paste it into Word. Word can do simple calculations such as summing, multiplying, and averaging. 如果…

solidity事件详解

很多同学对Solidity 中的Event有疑问,这篇文章就来详细的看看Solidity 中Event到底有什么用? 写在前面 Solidity 是以太坊智能合约编程语言,阅读本文前,你应该对以太坊、智能合约有所了解,如果你还不了解,建…

敏捷开发

敏捷开发是1990年逐渐引起人们广泛关注的新型软件开发方式,它是具有应对快速变化需求的软件开发能力。相对于非敏捷开发,它是一种以客户需求为核心,持续迭代,循序渐进的开发方式,敏捷绝非是一种特定的开发方式,而是一种…

MpAndroidChart源码修改之饼状图添加标志线

由于项目需要,需要改MpandroidChart源码,下面,先看下效果图:效果图效果很简单,但是由于所选依赖库没提供相关方法,所以就需要重写源码了.这条红色的标志线其实就是那个影厅的均值嘛,这条线看着是不是和图表中的连接线很像呢,那把连接线稍加改造不就可以了吗?下面,先看下此依赖…

数据同步云端本地_如何从云端删除Windows 8的同步数据

数据同步云端本地The ability to sync data and settings between computers running Windows 8 is great, but it does mean that your information – possibly personal – is stored in the cloud. If you have changed your mind about syncing and want to remove your d…

前端roadmap

转载于:https://www.cnblogs.com/cleverle/p/9615061.html

mysql 8+ 忘记root密码 解决方案

在安装完数据库后,由于自己不小心直接关闭了安装窗口,或者长时间没有使用root用户登录系统,导致忘记了root密码,这时就需要重置MySQL的root密码。当然,最简单方式自然是删除数据库的data目录,然后重新安装数…

安全领域应该关注的网站

http://www.freebuf.com/ https://www.seceye.cn/ https://zhuanlan.zhihu.com/c_118578260 https://www.easyaq.com/samesource/360.shtml http://bobao.360.cn/index/index https://www.sec-wiki.com/event

国内是否可以安装alexa_Alexa可以听到您无法听到的命令,哪些黑客可以利用

国内是否可以安装alexaYour smart speaker can hear sounds that humans can’t, meaning attackers could hypothetically trigger a command without you noticing. It’s happening in labs right now. 您的智能扬声器可以听到人类听不到的声音,这意味着攻击者可…

为什么要使用React Hooks?(5分钟实例)

前言 React Hooks在React v16.8正式稳定版中加入。 Hooks是什么? React Hooks 就是让你不必写class组件就可以用state和其他的React特性;你也可以编写自己的hooks在不同的组件之间复用;最近很多人都在谈论 React Hooks。当使用React类组件那么久&#x…

ActiveMQ在windows下启动失败解决方案

activemq.xml文件中的<transportConnectors><!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --><transportConnector name"openwire" uri"tcp://0.0.0.0:61616?maximumConnections1000&amp;wireForma…

jest忽略如何添加忽略_大多数人忽略的基本家庭维护任务

jest忽略如何添加忽略Owning a home requires a lot of responsibility, most notably regular maintenance to keep everything working great. However, there are a handful of very basic home maintenance tasks that you might be forgetting about. 拥有房屋需要承担很多…

自定义常用input表单元素二:纯css实现自定义radio单选按钮

这是接着上一篇纯css自定义复选框checkbox的第二篇&#xff0c;自定义一个radio单选按钮&#xff0c;同样&#xff0c;采用css伪类和“”css选择器为思路&#xff0c;下面是预览图&#xff1a; 下面直入主题放代码&#xff1a;HTML部分 <!--两个name相同的radio--> <i…

Elasticsearch之kopf插件安装之后的浏览详解

比如&#xff0c;我的这里是http://192.168.80.200:9200/_plugin/kopf/ 1、cluster 2、nodes 3、rest 4、more 5、更多详情&#xff0c;随着深入&#xff0c;再贴写分享&#xff01; 本文转自大数据躺过的坑博客园博客&#xff0c;原文链接&#xff1a;http://www.cnblogs.com/…

邮件系统之webmail

courier-authlib 网址http://www.courier-mta.org/ flush privileges 命令本质上的作用是将当前user和privilige表中的用户信息/权限设置从mysql库(MySQL数据库的内置库)中提取到内存里 虚拟用户&#xff1a;Maildir &#xff1a;/var/mailbox/Suexec apache ,httpdusergroupht…

如何将Microsoft Word文档转换为PDF

PDFs are handy for distributing documents so that they’re seen the same way by all parties. Typically, you’ll create documents using another app, and then convert them to PDF. Here’s how to do it for a Microsoft Word document. PDF易于分发文档&#xff0c…

ASP.NET WebApi 基于JWT实现Token签名认证

一、前言 开发提供数据的WebApi服务&#xff0c;最重要的是数据的安全性。那么对于我们来说&#xff0c;如何确保数据的安全将会是需要思考的问题。在ASP.NET WebService服务中可以通过SoapHead验证机制来实现&#xff0c;那么在ASP.NET WebApi中我们应该如何保证我们的接口安全…

Cage验证码生成器快速上手

Cage小巧&#xff0c;好用。这里在官方基础例子基础上做了扩展&#xff1a; 12345678910111213141516171819202122232425262728293031323334package com.lavasoft.ntv.web.common; import com.github.cage.IGenerator; import java.util.Random; /*** 验证码生成器 * * author …

马云:未来无工可打,人工智能发展红利还在10年以后

马云虽然已经退出阿里巴巴&#xff0c;但作为一代商业传奇他所说的话&#xff0c;还十分据有影响力。关于人工智能&#xff0c;马云提出过不少预测性言论。未来10年&#xff0c;房子、车子都不在值钱。面对人工智能时代&#xff0c;未来传统行业大部分会消失。更有厉害的&#…

如何更改您的iPhone铃声

The problem with having a popular phone like an iPhone is that, by default, everyone has the same ringtone. If you want to give your iPhone a more personal sound, here’s how to do it. 拥有像iPhone这样的流行手机的问题是&#xff0c;默认情况下&#xff0c;每个…