【思科期末考察实验】 实验2

【思科期末考察实验】 实验2

实验2,静态路由实验——–【目的】实现所有主机都能通信

实验要求

这是一个稍微复杂的简单静态路由实验,实验开始

第一步 划分 IP地址

各路IP地址划分规划图

这里太过于赘述,不详细教程,直接看上图

看不清楚点这里zt1.png (1542×739) (wu69.cn)

第二步 进入交换机 配置vlan

进入交换机1

Switch>
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#e
Switch(config)#interface range f0/2-3
Switch(config-if-range)#sw mo ac
Switch(config-if-range)#sw ac vlan 10
Switch(config-if-range)#e
Switch(config)#interface f0/1
Switch(config-if)#sw mo trunk 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Switch(config-if)#
【Tips:】此时交换机1配置完成

进入交换机2

Switch>
Switch>en
Switch#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 20
Switch(config-vlan)#e
Switch(config)#interface range f0/2-3
Switch(config-if-range)#sw mo ac
Switch(config-if-range)#sw ac vlan 20
Switch(config-if-range)#e
Switch(config)#interface f0/1
Switch(config-if)#sw mo trunk 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Switch(config-if)#
【Tips:】此时交换机2配置完成

第三步 配置 单臂路由

进入左至右 第二个路由器2

Router(config)#
Router(config)#interface gigabitEthernet 0/2.1
Router(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2.1, changed state to up
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.1.1 255.255.255.0
Router(config-subif)#exit
Router(config)#

进入左至右 第三个路由器3

Router(config)#
Router(config)#interface gigabitEthernet 0/2.1
Router(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2.1, changed state to up
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.2.1 255.255.255.0
Router(config-subif)#exit
Router(config)#

欧克,到这里单臂路由已经配置完成了,加下来配置静态路由的下一跳

进入左一 路由器1


Router(config)#
Router(config)#ip route 192.168.1.2 255.255.255.255 20.1.1.2
Router(config)#ip route 192.168.1.3 255.255.255.255 20.1.1.2
Router(config)#ip route 192.168.2.2 255.255.255.255 20.1.1.2
Router(config)#ip route 192.168.2.3 255.255.255.255 20.1.1.2
Router(config)#ip route 172.17.2.2 255.255.255.255 20.1.1.2
Router(config)#

进入左二 路由器2

Router(config)#
Router(config)#ip route 172.17.1.2 255.255.255.255 20.1.1.1
Router(config)#ip route 172.17.2.2 255.255.255.255 30.1.1.2
Router(config)#ip route 192.168.2.2 255.255.255.255 30.1.1.2
Router(config)#ip route 192.168.2.3 255.255.255.255 30.1.1.2
Router(config)#

进入中间 路由器3

Router(config)#
Router(config)#ip route 172.17.1.2 255.255.255.255 30.1.1.1
Router(config)#ip route 192.168.1.2 255.255.255.255 30.1.1.1
Router(config)#ip route 192.168.1.3 255.255.255.255 30.1.1.1
Router(config)#ip route 172.17.2.2 255.255.255.255 40.1.1.2
Router(config)#

进入右侧 路由器4

Router(config)#
Router(config)#ip route 172.17.1.2 255.255.255.255 40.1.1.1
Router(config)#ip route 192.168.1.2 255.255.255.255 40.1.1.1
Router(config)#ip route 192.168.1.3 255.255.255.255 40.1.1.1
Router(config)#ip route 192.168.2.2 255.255.255.255 40.1.1.1
Router(config)#ip route 192.168.2.3 255.255.255.255 40.1.1.1
Router(config)#

欧克,配置完成,接下来验证实验

成功

验证成功,实验结束,感谢你的观看和阅读!

点击数:231

默认图片
JiHua article
文章: 17

留下评论