1.实验准备:
2.具体配置:
2.1根据分配好的IP地址配置静态IP:
2.1.1PC配置:
PC0:
PC1:
PC2:
2.1.2路由器配置:
R0:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R0
R0(config)#int g0/0
R0(config-if)#ip address 10.1.1.254 255.255.255.0
R0(config-if)#no shutdown R0(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
R0(config-if)#exitR0(config)#int g0/1
R0(config-if)#ip address 192.168.1.1 255.255.255.0
R0(config-if)#no shutdown R0(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
R0(config-if)#exit
R0(config)#
R1:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int g0/0
R1(config-if)#ip add 10.1.2.254 255.255.255.0
R1(config-if)#no shutdown R1(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
R1(config-if)#exitR1(config)#int g0/1
R1(config-if)#ip address 192.168.1.2 255.255.255.0
R1(config-if)#no shutdown R1(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
R1(config-if)#exit
R1(config)#
R2:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2R2(config)#int g0/0
R2(config-if)#ip add 192.168.1.3 255.255.255.0
R2(config-if)#no shutdown R2(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
R2(config-if)#exit
R2(config)#int g0/2
R2(config-if)#ip add 192.168.2.254 255.255.255.0
R2(config-if)#no shutdown R2(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
R2(config-if)#exit
R2(config)#
2.2配置RIP V2路由:
R0:
R0(config)#router rip
R0(config-router)#ve
R0(config-router)#version 2
R0(config-router)#no auto-summary
R0(config-router)#network 10.1.1.0
R0(config-router)#network 192.168.1.0
R0(config-router)#exit
R0(config)#
R0#debug ip rip # 打开rip协议调试
R1:
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 10.1.2.0
R1(config-router)#network 192.168.1.0
R1(config-router)#exit
R1(config)#
R1#debug ip rip # 打开rip协议调试
R2:
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.1.0
R2(config-router)#exit
R2(config)#
R2#debug ip rip # 打开rip协议调试
3.测试连通性:
PC1与PC2通信:
PC0与PC2通信:
PC2与PC0通信:
到此本实验成功完成!