思科路由器配置实验
发布网友
发布时间:2022-04-21 09:27
我来回答
共1个回答
热心网友
时间:2023-11-09 01:34
PC机,路由器接口的IP地址我就不用写要怎麼配置了。连线这些我也不用多说,相信你也会。
这里主要配置是switch0到R1的单臂路由的配置。
给你看一下交换机和路由器的配置:
switch0:(注:PC1-FA0/1、PC2-FA0/2、G1/1-R1、G1/2-SWITCH1)
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
!
interface GigabitEthernet1/1
switchport mode trunk
!
interface GigabitEthernet1/2
switchport mode trunk
switch1:(注:PC3-FA0/1、PC4-FA0/2、G1/2-SWITCH0)
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/8
!interface GigabitEthernet1/2
switchport mode trunk
R1配置:(FA0/0-SWITCH1 , S0/0-R2-这个口配置波特率为9600)
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
(以上为单臂路由配置,为问题2的重点配置)
interface Serial0/0
ip address 172.16.2.1 255.255.0.0
clock rate 9600
!!
router rip
network 172.16.0.0
network 192.168.10.0
network 192.168.20.0
!
ip route 0.0.0.0 0.0.0.0 172.16.2.2
R2配置:(FA0/0-PC5 , S0/0-R1)
interface FastEthernet0/0
ip address 202.99.8.1 255.255.255.0
plex auto
speed auto
!
interface Serial0/0
ip address 172.16.2.2 255.255.0.0
!
interface Serial0/1
no ip address
shutdown
!
router rip
network 172.16.0.0
network 202.99.8.0
ip route 0.0.0.0 0.0.0.0 172.16.2.1
测试:
1、查看R1的路由表
Router#sh ip rout
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 172.16.2.2 to network 0.0.0.0
C 172.16.0.0/16 is directly connected, Serial0/0
C 192.168.10.0/24 is directly connected, FastEthernet0/0.10
C 192.168.20.0/24 is directly connected, FastEthernet0/0.20
R 202.99.8.0/24 [120/1] via 172.16.2.2, 00:00:19, Serial0/0
S* 0.0.0.0/0 [1/0] via 172.16.2.2
2、查看R2的路由表:
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 172.16.2.1 to network 0.0.0.0
C 172.16.0.0/16 is directly connected, Serial0/0
R 192.168.10.0/24 [120/1] via 172.16.2.1, 00:00:25, Serial0/0
R 192.168.20.0/24 [120/1] via 172.16.2.1, 00:00:25, Serial0/0
C 202.99.8.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 172.16.2.1
3、 PC1 ping PC5:
PC>ping 202.99.8.3
Pinging 202.99.8.3 with 32 bytes of data:
Reply from 202.99.8.3: bytes=32 time=141ms TTL=126
Reply from 202.99.8.3: bytes=32 time=125ms TTL=126
Reply from 202.99.8.3: bytes=32 time=125ms TTL=126
Reply from 202.99.8.3: bytes=32 time=125ms TTL=126
Ping statistics for 202.99.8.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 125ms, Maximum = 141ms, Average = 129ms
4 、 PC4 ping PC5 :
PC>ping 202.99.8.3
Pinging 202.99.8.3 with 32 bytes of data:
Reply from 202.99.8.3: bytes=32 time=234ms TTL=126
Reply from 202.99.8.3: bytes=32 time=156ms TTL=126
Reply from 202.99.8.3: bytes=32 time=141ms TTL=126
Reply from 202.99.8.3: bytes=32 time=141ms TTL=126
Ping statistics for 202.99.8.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 141ms, Maximum = 234ms, Average = 168ms
以上测试通过,若无疑问,希望能及时采纳!