静态路由默认路由的配置

静态路由实验

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

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. 如果…

敏捷开发

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

数据同步云端本地_如何从云端删除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

国内是否可以安装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. 您的智能扬声器可以听到人类听不到的声音,这意味着攻击者可…

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 …

如何更改您的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;每个…

扒一扒那些年我们遇到的奇葩代码

前言 本文首发于公众号【一名打字员】 在工作中&#xff0c;我们通常会遇到传说中的“祖传”代码&#xff0c;有些是否让我们感到哭笑不得&#xff0c;今天本猿整理一下自己以及网络上出现过的奇葩代码。来源于互联网的均会标明出处。 TOP1 当仁不让的当然是传说中的“睡排序”…

相对湿度与绝对湿度_如何监视家里的湿度水平

相对湿度与绝对湿度High humidity is no fun, and neither is low humidity—you want a good balance between the two. Here’s how to monitor the humidity in your house so that you can make the proper adjustments. 高湿度无济于事&#xff0c;低湿度也无济于事-您希望…

基于redis实现的扣减库存

2019独角兽企业重金招聘Python工程师标准>>> 在日常开发中有很多地方都有类似扣减库存的操作&#xff0c;比如电商系统中的商品库存&#xff0c;抽奖系统中的奖品库存等。 解决方案 使用mysql数据库&#xff0c;使用一个字段来存储库存&#xff0c;每次扣减库存去更…

plex 乱码_Plex Media Center现在支持播客

plex 乱码Plex is adding beta support for podcasts to iOS, Android, Roku, and Plex Web today, alongside a custom home screen for mobile users. Plex现在为iOS&#xff0c;Android&#xff0c;Roku和Plex Web的播客添加了beta支持&#xff0c;同时为移动用户提供了自定…

ios12彻底关闭siri_Siri正在iOS 12中获取自定义语音操作

ios12彻底关闭siriSiri is about to get a lot more powerful. Custom voice commands for any app will allow you to say “Hey Siri, I lost my keys” to instantly launch an app that will help you find them. Siri将变得更加强大。 针对任何应用程序的自定义语音命令将…

过Postfix构建Exchange Server 2010邮件网关部署系列三:安装Exchange 2010先决性条件

1.将Exchange Server 2010服务器加入域。 2.在“开始”菜单上&#xff0c;依次导航到“所有程序”>“附件”>“Windows PowerShell”。打开提升的 Windows PowerShell 控制台并运行以下命令&#xff1a; Import-Module ServerManager 3.使用 Add-WindowsFeature cmdlet 安…