网络环境搭建之EIGRP

一丶话不多说上实验拓扑图(要求实现主机PC1.PC2.PC3.PC4之间通讯
这里写图片描述
1按照要求在思科路由器上连接好直连线,并对路由器R1.R2.R3.R4进行配置
2.对各个路由器进行基本配置
R1:打开接口并配置IP地址
Router>enable //进入特权模式
Router#configure terminal //进入全局配置模式
Router(config)#hostname R1 //修改主机名
R1(config)#end
R1#configure terminal
R1(config)#interface f0/0 //声明接口f0/0
R1(config-if)#no shutdown //打开接口
R1(config)#interface f0/1 //声明接口f0/1
R1(config-if)#no shutdown
R1(config-if)#interface s0/2/1
R1(config-if)#no shutdown
R1(config-if)#end
查看R1接口配置情况
R1#show ip int b //展示R1路由
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up up
FastEthernet0/1 unassigned YES unset up down
Serial0/2/0 unassigned YES unset administratively down down
Serial0/2/1 unassigned YES unset up up
R1(config-if)#int s0/2/1
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#end
R1(config-if)#int f0/0
R1(config-if)#ip address 192.168.10.254 255.255.255.0
R1(config-if)#end
R1#show ip int b //展示R1路由
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.10.254 YES unset up up
FastEthernet0/1 unassigned YES unset up down
Serial0/2/0 unassigned YES unset administratively down down
Serial0/2/1 192.168.12.1 YES unset up up
R2:打开接口并配置IP地址
R2r#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2r(config)#interface f 0/0
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.20.254 255.255.255.0
R2(config-if)#end
R2r#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface f 0/1
R2(config-if)#no shutdown
R2(config-if)#end
R2r#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2r(config)#interface s0/2/1
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#end
R2#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface s0/0/0
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.24.2 255.255.255.0
R2(config-if)#end
R2r#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface s0/0/1
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.23.2 255.255.255.0
R2(config-if)#end
查看R2接口配置情况
R2#show ip int b
Interface IP-Address OK? Method Status Prot
ocol
FastEthernet0/0 192.168.20.254 YES manual up down

FastEthernet0/1 unassigned YES unset up down

Serial0/0/0 192.168.24.2 YES manual up up

Serial0/0/1 192.168.23.2 YES manual up up

Serial0/2/0 unassigned YES unset down down

Serial0/2/1 192.168.12.2 YES manual up up
R3:打开接口并配置IP地址
Router>enable
Router#conf t
Router(config)#hostname R3
R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#ip address 192.168.30.3 255.255.255.0
R3(config-if)#exit
R3(config)#int f0/1
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#int s0/2/0
R3(config-if)#no shutdown
R3(config-if)#ip address 192.168.34.3 255.255.255.0
R3(config-if)#exit
R3(config)#int s0/2/1
R3(config-if)#no shutdown
R3(config-if)#ip address 192.168.23.3 255.255.255.0
R3(config-if)#end
查看R3接口配置情况
R3#show ip int b
Interface IP-Address OK? Method Status Prot
FastEthernet0/0 192.168.30.254 YES unset up up

FastEthernet0/1 unassigned YES unset up down

Serial0/2/0 192.168.34.3 YES manual up up

Serial0/2/1 192.168.23.3 YES manual up up
R4:打开接口并配置IP地址
R4#config ter
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#int f0/0
R4(config-if)#ip add 192.168.40.4 255.255.255.0
R4(config)#int s0/2/0
R4(config-if)#ip add 192.168.23.4 255.255.255.0
R4(config-if)#exit
R4(config)#int s0/2/1
R4(config-if)#ip add 192.168.34.4 255.255.255.0
R4(config-if)#end
查看R4接口配置情况
R4#show ip int b
Interface IP-Address OK? Method Status Prot
ocol
FastEthernet0/0 192.168.30.254 YES unset up up

FastEthernet0/1 unassigned YES unset up down

Serial0/2/0 192.168.23.4 YES manual up up

Serial0/2/1 192.168.34.4 YES manual up up
3.配置EIGRP协议
R1上配置EIGRP协议:
R1#config ter
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router eigrp 100
R1(config-router)#network 192.168.10.0 0.0.0.255
R1(config-router)#network 192.168.12.0 0.0.0.255
R1(config-router)#end
R2上配置EIGRP协议:
R2#config ter
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router eigrp 100
R2(config-router)#network 192.168.12.0 0.0.0.255
R2(config-router)#network 192.168.23.0 0.0.0.255
R2(config-router)#network 192.168.24.0 0.0.0.255
R2(config-router)#network 192.168.20.0 0.0.0.255
R3上配置EIGRP协议
R3#config ter
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router eigrp 100
R3(config-router)#network 192.168.23.0 0.0.0.255 ^
R3(config-router)#network 192.168.34.0 0.0.0.255
R3(config-router)#network 192.168.30.0 0.0.0.255
R3(config-router)#end
R4上配置EIGRP协议
R4#config ter
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#router eigrp 100
R4(config-router)#network 192.168.34.0 0.0.0.255
R4(config-router)#network 192.168.24.0 0.0.0.255
R4(config-router)#network 192.168.40.0 0.0.0.255
R4(config-router)#end

注意:

1丶PC与相连的路由器之间一定要在同一个子网中且子网掩码相同
2丶需要互通的子网之间使用的eigrp序列号一定要相同
所以需要:
将PC1.PC2.PC3.PC4的网络地址改为和路由器相连端口相同的子网下
PC1 IP 192.168.10.1 网关 192.168.10.254
PC2 IP 192.168.20.2 网关 192.168.20.254
PC3 IP 192.168.30.3 网关 192.168.30.254
PC4 IP 192.168.40.4 网关 192.168.40.254
至此,PC1.PC2.PC3.PC4全网互通
作者:徐敏学
原文链接:点击这里

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值