第四步:路由器A和B配置
配置A
Continue with configuration dialog? [yes/no]: no Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config-if)#int fa0/0 Router(config-if)#ip address 192.168.1.2 255.255.255.192 Router(config-if)#no shut Router(config-if)#int fa0/1 Router(config-if)#ip address 192.168.1.65 255.255.255.192 Router(config-if)#no shut Router(config-if)#exit Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.1.1 Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.1 Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.1 Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.1 Router(config)#ip route 0.0.0.0 0.0.0 192.168.1.66
查看配置后的信息
Router#sh run Building configuration... Current configuration : 711 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Router ! ! ! ! ! ! ! ! ip cef no ipv6 cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface FastEthernet0/0 ip address 192.168.1.2 255.255.255.192 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.1.65 255.255.255.192 duplex auto speed auto ! router rip ! ip classless ip route 192.168.1.0 255.255.255.0 192.168.1.1 ip route 192.168.2.0 255.255.255.0 192.168.1.1 ip route 192.168.3.0 255.255.255.0 192.168.1.1 ip route 0.0.0.0 0.0.0.0 192.168.1.66 ! ip flow-export version 9 ! ! ! ! ! ! ! line con 0 ! line aux 0 ! line vty 0 4 login ! ! ! end
配置B
Continue with configuration dialog? [yes/no]: no Router>en Router#conf t Router(config)#int fa0/0 Router(config-if)#ip address 192.168.1.66 255.255.255.192 Router(config-if)#no shut Router(config-if)#int fa0/1 Router(config-if)#ip address 10.0.0.1 255.255.0.0 Router(config-if)#no shut Router(config-if)#exit Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.1.65 Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.65 Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.65 Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.1.65
查看配置后的信息
Router#sh run Building configuration... Current configuration : 655 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Router ! ! ! ! ! ! ! ! ip cef no ipv6 cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface FastEthernet0/0 ip address 192.168.1.66 255.255.255.192 duplex auto speed auto ! interface FastEthernet0/1 ip address 10.0.0.1 255.255.0.0 duplex auto speed auto ! ip classless ip route 192.168.3.0 255.255.255.0 192.168.1.65 ip route 192.168.2.0 255.255.255.0 192.168.1.65 ip route 192.168.1.0 255.255.255.0 192.168.1.65 ! ip flow-export version 9 ! ! ! ! ! ! ! line con 0 ! line aux 0 ! line vty 0 4 login ! ! ! end
第五步:配置二层交换机
Switch>en Switch#conf t Switch(config)#ip default-gateway 10.0.0.1 Switch(config)#int vlan 1 Switch(config-if)#ip address 10.0.0.2 255.255.0.0 Switch(config-if)#no shut Switch(config-if)#int fa0/24 Switch(config-if)#sw access vlan 1 Switch(config-if)#no shut
查看配置后的信息
Switch#sh run Building configuration... Current configuration : 1039 bytes ! version 12.1 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! ! ! spanning-tree mode pvst ! interface FastEthernet0/1 ! interface FastEthernet0/2 ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 ! interface FastEthernet0/13 ! interface FastEthernet0/14 ! interface FastEthernet0/15 ! interface FastEthernet0/16 ! interface FastEthernet0/17 ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 switchport mode access ! interface Vlan1 ip address 10.0.0.2 255.255.0.0 ! ip default-gateway 10.0.0.1 ! ! ! ! line con 0 ! line vty 0 4 login line vty 5 15 login ! ! end
以上就是全部的配置过程
第六步:开始我们的结果验证
以上就是全部的实验内容啦希望能让各位读者看明白,成功完成实验,本人是大学生刚刚自己动手完成的实验,运行成功,就把自己怎么完成实验的过程分享给大家啦,如果对各位有所帮助希望大家能给点赞评论收藏一下,让更多的人看到,谢谢大家的鼓励支持!
如果大家想要kpt文件可以点击这个链接自行来取, https://gitee.com/wanxiaoguo/network3Pro/tree/master ,
单击下载就可以了