重拾记忆的碎片我只是不想遗忘曾经的网络
毕业设计那会的东西:
实现vpc1和vpc2通信
r1配置如下:
r1#show run
Building configuration...
Building configuration...
Current configuration : 803 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
ip address 192.168.2.9 255.255.255.252
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 10.1.0.1 255.255.0.0
duplex auto
speed auto
!
ip http server
ip route 172.20.10.0 255.255.255.0 192.168.2.10
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
end
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
ip address 192.168.2.9 255.255.255.252
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 10.1.0.1 255.255.0.0
duplex auto
speed auto
!
ip http server
ip route 172.20.10.0 255.255.255.0 192.168.2.10
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
end
r1#
r1#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
172.20.0.0/24 is subnetted, 1 subnets
S 172.20.10.0 [1/0] via 192.168.2.10
10.0.0.0/16 is subnetted, 1 subnets
C 10.1.0.0 is directly connected, FastEthernet1/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.8 is directly connected, Serial0/0
r1#
S 172.20.10.0 [1/0] via 192.168.2.10
10.0.0.0/16 is subnetted, 1 subnets
C 10.1.0.0 is directly connected, FastEthernet1/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.8 is directly connected, Serial0/0
r1#
——————————————————————————————
r2配置如下:
r2#show config
Using 796 out of 129016 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
ip address 192.168.2.10 255.255.255.252
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 172.20.10.1 255.255.255.0
duplex auto
speed auto
!
ip http server
ip route 10.1.0.0 255.255.0.0 192.168.2.9
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
Using 796 out of 129016 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial0/0
ip address 192.168.2.10 255.255.255.252
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 172.20.10.1 255.255.255.0
duplex auto
speed auto
!
ip http server
ip route 10.1.0.0 255.255.0.0 192.168.2.9
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
r2#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 not set
172.20.0.0/24 is subnetted, 1 subnets
C 172.20.10.0 is directly connected, FastEthernet1/0
10.0.0.0/16 is subnetted, 1 subnets
S 10.1.0.0 [1/0] via 192.168.2.9
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.8 is directly connected, Serial0/0
r2#
C 172.20.10.0 is directly connected, FastEthernet1/0
10.0.0.0/16 is subnetted, 1 subnets
S 10.1.0.0 [1/0] via 192.168.2.9
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.8 is directly connected, Serial0/0
r2#
————————————————————————————
s1
interface Vlan1
ip address 10.1.255.254 255.255.0.0
ip address 10.1.255.254 255.255.0.0
s2
interface Vlan1
ip address 172.20.10.254 255.255.255.0
ip address 172.20.10.254 255.255.255.0
————————————————————————————————
VPCS 1 >show
NAME IP/CIDR GATEWAY MAC LPORT RPORT
PC1 10.1.255.2/16 10.1.0.1 00:50:79:66:68:00 10001 11301
PC2 172.20.10.2/24 172.20.10.1 00:50:79:66:68:01 10002 11401
PC1 10.1.255.2/16 10.1.0.1 00:50:79:66:68:00 10001 11301
PC2 172.20.10.2/24 172.20.10.1 00:50:79:66:68:01 10002 11401
————————————————————————————————————
最后互两pc互ping
通说明配置正确。
—————————————————————————
动态rip路由协议试验
删除静态路由配置后座如下配置
r1(config)#router rip
r1(config-router)#ver 2
r1(config)#router rip
r1(config-router)#ver 2
r1(config-router)#network 192.168.2.0
r1(config-router)#network 10.1.0.0
r1(config-router)#
r1(config-router)#network 10.1.0.0
r1(config-router)#
______________________
r2(config)#router rip
r2(config-router)# ver 2
r2(config-router)#network 172.20.0.0
r2(config-router)#network 192.168.2.0
r2(config)#router rip
r2(config-router)# ver 2
r2(config-router)#network 172.20.0.0
r2(config-router)#network 192.168.2.0
转载于:https://blog.51cto.com/mynetwork/280554