欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

静态路由实验

程序员文章站 2022-05-16 11:26:13
...

静态路由实验
路由带8T 的是带s的接口
PA-2FE-TX是带f的接口

R1:conf t
int f0/0
ip address 192.168.0.1 255.255.255.0
no shut
ctrl z
conf t
int s1/0
ip address 172.16.0.1 255.255.255.0
no shut
ctrl z

R2

R2:conf t
int s1/0
ip address 172.16.0.2 255.255.255.0
no shut
ctrl z
conf t
int f0/0
ip address 172.16.1.1 255.255.255.0
no shut
ctrl z

R3

R3:conf t
int f0/0
ip address 172.16.1.2 255.255.255.0
no shut
ctrl z
conf t
int f1/1
ip address 192.168.1.1 255.255.255.0
no shut
ctrl z

然后在回到R1

R1:conf t
ip route 0.0.0.0 0.0.0.0 172.16.0.2
ctrl z

回到R2

R2:conf t
ip route 0.0.0.0 0.0.0.0 172.16.0.1
ip route 192.168.1.0 255.255.255.0 172.16.1.2

回到R3

R3:conf t
ip route 0.0.0.0 0.0.0.0 172.16.1.1

然后在R1 ping192.168.1.1
R3ping192.168.0.1
看是否通了
为通show run 看配置
然后保存

copy running-config startup-config
回车在回车保存当前配置