静态路由配置
此实验使用软件为cisco Packet Tracer 6.2.0版本。
按照如下示意图,连接好网络拓扑图:
1.依次对各PC配置IP地址:(根据自己实验中的信息配置即可),配置后直接点“×”关闭。
2.分别在R0、R1上配置路由。
2.1在R0上配置:
Continue with configuration dialog? [yes/no]: no //否定回答
Press RETURN to get started!
Router>en //进入特权模式进行配置
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain-lookup
Router(config)#int g0/0 //进入接口0/0
Router(config-if)#ip add 172.16.10.10 255.255.255.0 //配置IP地址
Router(config-if)#no shutdown //开启接口
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#exit //退出接口
Router(config)#int g0/1
Router(config-if)#ip add 172.16.20.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#ip route 172.16.30.0 255.255.255.0 172.16.20.1
Router(config)#exit
2.2在R1上配置:
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain-lookup
Router(config)#int g0/0
Router(config-if)#ip add 172.16.30.10 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int g0/1
Router(config-if)#ip add 172.16.20.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#ip route 172.16.10.0 255.255.255.0 172.16.20.2
Router(config)#exit
Router#
3.测试PC0分别与PC1、PC2、PC3的连通性。
(下图为在PC0 上的连通性测试,同理,其余PC皆如此)
当出现下面情况时,并不是不通,是当前不知mac地址,多ping两次就好。
当四个都是timed out时,是真的配置存在问题!!!!!