一、靜态路由的配置
下邊實驗對該拓撲圖進行配置
實驗目标:配置靜态路由,實現全網互通
1、配置路由器R1
進入接口f0/0,配置IP,并開啟。
進入接口f0/1,配置IP,并開啟。
設置靜态路由。
conf t
int f0/0
ip address 192.168.20.1 255.255.255.0
no shut
int f0/1
ip add 192.168.10.1 255.255.255.0
no shut
exit
ip route 192.168.30.0 255.255.255.0 192.168.20.2
查看PC1的路由表
do show ip route
2、配置路由器R2
進入接口f0/0,配置IP,并開啟。
進入接口f0/1,配置IP,并開啟。
設置靜态路由。
conf t
int f0/0
ip address 192.168.20.2 255.255.255.0
no shut
int f0/1
ip add 192.168.30.1 255.255.255.0
no shut
exit
ip route 192.168.10.0 255.255.255.0 192.168.20.1
查看PC2的路由表
do show ip route
3、配置PC1的IP地址和網關
ip 192.168.10.10 192.168.10.1
4、配置PC2的IP地址和網關
ip 192.168.30.30 192.168.30.1
5、測試PC1,PC2之間的互通情況。
ping 192.168.10.10
6設置R1的路由模式為默認路由
7、查看PC1\PC2 的連接情況
更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!