文章目录
1.路由器的配置
1.路由器的接口配置
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface GigabitEthernet0/0
Router(config-if)#ip address 192.168.0.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
2,添加静态路由
静态路由告诉路由器在哪里发送路由器不知道的网络消息。
We tell R1 that if it wants to send a message to Network 192.168.2.xxx, it should send the message to R2.
(Actually we tell it to send it to R2’s interface).
在特权模式中,用show ip route可以展示路由器的路由表
Router#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobil