当前位置:网站首页>Dual machine thermal for comprehensive experiment (VRRP + OSPF + + NAT + DHCP + VTP PVSTP + single-arm routing)
Dual machine thermal for comprehensive experiment (VRRP + OSPF + + NAT + DHCP + VTP PVSTP + single-arm routing)
2022-08-11 00:49:00 【Lonely City 286】
目录
一、双机热备实验:
模拟器:GNS3
Involves dual-machine hot standby knowledge and related configurations:
(47条消息) Dual-machine hot-standby technology(讲解+实验)——静态路由实现_孤城286的博客-CSDN博客
(1)实验拓扑:
(2)实验需求:
- ①pc1、pc2、pc3Ability to egress the router through the internetR7上网
- ②pc1、pc2、pc3Can access the head office intranet server
- ③pc1、pc2、pc3能够相互访问
- ④sw1、sw2、R7之间利用OSPFForm a dual-machine hot standby
- ⑤pc1、pc2、SV-1 的IPAddresses and gateways go through the core switchsw1和sw2下发
(3)实验思路:
①合理规划 IP、网段、vlan
② 所有 交换机之间封装trunk
③配置vtp模式同步vlan数据库
④Terminal interface divisionvlan
⑤双机热备配置
⑥生成树配置
⑦核心交换机配置 DHCP The address pool is issued to the terminal equipment of the head office ip 地址及网关
⑧pc1、pc2、SV-1互相pingTest to verify that the above configuration is successful
⑨路由处理:
sw1有两个OSPF邻居(a direct sumR7建立,one via interconnectvlan 12和 sw2 建立),sw2、R7同样也如此.
同时sw1和sw2要将vlan 10、20、30The routes of the three network segments are advertised out
R7As an Internet export device to be inOSPFForced insidesw1和sw2Advertise the default route,
sw1和sw2The Internet can only be accessed through this default route
同时R7Need to configure static default next hop throw toR8(Carriers and Internet egress routers run static routes)
R11A static default route needs to be configured:
ip route 0.0.0.0 0.0.0.0 141.1.1.14
R14需要配置pc3return route:
ip route 113.1.1.0 255.255.255.0 141.1.1.11
R9和sw2之间跑OSPF(R9可以学习到vlan 10、20、30、Internet routing)
Because the core switch does not know where to goP3的路由,所以需要把R9去往PC3The static route is redistributed intoOSPF里(Redistribute external routes by defaultcost值=20).
(4)相关配置:
DHCP:
3560(config)#ip dhcp pool vlan10 ——为地址池设置名称(一般一个vlanfor an address pool)
3560(dhcp-config)#default-router 192.168.20.254 ——Set the gateway for the delivered address
3560(dhcp-config)#network 192.168.20.0 255.255.255.0 ——Set the delivery address range
3560(dhcp-config)#dns-server 8.8.8.8 设置DNS
ip dhcp excluded 192.168.100.254 ——excluded:排除其他的IP地址,防止冲突
ip dhcp excluded 192.168.100.1
ip dhcp excluded 192.168.100.2
3560(dhcp-config)#lease 1 (设备IPThe time of the address lease period is the default24小时,单位为/天)
exit
show ip dhcp pool
终端:
int f0/0
ip add dhcp ——获取ip地址方式为dhcp
ex
show run int f0/0 ——查看接口详细信息
show ip int br ——查看接口ip
VTP通告:
vlan database --进入到vlan数据库
vtp domain aaa----定义一个domain域
vtp password bbb---需要一个密码、密钥来认证
vtp mode client---模式
show vtp status-------查看指令
OSPF:
(1)OSPF area:区域,骨干区域0,其余非骨干区域
router ospf 100---进入ospf路由协议的进程里,100为进程号
router-id 1.1.1.1 ---指定router-id为(路由器在OSPFidentification in the network)
network 10.1.1.0 0.0.0.255 area 0----将直连网段宣告area区域0(区域0为骨干区域,其余的为非骨干区域)
default-information originate always ---强制下发缺省路由 OE2*(Mandatory to allospfNeighbors advertise default routes)
redistribute static subnets---重分发静态路由,subnets掩码
passive-interface vlan 10 --The interface is in passive state,让vlan 10The interface can only receive but not sendhello包,Don't let it buildospf邻居
exit
show ip ospf nei----查看ospf邻居
sh run | s r o--查看所有ospf所有配置
ping 4.4.4.4 source 1.1.1.1 --从我的1.1.1.1 ping 4.4.4.4
int f0/3
ip ospf cost 30
exit
PAT:
R1(config)#int f0/1
R1(config-if)#ip nat outside
R1(config-if)#exit
R1(config)#int f0/0
R1(config-if)#ip nat inside
R1(config-if)#exit
R1(config)#access-list 1 permit 10.1.1.0 0.0.0.255
R1(config)#access-list 1 permit 10.1.2.0 0.0.0.255
R1(config)#ip nat inside source list 1 int f0/1 overload
VRRP配置:
(默认开启抢占功能)
SW1(config)#track 1 interface f0/0 line-protocol
定义一个跟踪策略,这个策略名字是1,跟踪F0/0接口的状态信息
SW1(config)#int vlan 10
SW1(config-if)#ip address 192.168.10.11 255.255.255.0
SW1(config-if)#vrrp 10 ip 192.168.10.254 //定义一个虚拟的IP地址,作为VLAN 10的网关
SW1(config-if)#vrrp 10 priority 101 //定义一个优先级
SW1(config-if)#vrrp 10 track 1 decrement 50 //调用track1优先级降低50--hsrp 10 track f0/0 50
SW1(config-if)#vrrp 10 preempt delay minimum 0 --hsrp 10 pree
SW1(config-if)#exit
查看vrrp信息:show vrrp brief
————链路捆绑
int range f0/1 , f0/2
channel-group 1 mode on
exit
int port-channel 1
sw tr en dot
sw mode tr
exit
相关查看命令:
show standby brief
show spanning-tree vlan 10 nrief
show cdp nei
show vlan-sw
show int trunk
show ip route
show int vlan 10
show ip int brief
show vrrp brief
生成树配置:
spanning-tree vlan 10 root primary ——主根桥
spanning-tree vlan 10 root secondary ——备份根桥
interface planvlan :
Switch(config)#interface f0/1
Switch(config-if)#switch mode access
Switch(config-if)#switch access vlan 10
Switch(config-if)#exit
边栏推荐
- 异常和异常处理机制
- ② 关系数据库标准语言SQL 数据定义(创建、修改基本表)、数据更新(增删改)
- 分库分表ShardingSphere-JDBC笔记整理
- 微信小程序内部A页面向内嵌H5页面跳转,并且传参
- 循环单词
- Distributed. Performance optimization
- dump_stack()
- 【经典排序】快速排序
- 【C语言】探索数据的存储(整形篇)
- Which foreign language journals and conferences can be submitted for software engineering/system software/programming language?
猜你喜欢
“蔚来杯“2022牛客暑期多校训练营3 DF题解
使用 BeanUtils 做属性拷贝,性能有点拉胯!
Jvm. Profiling tools (jconsole, jvisualvm, arthas, jprofiler, mat)
Apache Commons Configuration远程代码执行漏洞(CVE-2022-33980)分析&复现
SAS data processing technology (1)
编程技巧│selenium 更新 chromedriver 驱动
两个链表的第一个公共节点——LeetCode
Go项目配置管理神器之viper使用详解
还在用 Xshell?你 out 了,推荐一个更现代的终端连接工具,好用到爆!
EN 12467纤维水泥平板产品—CE认证
随机推荐
C#-委托的详细用法
如何破坏Excel文件,让其显示文件已损坏方法
Dump文件生成,内容,以及分析
networkmanager无法打开
Mysql.慢Sql
How to check if the online query suddenly slows down
SQL语句--获取数据库表信息,表名、列名、描述注释等
单片机人机交互--矩阵按键
深度解析volatile关键字(保证够全面)
如何做到构建的提速,再提速
构建检测,无规矩不成方圆
详解JDBC的实现与优化(万字详解)
容器技术真的是环境管理的救星吗?
Volatile和CAS
MSTP——多生成树(案列+配置)
详谈二叉搜索树
微信小程序通过URL Scheme动态的渲染数据
【pypdf2】安装、读取和保存、访问页面、获取文本、读写元数据、加密解密
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 2 DGHJKL Problem Solution
云原生-FRP内网穿透(详解)使用云服务器将内网集群服务暴露至公网(二)