思科路由器 linux,思科路由器的基本配置1

配置路由器的ip地址

Router>                                            :用户模式

Router>enable                                      :特权模式

Router#conf terminal                               :进入全局模式

Router(config)#int gigabitEthernet 0/0             :进入要配置ip地址的端口(端口模式)

Router(config-if)#ip add 192.168.1.1 255.255.255.0 :配置IP地址

Router(config-if)#no shutdown                      :开启端口

Router(config-if)#exit                             :退出

Router(config)#exit                                :退出

Router#show ip interface brief                     :查看所有的端口的基本信息

R1#show ip interface gigabitEthernet 0/0           :查看指点端口的所有信息

配置路由器的名字

Router>enable

Router#conf terminal

Router(config)#hostname R1                        :更改路由器名字

R1(config)#

配置静态路由

Router>enable

Router#conf terminal

Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.2 :到达192.168.2.0的网段通过IP:192.168.1.2的端口

Router(config)#do show ip route                   :查看路由表(加do可在任意的模式上查看)

配置默认路由

Router>enable

Router#conf terminal

Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2 :到任何网段都要通过IP192.168.1.2的端口才能够到达

Router(config)#do show ip route

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值